Database
Database View
The database block: title, view tabs (with “N more…”), toolbar (filter, sort, search, settings, New) and the active layout.
Tasks
4
2
2
Usage
- Use
DatabaseViewto embed a full database block (title, view tabs, toolbar, layout) in a page. - Pass
dbfromuseDatabase()when other parts of the page read or write the same rows; passdatafor a self-contained block. - Pass
onOpenRowand render the shell’sSidePeekfor the full page chrome; the built-in row peek is a minimal fallback. - Use
hideTitlewhen the surrounding page already shows the database name. - Don’t use
DatabaseViewfor a read-only grid of figures; useTableorDataTableinstead.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/DatabaseViewExample.tsx
Examples
Filter menu open
defaultOpenMenu opens one toolbar menu on mount (docs and lab use it to show menu states).
Tasks
Design tokens audit
High
Design
October 2, 2026
Sidebar rebuild
High
Frontend
October 9, 2026
Command palette
Medium
Frontend
October 12, 2026
Docs shell
Medium
Docs
October 16, 2026
Icon extraction
Low
Design
October 20, 2026
Database views
High
Frontend
October 23, 2026
Screenshot diffing
Low
QA
September 28, 2026
Release notes
Low
Docs
October 30, 2026
Active filter and sort
A view with rules shows the rule pills under the toolbar; the toolbar icons turn blue.
Tasks
Sidebar rebuild
High
Frontend
October 9, 2026
Command palette
Medium
Frontend
October 12, 2026
Docs shell
Medium
Docs
October 16, 2026
Icon extraction
Low
Design
October 20, 2026
Database views
High
Frontend
October 23, 2026
Release notes
Low
Docs
October 30, 2026
Custom row opening
Pass onOpenRow to open rows in your own peek or route instead of the built-in one.
Tasks
Opened: nothing yet
Without title
Full-page databases show the page title instead: hideTitle.
Composition
anatomy
API Reference
DatabaseView
Pass data (uncontrolled) or db (controlled useDatabase() instance).
| Prop | Type | Default |
|---|---|---|
data | DatabaseData | |
db | DatabaseApi | |
initialViewId | string | first view |
width | number | 720 |
bleed | { left: number; right: number } | |
today | string | |
onOpenRow | (row: Row) => void | built-in peek |
defaultOpenMenu | "filter""sort""settings""views""new-view""new""filter-add" | |
viewProps | Record<string, unknown> | |
hideTitle | boolean | false |
className | string | |
style | CSSProperties |
Accessibility
- View tabs:
role="tablist"ofrole="tab"buttons witharia-selected; Tab moves between them, Enter/Space switches view. - Toolbar buttons are icon buttons with
aria-labelandtitle(Filter, Sort, Automations, AI Autofill, Search, Open as full page, Settings, More add options). - Menus open in Radix popovers: Escape closes, focus returns to the trigger; inside, ArrowUp/ArrowDown move and Enter selects. Search field: Escape clears and closes.
- The row peek is a
role="dialog"labelled by the page title; Escape closes it.
© 2026 Motion. Internal documentation.