Skip to content
PixiKit

Menu

An action menu on a trigger button. Arrow keys, Home, End and typing move a soft highlight that slides between rows; Escape closes and returns focus to the trigger.

pixikit.com/docs/components/menu

Customize

Default open
Placement
Offset6px
Width232px
Close on select
Portal

Props

13
NameTypeDefaultDescription
triggerReactNode"Menu"What the trigger button shows. The button is owned by the menu.
itemsMenuEntry[]RequiredThe rows, separators and labels, in order.
openbooleanNoneWhether the menu is open, when you hold the state.
defaultOpenbooleanNoneWhether the menu is open at first, when the menu holds the state.
onOpenChange(open: boolean) => voidNoneCalled with the next open state.
placementPlacement"bottom-start"Where the menu sits around the trigger; it flips when there is no room.
offsetnumber6Gap in px between the trigger and the menu.
headerReactNodeNoneContent above the rows, such as an account name.
widthnumber224Width of the menu in px.
closeOnSelectbooleantrueCloses the menu after a row is chosen.
portalbooleantrueRenders the menu in a portal on the page body; turn off to keep it inline.
classNamestringNoneExtra classes for the menu panel.
triggerClassNamestringNoneExtra classes for the trigger button.

More interaction components in Pro

View all

Related