Recipes¶
Use these patterns when you know the kind of product you want to build and want a practical starting point.
Executive dashboard¶
Use:
GridCardStatTableAreaChartBarChartDateRangePickerMultiSelectDrawer
Good examples:
Chatbot workspace¶
Use:
ChatMessageChatInputCardToastDrawerTimelineAccordionBreadcrumbs
Recommended pattern:
- Keep the conversation in
use_state. - Use
Cardblocks for user and assistant messages. - Use a
Drawerfor traces, sources, or tool results. - Use
Toastfor completion or send-state feedback. - Use
ChatInput.on_submitfor the action that calls your model, job, or backend route.
Landing page or internal product site¶
Use:
CardGridSparklineStatAccordionTimelineButtonBadge
Recommended pattern:
- Lead with a hero
Card. - Use a 3-column feature grid.
- Add a roadmap
Timeline. - Use
Accordionfor FAQ. - Keep the theme calm and whitespace-heavy.
Pipeline command center¶
Use:
PipelineGraphStatusStripGaugeChartComposedChartHeatmapScatterChartStatAreaChartBarChartDonutChartTableBreadcrumbsDateRangePickerMultiSelectDrawer
Recommended pattern:
- Start in mock mode.
- Keep every metric visible as plain values and charts.
- Add drilldown with row click or chart click.
- Use
empty_messageandloadingaggressively so the app stays honest while data loads. - Use
PipelineGraph.on_node_clickto open a drawer, select a node, or filter a table.
Pipeline graph plus triage board¶
Use:
PipelineGraphKanbanBoardDrawerTableAlert
Recommended pattern:
- Keep pipeline nodes as dictionaries with
id,label,layer, andstatus. - Keep edges as dictionaries with
fromandto. - Store the selected node in
use_state. - Send delayed or failed nodes into
KanbanBoardcolumns. - Use a
DrawerorCardto show details for the selected node/card.
selected, set_selected = db.use_state("No node selected")
db.PipelineGraph(
nodes=nodes,
edges=edges,
on_node_click=lambda node: set_selected(node["id"]),
)