Skip to main content

GroupManager

PRO

The functionality is available in PRO Edition only

Panel for managing the board's columns and swimlanes. Users can rename, reorder, add, and delete groups. The panel dispatches the structural actions (add-column, move-column, delete-column, and their swimlane counterparts) and uses update-column / update-swimlane for renames. It never moves or deletes cards.

import { GroupManager } from "@svar-ui/svelte-kanban";

Usage​

<Kanban bind:this={api} {cards} {columns} {swimlanes} />
{#if open && api}
<GroupManager
{api}
placement="sidebar"
swimlanes
onclose={() => (open = false)}
/>
{/if}

Props​

Props type: GroupManagerProps.

PropTypeDefaultDescription
apiKanbanInstanceApi | nullnullKanban instance to manage. With null, the panel renders empty and inactive
placement"inline" | "sidebar" | "modal" | "popup""inline"Where the panel renders
parentHTMLElement-Anchor element for the "popup" placement
swimlanesbooleanfalseShows tabs to switch between the column list and the swimlane list
readonlybooleanfalseHides add/delete controls and disables rename and reorder
onclose() => void-Called by the header close button and on container cancel

Placement values:

  • "inline" - (default) renders in the normal document flow
  • "sidebar" - slide-in panel inside the nearest relatively positioned container
  • "modal" - centered dialog
  • "popup" - popup attached to parent

The host controls visibility with {#if}. With swimlanes, the swimlane tab stays available even when the board has no lanes.

Interactions​

  • Click a label or press Enter on a focused row to rename. Enter or blur commits a non-empty changed label; Escape or whitespace-only input cancels.
  • Drag the row handle or press Alt+ArrowUp / Alt+ArrowDown to reorder.
  • Add creates the group immediately and focuses its label input.
  • Delete removes the group configuration immediately. Cards keep their column/swimlane values.
  • Each row shows a card count with active filters applied. Cards that point to a missing group appear in a notice. Its button restores the missing ID with a label only; other config isn't restored.

Structural changes reset undo/redo history. On a board where columns or swimlanes are inferred from cards, pass explicit arrays to keep groups that have no cards. With RestDataProvider attached through setNext, the provider sends every change to the column and swimlane endpoints.

Example​

<script>
import { Kanban, GroupManager } from "@svar-ui/svelte-kanban";

const columns = [
{ id: "todo", label: "To do" },
{ id: "doing", label: "In progress" },
{ id: "done", label: "Done" },
];
const swimlanes = [
{ id: "product", label: "Product" },
{ id: "platform", label: "Platform" },
];
const cards = [
{ id: 1, label: "Spec", column: "todo", swimlane: "product" },
{ id: 2, label: "API", column: "doing", swimlane: "platform" },
];

let api = $state();
let open = $state(false);
let anchor = $state();
</script>

<button bind:this={anchor} onclick={() => (open = !open)}>Manage groups</button>

<Kanban bind:this={api} {cards} {columns} {swimlanes} />
{#if open && api}
<GroupManager
{api}
placement="popup"
parent={anchor}
swimlanes
onclose={() => (open = false)}
/>
{/if}