Elements

Reference

Menu

Menu, dressed in the paper-and-ink system: a quiet paper vessel on elevation, hover as light on the row, checked items as the flat ink fill. The parts — Root, Trigger, ContextTrigger, Indicator, Positioner, Content, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel, TriggerItem, Separator, Arrow, ArrowTip. Ark's namespace is frozen — spread copies the members as data properties so Root can be the sized wrapper and Content carries the rung while the rest stay Ark's own parts.

Arrow · ArrowTip · Content · ContextTrigger · Indicator · Item · ItemGroup · ItemGroupLabel · ItemIndicator · ItemText · Positioner · Separator · Trigger · TriggerItem

#ArrowTip

A styled part — no props of its own; it takes the anatomy's shared styling.

#Arrow

A styled part — no props of its own; it takes the anatomy's shared styling.

#CheckboxItem

EventPayload
update:checkedvalue: boolean

#Content

A styled part — no props of its own; it takes the anatomy's shared styling.

#ContextTrigger

A styled part — no props of its own; it takes the anatomy's shared styling.

#Indicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemContext

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemGroupLabel

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemGroup

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemIndicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemText

A styled part — no props of its own; it takes the anatomy's shared styling.

#Item

PropTypeDefaultDescription
closeOnSelectboolean | undefinedWhether the menu should be closed when the option is selected.
disabledboolean | undefinedWhether the menu item is disabled
valuestringThe unique value of the menu item option.
valueTextstring | undefinedThe textual value of the option. Used in typeahead navigation of the menu. If not provided, the text content of the menu item will be used.
EventPayload
select—

#Positioner

A styled part — no props of its own; it takes the anatomy's shared styling.

#RadioItemGroup

PropTypeDefaultDescription
idstring—
modelValuestring—
EventPayload
update:modelValuevalue: string

#RadioItem

A styled part — no props of its own; it takes the anatomy's shared styling.

#Root

PropTypeDefaultDescription
sizeString as PropType<"sm" | "md" | "lg">"md"One rung of the control-height ladder for the vessel's rows.
anchorPointmenu.PointThe positioning point for the menu. Can be set by the context menu trigger or the button trigger.
aria-labelstringThe accessibility label for the menu
closeOnSelectbooleantrueWhether to close the menu when an option is selected
compositebooleantrueWhether the menu is a composed with other composite widgets like a combobox or tabs
defaultHighlightedValuestringThe initial highlighted value of the menu item when rendered. Use when you don't need to control the highlighted value of the menu item.
defaultOpenbooleanThe initial open state of the menu when rendered. Use when you don't need to control the open state of the menu.
defaultTriggerValuestring | nullThe initial trigger value when rendered. Use when you don't need to control the trigger value.
highlightedValuestringThe controlled highlighted value of the menu item.
idstringThe unique identifier of the machine.
idsPartial<{ trigger: string; contextTrigger: string; content: string; groupLabel(id: string): string; group(id: string): string; positioner: string; arrow: string; }>The ids of the elements in the menu. Useful for composition.
loopFocusbooleanfalseWhether to loop the keyboard navigation.
navigate(details: menu.NavigateDetails) => voidFunction to navigate to the selected item if it's an anchor element
openbooleanThe controlled open state of the menu
positioningmenu.PositioningOptionsThe options used to dynamically position the menu
triggerValuestring | nullThe value of the trigger that currently open the menu
typeaheadbooleantrueWhether the pressing printable characters should trigger typeahead navigation
EventPayload
selectdetails: SelectionDetails
exitComplete—
openChangedetails: OpenChangeDetails
update:openopen: boolean
triggerValueChangedetails: TriggerValueChangeDetails
update:triggerValuetriggerValue: string | null
focusOutsideevent: FocusOutsideEvent
interactOutsideevent: InteractOutsideEvent
pointerDownOutsideevent: PointerDownOutsideEvent
highlightChangedetails: HighlightChangeDetails
update:highlightedValuehighlightedValue: string | null
escapeKeyDownevent: KeyboardEvent
requestDismissevent: CustomEvent<{ originalLayer: HTMLElement; targetLayer: HTMLElement | undefined; originalIndex: number; targetIndex: number; }>

#Separator

A styled part — no props of its own; it takes the anatomy's shared styling.

#TriggerItem

A styled part — no props of its own; it takes the anatomy's shared styling.

#Trigger

PropTypeDefaultDescription
valuestringThe value that identifies this specific trigger