TaskCardBoard.tsx
My CRM-style trello task board I built in React — configurable cards, swimlanes, with drag-and-drop.
A React task board I built for CRM-style workflows — draggable cards, swimlanes, deal metadata, and meeting invitees. The TaskCard is portable: drop it into any Next.js or React app and wire up props instead of forking markup.
The live board below is fully interactive. Drag cards within or across columns, click a title to see the onTaskClick payload, or open the large board in full screen for seven swimlanes and a heavier task load.
Live board
4 swimlanes · 32 tasks · drag within or across columns
Loading board…
Configuration reference
Props and data fields supported in this demo, with allowed values and defaults where they apply.
TaskCard props
Per-card behavior and presentation.
taskTask object rendered on the card.
Options: See task data fields below
indexZero-based position inside a droppable lane (required for drag-and-drop).
Options: 0 … n−1 within the lane
compactDense layout for portfolio embeds or crowded boards.
Options: true | false
Default: false
localeIntl locale for currency formatting on opportunity pills.
Options: Any BCP 47 tag, e.g. en, en-CA, fr-CA, de-DE
Default: en-CA
visibleControls enter/leave transition independent of filter state.
Options: true | false
Default: true
isDragDisabledDisables dragging while keeping the card in the board.
Options: true | false
Default: false
onTaskClickCalled when the task title is clicked. The demo surfaces the full event payload (task, laneId, laneName) in the panel above the board.
Options: (taskId: string) => void · event shape: { type, taskId, laneId, laneName, task }
Default: undefined
opportunityHrefBuilds the link target for the deal name pill.
Options: (opportunityId: string) => string
Default: () => "#"
inviteesLabelLabel shown before meeting attendee avatars.
Options: string
Default: "Invitees"
Board props
Composes lanes, drag context, and multiple TaskCards.
presetDemo data density for this showcase.
Options: compact (4 lanes × 8 tasks) | fullscreen (7 lanes × 18 tasks)
Default: compact
layoutHow swimlanes are arranged on screen.
Options: fit (equal-width flex, 4-up on wide screens) | scroll (horizontal scroll)
Default: scroll
compactPassed through to every TaskCard in the board.
Options: true | false
Default: false
onTaskSelectOptional board-level handler with the full selection event object.
Options: (event: SelectedTaskEvent) => void | undefined
showSelectionPanelShow or hide the onTaskClick event payload panel.
Options: true | false
Default: true
Task data fields
Shape your API or mock data to match what the card reads.
task.idStable unique id; also used as react-beautiful-dnd draggableId.
Options: string (unique across the board)
task.namePrimary title shown on the card.
Options: string
task.showWhen false, card animates out (pair with filters or toggles).
Options: boolean
Default: true
task.dueDateDue date row with overdue styling when past today.
Options: Date | undefined
task.taskTypeDrives accent bar colour, icon, type pill, and time format.
Options: taskTypeName: todo | calendar | email · label · icon URL · colour (hex/CSS)
task.tagsExtra colored pills below the type pill.
Options: Array<{ label: string; variant: PillVariant }> · 0–n per card
task.inviteesAvatar stack on calendar-type tasks only.
Options: Array<{ id: string; name: string }> · 0–n (overflow shows +N)
task.opportunityForecast and deal pills at the bottom of the card.
Options: { name: string; forecastValue: number } + optional opportunityId for links
Pill variants (tags & styling)
Use on task.tags or match built-in type/opportunity pills.
PillVariantColor theme for tag and metadata pills.
Options: default · money · deal · meeting · email · task · urgent · stage · account
Built-in mappingType pill variant is chosen automatically from taskTypeName.
Options: calendar → meeting · email → email · todo → task