#760
Leads pipeline
A three-stage leads pipeline board: status-coloured columns that scroll on their own, cards that move between columns by drag, keyboard or a Move to menu, and a New column that loads more pages.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Leads pipeline" pattern (@codeatlasdev/ui demo #760, display/kanban) in my app.
Call get_demo({ ids: ["#760"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: CRM pipelines, ticket boards and any stage board whose columns are ordered by the server and keep loading as you scroll.
Keep these library parts, with the props and tokens the demo uses:
- Kanban, KanbanColumn, KanbanMove from "@codeatlasdev/ui"
Behaviour to keep:
- `<Kanban {columns} getId={(l) => l.id} {onmove} {onloadmore} label="Leads pipeline">` inside `<div class="kb-demo">` with `{#snippet card(lead)}` for the card content
- `.kb-demo { display: flex; height: 28rem; }` is the board-height parent
- Each column is `{ id: 'new', label: 'New', color: 'var(--ca-info-main)', total: 24, hasMore: true, items`; the New column has 24 loaded-on-demand leads
- `onmove` receives `{ card, from, to }`; the default whole-column drop makes the target index 0, so the handler prepends the card with `dst.items = [card, ...dst.items]`
- `onloadmore` sets `col.loadingMore` to show skeleton cards, then appends the next page
- `{#snippet empty(column, { canMove })}` fills the empty Won column
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Kanban
@codeatlasdev/ui
How it is built
- `<Kanban {columns} getId={(l) => l.id} {onmove} {onloadmore} label="Leads pipeline">` inside `<div class="kb-demo">` with `{#snippet card(lead)}` for the card content
- `.kb-demo { display: flex; height: 28rem; }` is the board-height parent
- Each column is `{ id: 'new', label: 'New', color: 'var(--ca-info-main)', total: 24, hasMore: true, items`; the New column has 24 loaded-on-demand leads
- `onmove` receives `{ card, from, to }`; the default whole-column drop makes the target index 0, so the handler prepends the card with `dst.items = [card, ...dst.items]`
- `onloadmore` sets `col.loadingMore` to show skeleton cards, then appends the next page
- `{#snippet empty(column, { canMove })}` fills the empty Won column
Related
Loading source.