Usage
The <MiniMenu>
component displays a menu of options in a small, compact format. To use it, add <MiniMenuButton>
inside the <MiniMenu>
.
Toggle groups
To add toggle-able groups of items, group <MiniMenuToggleItem>
within <MiniMenuToggleGroup>
.
Multiple select
You can also set type="multiple"
to enable toggling on and off multiple items in a group.
Different toggled icon
You can customize the appearance of the toggled item by providing a different iconToggled
for the selected state.
In this example, we showcase both horizontal and vertical orientations side by side. The orientation
prop allows you to easily switch between these layouts to best fit your design needs.
API Reference
MiniMenu
Inherits properties from HTMLElement
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
loop | boolean | true |
MiniMenuButton
Inherits properties from HTMLButtonElement
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
disabled | boolean | false |
icon | IconDefinition | |
value | string |
MiniMenuToggleItem
Inherits properties from HTMLButtonElement
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
disabled | boolean | false |
icon | IconDefinition | |
iconToggled | IconDefinition | |
value | string |
MiniMenuToggleGroup
Inherits properties from HTMLElement
Prop | Type | Default |
---|---|---|
type | "single" "multiple" | |
defaultValue | string | |
disabled | boolean | false |
onValueChange | (value: string) => void | |
value | string |
MiniMenuSeparator
Inherits properties from HTMLElement
Prop | Type | Default |
---|---|---|
asChild | boolean | false |