Skip to content
Overlays

Menu

client64.5 kB
@stellaria/nebula-webMenuProps

Preview

Props

13
PropTypeDefault

aria-label

string

—

autoFocus

boolean | "first" | "last"

—

className

string

—

crossOffset

number

—

defaultOpened

booleanfalse

items

required
MenuItemData[]

—

offset

number6

onAction

((key: string) => void)

—

onOpenChange

((opened: boolean) => void)

—

opened

boolean

—

placement

PopoverPlacement"bottom start"

trigger

required
OverlayTriggerElement

—

width

string | number

—

Slot props

6

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

bodyProps

Label and description column.

BoxSlotProps

—

descriptionProps

The description, when the row has one.

TextSlotProps

—

iconProps

Wrapper for the icon, when the row has one.

BoxSlotProps

—

labelProps

The label. It spreads AFTER the aria props, so the consumer wins.

TextSlotProps

—

listProps

The list. It already carries the aria menu props.

BoxSlotProps

—

shortcutProps

The keyboard shortcut, rendered in a `kbd`.

BoxSlotProps

—