DocsGitHub
Getting Started
  • Overview
  • Design Tokens
Components
  • Accordion
  • Alert
  • Announcement
  • Avatar
  • Badge
  • BigCalendar
  • Breadcrumb
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Checkbox
  • Chip
  • CloseButton
  • Combobox
  • CommandPalette
  • ContextMenu
  • Currency
  • DatePicker
  • DescriptionList
  • Drawer
  • DropdownMenu
  • EmptyState
  • Field
  • FileUpload
  • FormGrid
  • GanttChart
  • Hotkey
  • Icon
  • Input
  • Kanban
  • Metric
  • Modal
  • MultiSelect
  • NumberInput
  • Pagination
  • Popover
  • ProgressBar
  • Radio
  • Rating
  • SegmentedControl
  • Select
  • SelectionCard
  • Sidebar
  • Skeleton
  • Slider
  • Spinner
  • Stepper
  • Switch
  • Table
  • Tabs
  • Textarea
  • Timeline
  • TimePicker
  • Toast
  • Tooltip
  • TransferList
  • TreeView
  • Wizard
Charts
  • Overview
  • Area Chart
  • Bar Chart
  • Donut Chart
  • Line Chart
  • Pie Chart
  • Stacked Bar Chart

Kanban

Plan and move work across accessible columns with controlled state, composable cards, capacity limits, selection, and direction-aware pointer and keyboard movement.

Interactive controlled board

Own the columns and selection in application state. Each column takes a status tone and icon, which tint it and lead its header pill. Press anywhere on a card and drag it: a preview follows the pointer across columns while a slot opens where it will land. The same card moves from the keyboard with Space and the arrow keys.

Press anywhere on a card and drag it to another column; on touch, hold the card first. From the keyboard, focus a card and press Space to pick it up, move it with the arrow keys, then press Space to drop or Esc to cancel.

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Backlog

2/42 of 4 task limit
  • MAD-24High

    Synthesize customer interviews

    Turn the latest interviews into opportunity statements for planning.
    DiscoveryResearch
    Assigned to Maya Chen
    M
    Maya Chen
    33 attachments
  • MAD-27Low

    Define launch measures

    Agree on activation, adoption, and support guardrails.
    Planning
    Assigned to Omar Hassan, Noor Ali
    O
    N
    Due date: Jul 21

In progress

33 tasks
  • MAD-12Urgent

    Redesign the kanban cards for the task tracker

    Design
    Assigned to Maya Chen
    M
    Maya Chen
    77 comments22 attachments
  • MAD-14Medium

    Test keyboard movement

    Cover reorder, cross-column movement, cancel, and RTL.
    Assigned to Noor Ali
    N
    Noor Ali
    3/73 of 7 checklist items complete
  • MAD-19Low

    Try the new colour tokens

    Assigned to Leo Martin
    L
    Leo Martin
    11 attachments

In review

1/21 of 2 task limit
  • MAD-21Medium

    Review launch guidance

    Check examples, API language, and interaction guidance.
    Content
    Assigned to Omar Hassan, Leo Martin
    O
    L
    Due date: Jul 2033 comments

Done

22 tasks
  • MAD-10Done

    [Research] Button types in web interface design

    Assigned to Maya Chen
    M
    Maya Chen
    44 attachments
  • MAD-9Done

    Design a new colour scheme

    Assigned to Leo Martin
    L
    Leo Martin

Redesign the kanban cards for the task tracker is selected.

tsx
import { useState } from "react";
import { CircleCheck, CircleDot } from "lucide-react";
import { Icon, KanbanBoard, type KanbanColumnData } from "madagent";

const initialColumns: KanbanColumnData[] = [
  {
    id: "progress",
    title: "In progress",
    tone: "accent",
    icon: <Icon icon={CircleDot} />,
    cards: [
      {
        id: "cards",
        identifier: "MAD-12",
        title: "Redesign the kanban cards for the task tracker",
        priority: "urgent",
        labels: ["Design"],
        attachments: 2,
        assignees: [{ id: "maya", name: "Maya Chen" }],
      },
    ],
  },
  {
    id: "done",
    title: "Done",
    tone: "positive",
    icon: <Icon icon={CircleCheck} />,
    cards: [],
  },
];

const [columns, setColumns] = useState(initialColumns);
const [selectedCardId, setSelectedCardId] = useState<string | null>(null);

<KanbanBoard
  columns={columns}
  onColumnsChange={setColumns}
  selectedCardId={selectedCardId}
  onSelectedCardIdChange={setSelectedCardId}
  onCardMove={(move) => console.log(move)}
  onAddCard={(column) => addCard(column.id)}
  renderColumnActions={(column) => <ColumnMenu column={column} />}
  aria-label="Product launch board"
/>

Installation

tsx
import {
  KanbanBoard,
  KanbanCard,
  moveKanbanCard,
  type KanbanColumnData,
  type KanbanCardData,
} from "madagent";

Card anatomy and custom content

The default card leads with a priority badge and identifier, then the title, a muted description, and labels as madagent Chips. Its footer pairs assignees (madagent Avatars) with due date, comments, checklist progress, and attachments. Pass children, or renderCard on a board, to replace the visual anatomy while retaining selection, dragging, disabled state, and the card's accessible name. Buttons and links inside a card keep working and never start a drag.

Default anatomy

MAD-31High

Prepare release candidate

Package the final build and record the release checks for reviewers.
ReleaseRisk
Assigned to Maya Chen, Omar Hassan, Noor Ali, Leo Martin
M
O
N
+1
Due date: Jul 2266 comments7/107 of 10 checklist items complete22 attachments

Custom children

Design review

Approve homepage concept

Compare the final desktop and mobile directions before build.

Board render hooks

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Expedite

Expedite1 active
  • Launch blockerResolve launch blockerReady to review

Default card selected.

tsx
import { KanbanBoard, KanbanCard } from "madagent";

<KanbanCard
  card={{
    id: "release",
    identifier: "MAD-31",
    title: "Prepare release candidate",
    description: "Package the final build and record the release checks.",
    priority: "high",
    labels: ["Release", { label: "Risk", color: "error" }],
    dueDate: "Jul 22",
    comments: 6,
    checklist: { completed: 7, total: 10 },
    attachments: 2,
    assignees: team,
  }}
  selected
/>

<KanbanCard card={{ id: "approval", title: "Approve concept" }}>
  <div>
    <strong>Approve concept</strong>
    <Button size="sm">Open brief</Button>
  </div>
</KanbanCard>

<KanbanBoard
  defaultColumns={columns}
  renderColumnHeader={(column, { cardCount }) => (
    <strong>{column.title}: {cardCount}</strong>
  )}
  renderCard={(card, { selected }) => (
    <div>
      {card.title} · {selected ? "Selected" : "Ready"}
      <Button size="sm" variant="outline" onClick={() => escalate(card)}>
        Escalate
      </Button>
    </div>
  )}
  aria-label="Custom sprint board"
/>

Read-only, disabled, and empty

Read-only boards preserve card selection but suspend movement and adding. Disabled boards, columns, and cards are unavailable. Empty columns retain their labelled task lists and empty message.

Read-only

Cards can still be selected; move and add controls are disabled.

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Read-only — Active

22 tasks
  • Medium

    Review release notes

    Selection remains available on a read-only board.
    Docs
  • Waiting on access

    This individual card is disabled.

Read-only — Locked column

11 tasks
  • Archived decision

Disabled

Task and add interactions are unavailable; the board remains focusable for horizontal scrolling.

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Disabled — Active

22 tasks
  • Medium

    Review release notes

    Selection remains available on a read-only board.
    Docs
  • Waiting on access

    This individual card is disabled.

Disabled — Locked column

11 tasks
  • Archived decision

Empty

Columns stay named and visible while their lists announce no tasks.

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Empty ideas

00 tasks
  • No tasks

Empty planned work

00 tasks
  • No tasks
tsx
import { KanbanBoard } from "madagent";

<KanbanBoard
  defaultColumns={columns}
  readOnly
  onAddCard={addCard}
  aria-label="Read-only release board"
/>
<KanbanBoard
  defaultColumns={columns}
  disabled
  onAddCard={addCard}
  aria-label="Disabled release board"
/>
<KanbanBoard
  defaultColumns={emptyColumns}
  aria-label="Empty planning board"
/>

Column limits and add-card actions

A column limit disables its add action and rejects incoming cards once full, while reorder within that same column remains available. onAddCard is an intent callback; update columns in application state to insert the card.

To move a task, press Space to pick it up. Use Up and Down to reorder it, Left and Right to move it between columns, Home and End to move to a boundary, then press Space or Enter to drop. Press Escape to cancel.

Ideas

1/21 of 2 task limit
  • Map onboarding friction

Ready

1/11 of 1 task limit
  • Confirm research script

Complete

00 tasks
  • No tasks

Ready is at its one-card limit; Ideas has one space left.

tsx
import { useState } from "react";
import { KanbanBoard, type KanbanColumnData } from "madagent";

const [columns, setColumns] = useState<KanbanColumnData[]>(initialColumns);

<KanbanBoard
  columns={columns}
  onColumnsChange={setColumns}
  onAddCard={(column) => appendCard(column.id)}
  addCardLabel={(column) =>
    column.limit !== undefined && column.cards.length >= column.limit
      ? "Column full"
      : "Add task"
  }
  aria-label="Limited idea board"
/>

KanbanBoard Props

PropTypeDefaultDescription
columns
KanbanColumnData[]
-Controlled column and card state. Commit onColumnsChange to update the rendered board.
defaultColumns
KanbanColumnData[]
[]Initial columns for uncontrolled board state.
onColumnsChange
(columns: KanbanColumnData[]) => void
-Called with an immutable next column array after an effective card move.
onCardMove
(payload: KanbanCardMovePayload) => void
-Called after a card is dropped in a new position, with source, destination, card, and nextColumns.
selectedCardId
stringnull
-Controlled selected card id.
defaultSelectedCardId
stringnull
nullInitial selection for uncontrolled selection state.
onSelectedCardIdChange
(cardId: string | null) => void
-Called when an enabled card is selected. Controlled consumers must commit the id.
onCardSelect
(card: KanbanCardData, column: KanbanColumnData) => void
-Provides the selected card and its current column.
onAddCard
(column: KanbanColumnData) => void
-Shows an add action (a ghost madagent Button in the column's tone) at the foot of each column and reports intent. The consumer inserts the card into state.
addCardLabel
ReactNode((column: KanbanColumnData) => ReactNode)
"Add task"Visible add-action content, shared by every column or derived per column.
renderCard
(card: KanbanCardData, context: KanbanRenderCardContext) => ReactNode
-Replaces the default visual card anatomy while the board retains selection and drag behavior. The custom content also rides in the drag preview; interactive descendants keep their own clicks and keys.
renderColumnHeader
(column: KanbanColumnData, context: KanbanRenderColumnHeaderContext) => ReactNode
-Replaces the header pill and count; the original title remains available to assistive technology.
renderColumnActions
(column: KanbanColumnData, context: KanbanRenderColumnHeaderContext) => ReactNode
-Controls placed at the end of each column header, such as a DropdownMenu behind a ghost icon Button. Rendered beside a custom header too.
readOnly
boolean
falseDisables card movement and add actions while preserving enabled-card selection. Space then selects instead of picking a card up.
disabled
boolean
falseDisables board, card, movement, selection, and add interactions.
aria-label
string
"Kanban board"Accessible name for the board region.
tabIndex
number
0Keeps the horizontally scrollable board keyboard focusable; pass another value to override it.
...sectionProps
Omit<HTMLAttributes<HTMLElement>, "children">
-Native section attributes, className, data attributes, and a forwarded HTMLElement ref.

KanbanCard Props

PropTypeDefaultDescription
card*
KanbanCardData
-Card identity, accessible title, and default anatomy data.
children
ReactNode
-Custom visual content that replaces the default anatomy without replacing the article semantics.
selected
boolean
falseApplies selected styling and includes selected in the default name.
dragging
boolean
falseApplies the lifted presentation KanbanBoard uses while a card is moved from the keyboard.
disabled
boolean
card.disabled ?? falseOverrides the data-level disabled state and removes selection and focus interaction.
onSelect
(card: KanbanCardData) => void
-Called when the enabled article is clicked or activated with Enter or Space (inside a movable KanbanBoard, Space picks the card up instead); interactive descendants stay independent.
aria-label
string
card title, plus selected stateOverrides the accessible article name. Plain-text card titles produce the best automatic name.
...articleProps
Omit<HTMLAttributes<HTMLElement>, "children" | "title" | "onSelect">
-Native article attributes and event handlers, className, data attributes, and a forwarded HTMLElement ref.

Dragging

Inside a KanbanBoard the whole card is the grab target: the board wires pointer, touch, and keyboard movement onto the card article, so there is no separate handle. A standalone KanbanCard renders the same card and selection but does not move by itself.

Data types

Keep every column id unique, and every card id unique across the complete board. Card order inside each column is the rendered and announced order.

KanbanCardData

PropTypeDefaultDescription
id*
string
-Stable identifier used by selection, focus, and movement.
title*
ReactNode
-Visible title and automatic accessible name source; prefer text for unambiguous announcements.
identifier
ReactNode
-Short reference such as an issue key ("MAD-12"), shown beside the priority badge above the title.
description
ReactNode
-Supporting text under the title, muted and clamped to three lines.
labels
readonly (string | KanbanLabel)[]
-Label text or configured label objects, each rendered as a madagent Chip. String labels render as muted neutral Chips.
priority
"low""medium""high""urgent""done"
-A tinted badge above the title whose icon repeats the level, so it never relies on color alone. The level is written beside it, or kept for screen readers when the card has an identifier; done reads as completed.
dueDate
ReactNode
-Due-date content displayed with a calendar icon.
comments
number
-Comment count, including zero, shown with a comment icon.
checklist
KanbanChecklist
-Completed and total checklist counts.
attachments
number
-Attachment count, shown with a paperclip icon.
assignees
readonly KanbanAssignee[]
-Assigned people, leading the card footer: one person shows as a madagent Avatar with their name; more show as up to three overlapping Avatars and a "+N" Chip. Screen readers hear the full list of names.
disabled
boolean
falseDisables selection and movement for this card.

KanbanColumnData

PropTypeDefaultDescription
id*
string
-Stable column identifier used by move callbacks.
title*
ReactNode
-Visible column heading and automatic group/list name source; prefer text.
cards*
KanbanCardData[]
-Ordered cards in the column.
tone
"neutral""accent""info""positive""warning""negative"
"neutral"Status colour. It tints the column and colours its header pill, count, and add action.
icon
ReactNode
-Status icon leading the header pill, such as a madagent Icon. A ring in the column's tone stands in when omitted.
count
number
cards.lengthTotal cards in the column, for server-paged columns that load only some of their cards. The header shows and announces it (as count/limit when limit is set) and renderColumnHeader receives it as cardCount. Display-only: limit is still enforced against cards.length.
disabled
boolean
falseDisables every card, move target, and add action in the column.
limit
number
-Maximum incoming/addable card count. Same-column reorder remains available at the limit.

KanbanLabel

PropTypeDefaultDescription
id
string
-Optional stable key; array position is used when omitted.
label*
ReactNode
-Visible label content.
color
"primary""success""warning""error""neutral""secondary"
"neutral"Chip color.
variant
"solid""muted"
"muted"Chip variant.
icon
ReactNode
-Optional Chip icon, shown before the label.

KanbanAssignee

PropTypeDefaultDescription
id*
string
-Stable assignee identifier.
name*
string
-Full name. It drives the Avatar's generated face and initial, its tooltip, and the announced assignee list.
avatarUrl
string
-Optional Avatar image URL; the generated face and initial show when it is absent or fails to load.

KanbanChecklist

PropTypeDefaultDescription
completed*
number
-Completed checklist item count.
total*
number
-Total checklist item count.

KanbanCardMovePayload

PropTypeDefaultDescription
card*
KanbanCardData
-The moved card.
sourceColumnId*
string
-Column id before the move.
sourceIndex*
number
-Card index before the move.
destinationColumnId*
string
-Column id after the move.
destinationIndex*
number
-Card index in the destination after the source card has been removed.
nextColumns*
KanbanColumnData[]
-Immutable next board state.

KanbanRenderCardContext

PropTypeDefaultDescription
column*
KanbanColumnData
-Column currently containing the card.
columnIndex*
number
-Current column index.
cardIndex*
number
-Current card index in the column.
selected*
boolean
-Whether the card id matches the current selection.
disabled*
boolean
-Resolved board, column, or card disabled state.

KanbanRenderColumnHeaderContext

PropTypeDefaultDescription
columnIndex*
number
-Current column index.
cardCount*
number
-The column's count, or cards.length when it has none.
atLimit*
boolean
-Whether cards.length is greater than or equal to limit; count is not considered.

KanbanCardLocation

PropTypeDefaultDescription
columnId*
string
-Containing column id.
columnIndex*
number
-Containing column index.
cardIndex*
number
-Card index in the containing column.

findKanbanCard intersects this location with a card: KanbanCardData field.

KanbanMoveResult

PropTypeDefaultDescription
card*
KanbanCardData
-The moved card.
sourceColumnId*
string
-Column id before the move.
sourceIndex*
number
-Card index before the move.
destinationColumnId*
string
-Column id after the move.
destinationIndex*
number
-Card index in the destination after the source card has been removed.
nextColumns*
KanbanColumnData[]
-Immutable next board state.
sourceColumnIndex*
number
-Source column index before the move.
destinationColumnIndex*
number
-Destination column index.

Type aliases

PropTypeDefaultDescription
KanbanPriority
"low""medium""high""urgent""done"
-Allowed default priority treatments.
KanbanColumnTone
"neutral""accent""info""positive""warning""negative"
-Column status colours, drawn from the semantic surface tokens.
KanbanLabelColor
"primary""success""warning""error""neutral""secondary"
-Label colors; the same values as ChipColor.

Move utilities

findKanbanCard(columns, cardId) returns the card and its location, or null. moveKanbanCard(columns, cardId, destinationColumnId, destinationIndex) returns an immutable KanbanMoveResult, or nullfor a missing or unchanged move. The destination index is measured after removing the source card. This utility only reorders data; it does not enforce board, column, or card disabled state or column limits.

Accessibility

Give every board a concise aria-label and prefer plain-text card and column titles so move announcements remain specific. Columns are labelled groups, their card collections are named lists, and position metadata follows the rendered order.

  • Pointer: press anywhere on a card with the primary mouse button and move a few pixels, or hold a card briefly on touch. A preview follows the pointer across columns while the cards under it glide aside to open a slot where it will land; the card's own space stays outlined until it is dropped elsewhere, and on drop it glides into place. With reduced motion the same changes happen without animating. The board scrolls when the pointer nears its edge. A column that is disabled or full is outlined as refusing the card. Release over a column to drop. Releasing outside the board or over a refusing column, pressing Escape, or cancelling the pointer restores the original order. A plain click still selects.
  • Keyboard pickup and drop: focus a card and press Space. Press Space or Enter again to commit, or Escape to cancel and restore focus and order. Enter on a card that is not picked up selects it.
  • While picked up, Up and Down reorder within a column; Home and End move to its first and last position. Left and Right move between available columns and skip disabled or full destinations.
  • Horizontal movement follows text direction: ArrowRight advances to the next logical column in LTR, while ArrowLeft advances in RTL.
  • Buttons, links, inputs, menus, and other interactive custom descendants keep their own clicks and keys: pressing them does not select the card or start moving it.
  • A polite live region announces pickup, preview position, rejected destinations, drop, and cancellation. Do not replace movement with pointer-only custom interactions.
  • readOnly keeps enabled cards selectable while disabling move and add controls. disabled, disabled columns, and disabled cards remove their affected controls and cards from the interaction flow; the board itself remains focusable for horizontal scrolling.

RTL Support

Components automatically adapt to right-to-left languages using CSS logical properties.

Preview

لنقل مهمة، يُضغط على Space لالتقاطها. تُستخدم مفاتيح الأسهم للأعلى وللأسفل لإعادة ترتيبها، ولليمين ولليسار لنقلها بين الأعمدة، وHome وEnd لنقلها إلى بداية العمود أو نهايته، ثم يُضغط على Space أو Enter لإفلاتها. للإلغاء، يُضغط على Escape.

قائمة الانتظار

2مهمتان
  • MAD-24عالية

    تلخيص مقابلات العملاء

    تحويل الملاحظات إلى فرص واضحة للفريق.
    بحث
    تم الإسناد إلى ليلى منصور
    ل
    ليلى منصور
    33 مرفقات
  • MAD-27منخفضة

    تحديد مؤشرات الإطلاق

    الاتفاق على مؤشرات التفعيل والتبني والدعم.
    تخطيط
    تم الإسناد إلى عمر حسن، سارة العتيبي
    ع
    س
    تاريخ الاستحقاق: ٢٠ يوليو

قيد التنفيذ

1مهمة واحدة
  • MAD-12عاجلة

    تحسين واجهات التخطيط

    توحيد البطاقات والمسافات وسلوك لوحة المفاتيح.
    تصميم
    تم الإسناد إلى نور علي
    ن
    نور علي
    44 تعليقات5/8تم إكمال 5 من 8 من بنود قائمة التحقق

مكتمل

1مهمة واحدة
  • MAD-10منجزة

    اجتماع بدء المشروع

    تم الإسناد إلى ليلى منصور
    ل
    ليلى منصور
    2مرفقان

Usage

tsx
import { KanbanBoard, type KanbanColumnData } from "madagent";

const columns: KanbanColumnData[] = [
  { id: "backlog", title: "قائمة الانتظار", cards: backlogCards },
  { id: "progress", title: "قيد التنفيذ", tone: "accent", cards: activeCards },
  { id: "done", title: "مكتمل", tone: "positive", cards: completedCards },
];

<KanbanBoard
  defaultColumns={columns}
  defaultSelectedCardId="design"
  aria-label="لوحة إطلاق المنتج"
/>