Menus
Menu
This component is used to display content or options in a floating panel.
Height Transition
Section titled Height TransitionThe --menu-height
CSS variable is exposed to enable creating smooth height transitions. The
data-transition="height"
attribute will be present when the transition is active:
Submenus
Section titled SubmenusSubmenus can be easily created by nesting menus like so:
API Reference
Section titled API ReferenceRoot
Section titled RootHTMLAttributes
Ref<MenuInstance>
Root menu container used to hold and manage a menu button and menu items. This component is used to display options in a floating panel. They can be nested to create submenus.
Props
Section titled PropsCallbacks
Section titled CallbacksInstance
Section titled InstanceData Attributes
Section titled Data AttributesButton
Section titled ButtonHTMLAttributes<HTMLButtonElement>
Ref<HTMLButtonElement>
A button that controls the opening and closing of a menu component. The button will become a
menuitem
when used inside a submenu.
Props
Section titled PropsCallbacks
Section titled CallbacksData Attributes
Section titled Data AttributesPortal
Section titled PortalHTMLAttributes
Ref<HTMLElement>
Portals menu items into the given container.
Props
Section titled PropsData Attributes
Section titled Data AttributesItems
Section titled ItemsHTMLAttributes
Ref<HTMLElement>
Used to group and display settings or arbitrary content in a floating panel.
Props
Section titled PropsData Attributes
Section titled Data AttributesItem
Section titled ItemHTMLAttributes
Ref<HTMLElement>
Represents a specific option or action, typically displayed as a text label or icon, which users can select to access or perform a particular function or view related content.
Props
Section titled PropsCallbacks
Section titled CallbacksRadioGroup
Section titled RadioGroupHTMLAttributes
Ref<RadioGroupInstance>
A radio group consists of options where only one of them can be checked. Each option is provided as a radio (i.e., a selectable element).
Props
Section titled PropsCallbacks
Section titled CallbacksInstance
Section titled InstanceRadio
Section titled RadioHTMLAttributes
Ref<HTMLElement>
A radio represents a option that a user can select inside of a radio group. Only one radio can be checked in a group.