Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Data display

Table with filters

A members table with seat usage, saved view tabs with counts, search and a role filter, a density switch, status pills, two-factor state, bulk actions, row menus, pagination, and a list on phones and tablets.

bunx --bun @getweini/cli@latest add avatar button card data-table dropdown-menu empty-state icon-button pagination progress search-input skeleton tabs
Customize
  • Saved views are Tabs with live counts; each view pre-filters `members` by status before DataTable sees them. Add a view by adding its key to `views` and a label in `copy`.
  • From 1024px DataTable owns search, the role filter (a primary select filter on the Role column, with options derived from your data), sorting, selection, the bulk bar, and pagination. The density button switches the table between its `md` and `sm` sizes.
  • Below 1024px the table becomes a single list card with its own search, the same views, row menus and pagination. Both layouts emit `rowAction` from the same menu items, so one handler covers every width.
  • Status pills use one `statusStyle` map of subtle tokens plus a dot, and two-factor state pairs an icon with text, so color is never the only signal. The header shows seats used against `seatLimit`; suspended members do not take a seat.
  • Use `loading` while a request runs, `members: []` for the first-run empty state, and `initialSearch` to start with a query (the no-results state). Every visible string is in `copy`; DataTable text goes through `localeText`.
  • Selecting rows swaps the DataTable toolbar for its bulk bar. Add or rename bulk actions in `bulkActions`; each one emits `bulk` with the selected rows.