Recipes
Recipes
These examples are generated from the code snippets that power the interactive usage.py demo, so the documentation and local demo stay anchored to the same source.
Basic Formatting
Render plain records with formatted currency, progress, badges, links, and Mantine table styling.
Client-side Selection
Enable checkbox selection and read selected row IDs from a normal Dash callback prop.
Row Expansion
Attach expandable detail panels and inspect the expansion state emitted by the table.
Nested Tables
Use grouped rows and nested table structures for hierarchical datasets.
Async Nested Tables
Hydrate child rows from callbacks while preserving the same nested table interaction model.
Server Pagination and Sorting
Drive paging, sorting, and search from a callback that sends only the current slice of records.
Empty and Loading States
Swap data, fetching flags, loader props, and empty-state content from one table configuration.
Fixed-height Scrolling
Constrain the table body to a fixed viewport while keeping the header and pagination stable.
Infinite Scrolling
Append rows from a callback when the user scrolls to the bottom edge of a fixed-height table.
Table Properties
Apply common Mantine table props through the chainable update_table_properties helper.
Column Properties
Configure headers, widths, footers, responsive visibility, ellipsis, and custom cell presentation.
Column Filtering
Render Dash filter controls in column popovers and combine them with table filter state.
Column Dragging
Persist draggable and toggleable column preferences with a browser storage key.
Column Resizing
Enable user-resizable columns and preserve widths through the same column storage model.
Column Grouping
Group related columns under flat or nested headers with ColumnGroup and group_columns.
Row Properties
Style rows with Dash-safe selector rules for colors, classes, inline styles, and attributes.
Row Dragging
Enable Dash-native row reordering and inspect the emitted drag payload.
Row IDs
Use non-standard or composite record identifiers for selection, expansion, and drag state.
Row and Cell Clicks
Apply interactive affordances and handle rowClick and cellClick payloads in callbacks.
Inline Editing
Define DMC editor components directly on editable columns and preview edited records.
RTL Support
Switch a table into right-to-left layout while keeping pinning, alignment, and pagination coherent.
Advanced Controls
Compose selection, pagination, sorting, search, and layout helpers into one fluent table setup.
Stock Portfolio
Build a wider market-data table with grouped headers, editable tickers, sparklines, and currency columns.
Custom Components
Use Dash components for custom loaders and no-records states.