{/*
* _____ _
*|_ _|_ _____ _ __ | |_ _ _
* | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file
* | | \ V V / __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten
* |_| \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs
* |___/
*
* This file is generated from the documentation data in packages/twenty-ui/generated.
* To update it, edit the component prop types or design tokens in twenty-ui and run:
* npx nx generate:ui twenty-docs
*/}
### Menu.Root
A ref to imperative actions.
- `unmount`: Manually unmounts the menu.
Call this after any externally controlled closing animation finishes.
- `close`: When specified, the menu can be closed imperatively.
The content of the menu.
This can be a regular React node or a render function that receives the `payload` of the active trigger.
When in a submenu, determines whether pressing the Escape key
closes the entire menu, or only the current child menu.
Whether the menu is initially open.
To render a controlled menu, use the `open` prop instead.
ID of the trigger that the menu is associated with.
This is useful in conjunction with the `defaultOpen` prop to create an initially open menu.
Whether the component should ignore user interaction.
A handle to associate the menu with a trigger.
If specified, allows external triggers to control the menu's open state.
Whether moving the pointer over items should highlight them.
Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.
Whether to loop keyboard focus back to the first item
when the end of the list is reached while using the arrow keys.
Determines if the menu enters a modal state when open.
- `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.
- `false`: user interaction with the rest of the document is allowed.
On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.
Nested menus ignore this prop, and menus opened by hover are never modal.
Event handler called when the menu is opened or closed.
Event handler called after any animations complete when the menu is opened or closed.
Whether the menu is currently open.
The visual orientation of the menu.
Controls whether roving focus uses up/down or left/right arrow keys.
ID of the trigger that the menu is associated with.
This is useful in conjunction with the `open` prop to create a controlled menu.
There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set).
### Menu.Trigger
CSS class applied to the element, or a function that
returns a class based on the component's state.
How long to wait before closing the menu that was opened on hover.
Specified in milliseconds.
Requires the `openOnHover` prop.
How long to wait before the menu may be opened on hover. Specified in milliseconds.
Requires the `openOnHover` prop.
Whether the component should ignore user interaction.
A handle to associate the trigger with a menu.
Whether the component renders a native `` element when replacing it
via the `render` prop.
Set to `false` if the rendered element is not a button (for example, ``).
Whether the menu should also open when the trigger is hovered.
A payload to pass to the menu when it is opened.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.Popup
Alignment of the popup along the anchor. Defaults to `start`.
Offset in pixels along the alignment axis. Defaults to `0` for a menu and
`-4` for a submenu.
Element or position the popup is anchored to. Defaults to the trigger.
CSS class applied to the element, or a function that
returns a class based on the component's state.
Element the popup is portaled into. Defaults to the theme's portal
container.
Determines the element to focus when the menu is closed.
- `false`: Do not move focus.
- `true`: Move focus based on the default behavior (trigger or previously focused element).
- `RefObject`: Move focus to the ref element.
- `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
Keeps the popup mounted in the DOM while the menu is closed.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Side of the anchor the popup is placed on. Defaults to `bottom` for a menu
and `inline-end` for a submenu.
Distance in pixels between the anchor and the popup. Defaults to `8` for a
menu and `0` for a submenu.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.Item
CSS class applied to the element, or a function that
returns a class based on the component's state.
Whether to close the menu when the item is clicked.
Color of the text and icons. `danger` marks a destructive action.
Supporting text, placed according to `descriptionPlacement`.
Where the description renders: inline after the content or at the end of
the row.
Whether the component should ignore user interaction.
Icon rendered after the content.
Keyboard shortcut keys displayed at the end of the row. Registering the
shortcut is up to the application.
Overrides the text label to use when the item is matched during keyboard text navigation.
Whether the component renders a native `` element when replacing it
via the `render` prop.
Set to `true` if the rendered element is a native button.
The click handler for the menu item.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Icon rendered before the content.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.CheckboxItem
Whether the checkbox item is currently ticked.
To render an uncontrolled checkbox item, use the `defaultChecked` prop instead.
CSS class applied to the element, or a function that
returns a class based on the component's state.
Whether to close the menu when the item is clicked.
Color of the text and icons. `danger` marks a destructive action.
Whether the checkbox item is initially ticked.
To render a controlled checkbox item, use the `checked` prop instead.
Supporting text, placed according to `descriptionPlacement`.
Where the description renders: inline after the content or at the end of
the row.
Whether the component should ignore user interaction.
Icon rendered after the content.
Keyboard shortcut keys displayed at the end of the row. Registering the
shortcut is up to the application.
Overrides the text label to use when the item is matched during keyboard text navigation.
Whether the component renders a native `` element when replacing it
via the `render` prop.
Set to `true` if the rendered element is a native button.
Event handler called when the checkbox item is ticked or unticked.
The click handler for the menu item.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Icon rendered before the content.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.RadioGroup
The content of the component.
CSS class applied to the element, or a function that
returns a class based on the component's state.
The uncontrolled value of the radio item that should be initially selected.
To render a controlled radio group, use the `value` prop instead.
Whether the component should ignore user interaction.
Function called when the selected value changes.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Style applied to the element, or a function that
returns a style object based on the component's state.
The controlled value of the radio item that should be currently selected.
To render an uncontrolled radio group, use the `defaultValue` prop instead.
### Menu.RadioItem
CSS class applied to the element, or a function that
returns a class based on the component's state.
Whether to close the menu when the item is clicked.
Color of the text and icons. `danger` marks a destructive action.
Supporting text, placed according to `descriptionPlacement`.
Where the description renders: inline after the content or at the end of
the row.
Whether the component should ignore user interaction.
Icon rendered after the content.
Keyboard shortcut keys displayed at the end of the row. Registering the
shortcut is up to the application.
Overrides the text label to use when the item is matched during keyboard text navigation.
Whether the component renders a native `` element when replacing it
via the `render` prop.
Set to `true` if the rendered element is a native button.
The click handler for the menu item.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Icon rendered before the content.
Style applied to the element, or a function that
returns a style object based on the component's state.
Value of the radio item.
This is the value that will be set in the MenuRadioGroup when the item is selected.
### Menu.Group
The content of the component.
CSS class applied to the element, or a function that
returns a class based on the component's state.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.GroupLabel
CSS class applied to the element, or a function that
returns a class based on the component's state.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.Separator
CSS class applied to the element, or a function that
returns a class based on the component's state.
The orientation of the separator.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Style applied to the element, or a function that
returns a style object based on the component's state.
### Menu.SubmenuRoot
A ref to imperative actions.
- `unmount`: Manually unmounts the menu.
Call this after any externally controlled closing animation finishes.
- `close`: When specified, the menu can be closed imperatively.
The content of the submenu.
When in a submenu, determines whether pressing the Escape key
closes the entire menu, or only the current child menu.
Whether the menu is initially open.
To render a controlled menu, use the `open` prop instead.
Whether the component should ignore user interaction.
Whether moving the pointer over items should highlight them.
Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.
Whether to loop keyboard focus back to the first item
when the end of the list is reached while using the arrow keys.
Event handler called when the menu is opened or closed.
Event handler called after any animations complete when the menu is opened or closed.
Whether the menu is currently open.
The visual orientation of the menu.
Controls whether roving focus uses up/down or left/right arrow keys.
### Menu.SubmenuTrigger
CSS class applied to the element, or a function that
returns a class based on the component's state.
How long to wait before closing the menu that was opened on hover.
Specified in milliseconds.
Requires the `openOnHover` prop.
Color of the text and icons. `danger` marks a destructive action.
How long to wait before the menu may be opened on hover. Specified in milliseconds.
Requires the `openOnHover` prop.
Supporting text, placed according to `descriptionPlacement`.
Where the description renders: inline after the content or at the end of
the row.
Whether the component should ignore user interaction.
Icon rendered after the content.
Keyboard shortcut keys displayed at the end of the row. Registering the
shortcut is up to the application.
Overrides the text label to use when the item is matched during keyboard text navigation.
Whether the component renders a native `` element when replacing it
via the `render` prop.
Set to `true` if the rendered element is a native button.
Whether the menu should also open when the trigger is hovered.
Allows you to replace the component's HTML element
with a different tag, or compose it with another component.
Accepts a `ReactElement` or a function that returns the element to render.
Icon rendered before the content.
Style applied to the element, or a function that
returns a style object based on the component's state.