Database
Views Menu & New View
The “N more…” list of views and the “Add a new view” layout grid that opens beside it.
Usage
- Use
ViewsMenuwhen a database has more views than fit in the tab row (“N more…”). - Open
NewViewMenubeside it (or on its own) to add a view; only supported layouts callonSelect. - Set
newViewHighlightedwhile the grid is open so people see where it came from. - Don’t use the views menu for navigation between pages; use the sidebar or breadcrumbs instead.
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/ViewsMenuNewViewExample.tsx
Examples
New view grid
Add a new view
New view highlighted
Composition
anatomy
API Reference
ViewsMenu
Based on <div> (except onSelect). Adds:
| Prop | Type | Default |
|---|---|---|
views | View[] | |
activeViewId | string | |
onSelect | (view: View) => void | |
onNewView | () => void | |
newViewHighlighted | boolean | false |
NewViewMenu
Based on <div> (except onSelect). The cells come from newViewLayouts.
| Prop | Type | Default |
|---|---|---|
onSelect | (type: ViewType) => void | |
highlighted | string |
Accessibility
- View rows are
role="option"witharia-selectedfor the active view; ArrowUp/ArrowDown and Enter (useMenuKeys). - Grid cells are buttons in a
role="grid"; layouts this package does not render (Dashboard, Feed, Map, Form) arearia-disabled.
© 2026 Motion. Internal documentation.