Oihana Next UI - 0.9.0

Application logo

Kanban Component

Basic Board (uncontrolled — the « Done » column starts empty)

Backlog4
Design the landing pagemedium
Write the documentationlow
Fix the login bughigh
Update dependencieslow
To do2
Refactor the theme layermedium
Add keyboard shortcutslow
Doing1
Kanban componenthigh
Done0
<Kanban
    defaultColumns={ [ { id , title , items : [...] } , ... ] }
    renderCard={ card => <KanbanCard title={ card.title } /> }
/>
// cards reorder within a column and move across columns, even empty ones

Reorderable Columns (drag a column by its header)

Backlog4
Design the landing pagemedium
Write the documentationlow
Fix the login bughigh
Update dependencieslow
To do2
Refactor the theme layermedium
Add keyboard shortcutslow
Doing1
Kanban componenthigh
Done0
<Kanban
    reorderableColumns
    defaultColumns={ columns }
    onChange={ ( next , change ) => ... }
/>
// change.type : 'card' | 'column' — column moves carry { column , fromIndex , toIndex }

Project Board (rich cards : assignee, due date, tags)

To do2
Refonte de la page d'accueil
uiurgent
Assignee
12 Jul
Migration de la base
infra
Assignee
18 Jul
Doing1
Composant Kanban
dndui
Assignee
5 Jul
Review1
Pickers dans les modales
fix
Assignee
4 Jul
// renderCard composes freely with the library components
renderCard={ card => (
    <KanbanCard><Avatar ... /><Badge ... /></KanbanCard>
)}

Editable Board (add / remove cards — the board lives in your state)

Backlog4
Design the landing page
Write the documentation
Fix the login bug
Update dependencies
To do2
Refactor the theme layer
Add keyboard shortcuts
Doing1
Kanban component
Done0
<Kanban
    columns={ board } onChange={ next => setBoard( next ) }
    renderFooter={ column => <Button onClick={ () => addCard( column.id ) }>Add</Button> }
/>
// adding / removing cards is plain setState — the board is your data

Controlled Board (live column counts)

Board :Backlog : 4To do : 2Doing : 1Done : 0
Backlog4
Design the landing pagemedium
Write the documentationlow
Fix the login bughigh
Update dependencieslow
To do2
Refactor the theme layermedium
Add keyboard shortcutslow
Doing1
Kanban componenthigh
Done0
<Kanban
    columns={ board }
    onChange={ ( next , change ) => setBoard( next ) }
    renderCard={ card => <KanbanCard ... /> }
/>
// change = { item , fromColumn , toColumn , fromIndex , toIndex }

Async Change with API Call (optimistic revert on failure)

Backlog4
Design the landing pagemedium
Write the documentationlow
Fix the login bughigh
Update dependencieslow
To do2
Refactor the theme layermedium
Add keyboard shortcutslow
Doing1
Kanban componenthigh
Done0
<Kanban
    defaultColumns={ columns }
    onChange={ ( next , change ) => api.moveCard( change ) }
/>
// onChange may return a promise : a rejection restores the previous board

Props Reference

PropTypeDescription
columns / defaultColumnsArrayControlled / uncontrolled columns : [ { id , title , items : [...] } ] (stable ids)
onChangefunction(columns, { item, fromColumn, toColumn, fromIndex, toIndex }) => void | Promise — a rejected promise reverts the board (uncontrolled)
renderCardfunction(item, column, index) => KanbanCard element
renderHeader / renderFooterfunction(column) => custom column header / footer
getColumnId / getItemIdfunctionCustom accessors for identity (default to column.id / item.id)
reorderableColumnsbooleanAllow reordering the columns themselves by dragging their headers (change.type = 'column')
disabledbooleanDisable dragging for all cards