Database
Property Menu
The menu behind a table column header: rename, change type, filter, sort, group, hide, wrap, insert, duplicate, delete.
Usage
- Use
PropertyMenuas the popover behind a column header or a property label to rename, sort, filter, hide or delete a property. - Wire only the actions your product supports; rows without a handler still render, so pass the callbacks you need.
- Set
autoFocus={false}when the menu is shown inline (docs, previews) so it does not steal focus. - Don’t use it as a general-purpose menu; use
Menufor other actions.
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/PropertyMenuExample.tsx
Examples
Wired to a database
Inside TableView the menu is wired for you; on its own, handle the callbacks.
Pick an action
Composition
anatomy
API Reference
PropertyMenu
Based on <div> and supports its props (except onChange). Adds:
| Prop | Type | Default |
|---|---|---|
property | Property | |
onRename | (name: string) => void | |
onChangeType | (type: PropertyType) => void | |
onFilter | () => void | |
onSort | (direction: 'ascending' | 'descending') => void | |
onGroup | () => void | |
onHide | () => void | |
onInsert | (side: 'left' | 'right') => void | |
onDuplicate | () => void | |
onDelete | () => void | |
wrap | boolean | |
onToggleWrap | () => void | |
autoFocus | boolean | true |
Accessibility
role="menu"surface; ArrowUp/ArrowDown move between rows, Enter/Space activate (useMenuKeys).- The name input is labelled "Property name" and focused on open (
autoFocus); Enter commits, keys typed there do not move the menu.
© 2026 Motion. Internal documentation.