Skip to main content

Key Features

SVAR React Kanban is a React task board component for work that moves through stages. It renders columns and cards with familiar drag-and-drop, while your React app stays in control via props, actions, and event hooks.

Full-featured kanban board with cards showing priority badges, tags, progress bars, user avatars, and deadlines

Board Layout and Drag-and-Drop​

The board renders a horizontal row of columns. Each column has a header and a vertical list of cards. Users drag cards between columns or reorder them within one - every drag fires a move-card action the host can observe, validate, or cancel.

You don't have to declare columns up front. Leave the prop out and the board builds one column per distinct column value found on the cards. In the Pro version, swimlanes add a second grouping axis: horizontal lanes that cross every column. On narrow screens, the stack layout turns the board into a single vertical column.

Two scroll modes control overflow. The default gives each column its own vertical scrollbar. render.columnScroll switches to a single horizontal scroll across all columns. Lock column width with render.fixedColumnWidth or leave it flexible. Any column can also take its own fixed pixel width.

Columns also support a collapsed state (shrinks to a narrow header) and an addCard flag (shows a per-column create button).

Card Customization​

Cards display a configurable set of sections: cover image, priority badge, title, description snippet, progress bar, deadline, tags, user avatars, attachment and comment counts, and a menu trigger. The card prop takes a CardShape object that toggles each section and passes section-specific options - priority data, user lists, tag limits, deadline format.

When the built-in sections aren't enough, cardContent accepts a custom React component (not a render function) that replaces the card body entirely. The wrapper, selection state, and drag behavior stay intact.

You can also add content around the cards. The cardListStart and cardListEnd components render above and below the cards of each column, and column summary tags (ColumnConfig.summaries) show computed values such as counts in the column header. Both are covered in Columns.

For visual styling, the cardCss callback returns CSS class names per card based on its data. You can also set a static css value directly on a card object.

Columns​

A column is a config object with an id, a label, and optional settings: width, collapsed, addCard, a header ⋯ button (menu), and any custom keys your app needs, such as wipLimit. Custom keys travel with the column, so styling callbacks, slots, and menus can read them.

Column summaries show computed values in the header. Each entry in summaries calculates a value from the column's cards and renders it as a tag. A WIP limit, for example, is a summary that counts cards and returns a warning CSS class when the count goes over wipLimit.

The cardListStart and cardListEnd components put your own content above and below the cards: a quick-add form, a "load more" button, an empty-state hint. They aren't cards, so users can't drag them.

For per-column CSS, set a static css on the column config or return class names from the columnCss callback. The callback gets the cards of the styled element, so the class can depend on the column's content. See Columns for the details.

Swimlanes​

Swimlanes (Pro) group cards a second time, into horizontal lanes stacked across all columns. Pass swimlanes to declare the lanes, or leave it out and the board infers them from the cards. swimlaneAccessor reads lane membership the same way columnAccessor reads columns. Users can drag cards across lanes and collapse each lane on its own. See Swimlanes.

Editing and History​

Clicking a card fires select-card, which populates the store's editor state. The Editor component mounts as a sidebar, modal, or inline form and commits changes back through update-card. The default field set covers label, description, priority, progress, deadline, tags, and users. To add custom field components - comments, checklists, file pickers - register them with registerEditorItem and reference them by name.

If you'd rather show a popup instead of the editor, the cardPopup prop swaps in a custom component that receives the card data and a close callback.

Menus live outside the board, in four wrapper components around <Kanban>:

Card menus come with edit, duplicate, and delete; column menus come with add card. You can add custom entries and gate a menu per card or column with resolver and filter callbacks. ContextMenu still works, but only as a deprecated alias of CardContextMenu. See Menus.

Undo and redo are available in the Pro version. Set history to true and mutating actions start pushing state snapshots. The Toolbar component exposes undo/redo buttons that enable and disable reactively based on the history stack.

Filtering, Sorting, and Grouping​

Filters are predicate functions keyed by a tag string, so multiple independent filters can stack. Pass an initial set through the filters prop; change them at runtime with filter-cards. External filter widgets from @svar-ui/react-filter drive the board through the same action.

Sorting accepts a comparator function, a { field, dir } descriptor, or null to clear. The Toolbar offers a built-in sort menu for label and priority in both directions.

Grouping works by swapping columnAccessor. By default it reads a column field from each card. Point it at another field - or supply a { get, set } pair - and the board regroups by that dimension (priority, assignee, status) without being recreated.

Performance​

For large boards, turn on virtualization. render.virtualizeCards renders only the cards visible within each column's scroll area. render.virtualizeColumns does the same horizontally. Tuning parameters - estimatedCardHeight, cardOverscan, columnOverscan - control measurement and buffer sizes.

Dynamic column loading (Pro) defers card fetching until a column scrolls into view. The board emits request-data for each unloaded column; the host fetches and answers with provide-data. This keeps the initial payload small when you have many columns.

Responsive​

The board layout needs horizontal space. For phones, set render.layout to "stack" and the board becomes a single vertical list of groups, one per column (or per column and lane when swimlanes are on). Group headers stick to the top while you scroll. Drag-and-drop is off in this layout, but clicks, menus, and the editor work as usual.

The widget doesn't detect the screen size. Your app picks the breakpoint and passes the resolved value:

<Kanban cards={cards} columns={columns} render={{ layout: narrow ? "stack" : "board" }} />

See Stack layout.

Integration Surface​

The board exposes its API through the init callback. You get state access (getState, getReactiveState, getCards), action dispatch (exec), and an event bus (on, intercept, detach) for reacting to or canceling any action.

For backend persistence, RestDataProvider maps card, column, and swimlane actions to REST endpoints under a configurable URL root. Attach it in init with api.setNext(provider) and call provider.getData() for the initial load. For live multi-user boards, KanbanEventBridge listens to server-sent events and replays other users' changes into the board. See Working with server.

GroupManager (Pro) is a ready-made panel for adding, renaming, reordering, and deleting columns and swimlanes.

External drag-in (Pro) lets users drop elements from outside the board as new cards. Your app handles the native drag events and keeps the cardProjection descriptor up to date; the board shows where the card will land. See External drag.

readonly mode disables the board's built-in mutating interactions - drag, create, edit. The toolbar and menus live outside <Kanban>, so your app gates them. Use this mode for dashboards and reports.

Export (Pro) covers PDF, PNG, and XLSX through the export-data action. The ExportPopup component gives users a UI for picking format and options. ExcelImport handles inbound spreadsheet data.

Localization works by wrapping the widget in a Locale component with merged dictionaries from @svar-ui/kanban-locales and @svar-ui/core-locales. To apply a theme, add <Willow /> or <WillowDark /> at your app root. The Print and PrintBW themes (color and black-and-white) are for printed and exported output.