BetaPublic beta — Read the release notes
Documentation

Menu

Action list triggered by a button.

Package
@solidiom/menu
Version
0.0.1-next.0
Status
stable

Generated from the package's public source.

API

CheckboxItemcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        CheckboxItem(props: MenuCheckboxItemProps): Element
                      

Props

checked?
boolean — Whether the item is checked.
disabled?
boolean — Disabled state.
onCheckedChange?
(checked: boolean) => void — Called when checked state changes.
textValue?
string — Text for typeahead matching.

children: Element

View source

Contentcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Content(props: MenuContentProps): Element
                      

Props

class?
string
ref?
(el: HTMLDivElement) => void
style?
string | CSSProperties

children: Element

View source

Itemcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Item(props: MenuItemProps): Element
                      

Props

disabled?
boolean — Disabled state.
onSelect?
() => void — Called when the item is activated.
textValue?
string — Text for typeahead matching.

children: Element

View source

Labelcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Label(props: MenuLabelProps): Element
                      

Props

class?
string

children: Element

View source

MenuCheckboxItemPropsinterface

Props for a menu checkbox item.

Props

checked?
boolean — Whether the item is checked.
disabled?
boolean — Disabled state.
onCheckedChange?
(checked: boolean) => void — Called when checked state changes.
textValue?
string — Text for typeahead matching.

children: Element

View source

MenuContentPropsinterface

Props for the menu content panel.

Props

class?
string
ref?
(el: HTMLDivElement) => void
style?
string | CSSProperties

children: Element

View source

MenuItemPropsinterface

Props for a menu item.

Props

disabled?
boolean — Disabled state.
onSelect?
() => void — Called when the item is activated.
textValue?
string — Text for typeahead matching.

children: Element

View source

MenuLabelPropsinterface

Props for a menu label (non-interactive group heading).

Props

class?
string

children: Element

View source

MenuRadioGroupPropsinterface

Props for a menu radio group.

Props

onValueChange?
(value: string) => void — Called when the selected value changes.
value?
string — Current selected value.

children: Element

View source

MenuRadioItemPropsinterface

Props for a menu radio item.

Props

disabled?
boolean — Disabled state.
textValue?
string — Text for typeahead matching.
value
string — The value this item represents.

children: Element

View source

MenuRootPropsinterface

Props for the menu root provider.

Props

defaultOpen?
boolean — Default open state (uncontrolled).
onOpenChange?
(open: boolean, details: ChangeDetails<DisclosureReason>) => void — Called when open state change is requested.
open?
Accessor<boolean> — Controlled open state.

children: Element

View source

MenuSeparatorPropsinterface

Props for a menu separator.

Props

class?
string

View source

MenuSubContentPropsinterface

Props for a sub-menu content panel.

Props

class?
string
style?
string | CSSProperties

children: Element

View source

MenuSubPropsinterface

Props for a sub-menu container.

children: Element

View source

MenuSubTriggerPropsinterface

Props for a sub-menu trigger.

Props

disabled?
boolean — Disabled state.
textValue?
string — Text for typeahead matching.

children: Element

View source

MenuTriggerPropsinterface

Props for the menu trigger button.

Props

contextMenu?
boolean — Enable context menu (right-click) activation.
ref?
(el: HTMLButtonElement) => void

children: Element

View source

RadioGroupcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        RadioGroup(props: MenuRadioGroupProps): Element
                      

Props

onValueChange?
(value: string) => void — Called when the selected value changes.
value?
string — Current selected value.

children: Element

View source

RadioItemcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        RadioItem(props: MenuRadioItemProps): Element
                      

Props

disabled?
boolean — Disabled state.
textValue?
string — Text for typeahead matching.
value
string — The value this item represents.

children: Element

View source

Rootcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Root(props: MenuRootProps): Element
                      

Props

defaultOpen?
boolean — Default open state (uncontrolled).
onOpenChange?
(open: boolean, details: ChangeDetails<DisclosureReason>) => void — Called when open state change is requested.
open?
Accessor<boolean> — Controlled open state.

children: Element

View source

Separatorcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Separator(props: MenuSeparatorProps): Element
                      

Props

class?
string

View source

Subcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Sub(props: MenuSubProps): Element
                      

children: Element

View source

SubContentcomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        SubContent(props: MenuSubContentProps): Element
                      

Props

class?
string
style?
string | CSSProperties

children: Element

View source

SubTriggercomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        SubTrigger(props: MenuSubTriggerProps): Element
                      

Props

disabled?
boolean — Disabled state.
textValue?
string — Text for typeahead matching.

children: Element

View source

Triggercomponent

@solidiom/menu — Headless menu primitive with keyboard navigation and dismissal. Parts: Root, Trigger, Content, Item, Separator, CheckboxItem, RadioGroup, RadioItem, Label, Sub, SubTrigger, SubContent.

                        Trigger(props: MenuTriggerProps): Element
                      

Props

contextMenu?
boolean — Enable context menu (right-click) activation.
ref?
(el: HTMLButtonElement) => void

children: Element

View source