hydroxy

Kanban board

Columns of cards. Drag a card to reorder it or move it to another column, or pick it up with Space and move it with the arrow keys.

Press Space to pick up the card. Use the arrow keys to move it, Space to drop it, or Escape to cancel.

To do2

  • Tag the Q3 interviews
  • Import September tickets

In progress1

  • Draft the weekly digest

Done1

  • Check sources on the board update

Nothing moved yet.

Usage

use hydroxy_leptos::kanban::*;
use leptos::prelude::*;

fn board() -> Vec<KanbanColumn> {
    vec![
        KanbanColumn::new(
            "todo",
            "To do",
            vec![
                KanbanCard::new("interviews", "Tag the Q3 interviews"),
                KanbanCard::new("tickets", "Import September tickets"),
            ],
        ),
        KanbanColumn::new("doing", "In progress", vec![KanbanCard::new("digest", "Draft the weekly digest")]),
        KanbanColumn::new("done", "Done", vec![KanbanCard::new("sources", "Check sources on the board update")]),
    ]
}

pub fn demo() -> AnyView {
    // Controlled: the owner applies each move.
    let (columns, set_columns) = signal(board());
    let (last, set_last) = signal(String::from("Nothing moved yet."));

    view! {
        <div style="display: grid; gap: var(--space-4);">
            <KanbanBoard
                columns=columns
                on_move=move |mv: KanbanMove| {
                    set_last.set(format!("{} → {} at {}", mv.from, mv.to, mv.index));
                    set_columns.update(|cols| apply_move(cols, &mv));
                }
            />
            <p>{last}</p>
        </div>
    }
    .into_any()
}

Anatomy

Componentdata-partRenders
KanbanBoardrootGrid of columns. data-dragging while a card is moving
KanbanBoardcolumn<section> per column
KanbanBoardheader, count<h3> that names the list, with the card count
KanbanBoardlist<ul role=list> drop zone. data-drop-end when a drag would land at the end
KanbanBoardcard<li role=listitem draggable tabindex=0>. data-grabbed while moving, data-drop-before when a drag would land above it
KanbanBoardinstructionsVisually hidden keyboard help, linked from every card by aria-describedby
KanbanBoardliverole=status region that announces pick-up, moves, drop and cancel

Keyboard

KeyDoes
SpacePicks up the focused card, or drops the card you're carrying
ArrowUp / ArrowDownMoves the card up or down its column
ArrowLeft / ArrowRightMoves the card to the previous or next column
EscapePuts the card back where it started
TabMoves between cards

Props

PropTypeNotes
columnsOption<Vec<KanbanColumn>>Controlled layout. Pair with on_move and apply_move
default_columnsVec<KanbanColumn>Initial layout when uncontrolled
on_moveCallback<KanbanMove>Called when a card lands somewhere new: card, from, to, index
cardCallback<KanbanCard, AnyView>Renders a card's content. Default: its title
disabledboolBlock every move
Actions
Button
Icon button
Toolbar
Theme menu
Display
Avatar
Badge
Card
Chip
Code block
Markdown
Doc card
Due pill
Kbd
Priority mark
Source chip
Space icon
Status diamond
Tag
Value diff
Carousel
Reveal
Media timeline
QR code
Transcript viewer
Audio waveform
Audio player
Forms
Calendar
Checkbox
Combobox
Date picker
Color picker
Cron builder
Theme editor
Mention input
Signature pad
Image cropper
Date field
Date range picker
Duration field
Quantity stepper
Filter chip
Input
Markdown editor
Radio group
Search field
Segmented control
Select
Slider
Range slider
Rating
Toggle button
File dropzone
Upload queue
Attachment
Switch
Tags input
Number field
Money field
Phone field
Time field
OTP input
Password field
Questionnaire
Availability picker
Voice input
Recording control
Inline edit
Async validated input
Shortcut recorder
Data
Spreadsheet grid
Week scheduler
Virtual list
Stat card
Step track
Kanban board
Sortable list
Filter builder
Data table
Grid
Access editor
File manager
Gantt chart
Log stream
Diff viewer
JSON inspector
Terminal
Node editor
Whiteboard
Navigation
Table of contents
Breadcrumb
Tabs
Wizard
Nav item
Nav section
Tree view
Pagination
Menubar
Navigation menu
Saved views
Layout
Master detail
App shell
Sidebar layout
Resizable panels
Dashboard layout
Dock layout
Feedback
Callout
Check list
Empty state
Progress bar
Toast
Approval card
Skeleton
Notification center
Bars
Bar chart
Diverging bar chart
Span chart
Pictogram chart
Stacked bar chart
Funnel chart
Bullet chart
Waffle chart
Marimekko chart
Dot plot chart
Error bar chart
Pareto chart
Waterfall chart
Lollipop chart
Grouped bar chart
Bar race chart
KPIs and frames
Chart frame
Metric card
Sparkline
Points
Scatter chart
Smith chart
Strip plot
Beeswarm chart
Parallel coordinates
Ternary chart
Bland-Altman chart
Quiver chart
Connected scatter chart
Grids and tables
Heatmap chart
Chart table
Cohort chart
Radial
Radial charts
Radar chart
Polar area chart
Stat ring
Clock chart
Spiral chart
Lines and areas
Bump chart
Slope chart
Line chart
Composed chart
Small multiples
Cycle plot chart
Horizon chart
Stacked area chart
Threshold chart
Split line chart
Linked charts
Confidence band chart
Forecast fan chart
Step chart
Range area chart
Distributions
Contour chart
Histogram
Box plot
Density chart
Ridgeline chart
Violin chart
Q-Q chart
Survival chart
ECDF chart
Raincloud plot
Forest plot
Maps
Geo map
Bubble map
Hexbin map
Cartogram
Flow map
Parts of a whole
Donut chart
Voronoi treemap
Nested donut chart
Treemap chart
Sunburst chart
Bubble pack chart
Icicle chart
Flame graph chart
Pie chart
Word cloud
Relationships
Sankey chart
Network chart
Chord chart
UpSet chart
Venn chart
Alluvial chart
Adjacency matrix chart
Dependency graph chart
Tree chart
Arc diagram
Hive plot
Edge bundling
Finance
Candlestick chart
OHLC chart
Depth chart
Renko chart
Time
Timeline chart
Calendar heatmap chart
Spectrogram chart
Marey chart
Overlays
Tour
Lightbox
Alert dialog
Command palette
Dialog
Menu
Popover
Tooltip
Sheet
Hover card
Context menu
Utilities
Pacer
Hotkeys
Disclosure
Accordion
Collapsible
Chat
Chat bubble
Voice session
Composer
Thread
Thread list
Assistant composer
Assistant MCP
Assistant modal
Assistant thread
Assistant thread list
Message scroller
Insight note
Emoji picker
Tool trace
Model picker
Citation popover
Activity
Activity feed
Comment thread
Timeline
Presence bar
Live cursors
Reaction bar
Guides
Getting started
All components
All charts