logo-icon
STW UI

Menu

Menu is used to display a list of links vertically or horizontally.

Usage

svelte
import { Menu } from 'stwui';
// OR
import Menu from 'stwui/menu'; // for tree shaking

Basic

Menu Props

collapsed boolean false
collapsedWidth string w-12
active string

Menu Slots

default <Menu.Item />

Menu.Item Props

key string
href string
label string

Menu.Item Slots

icon <Menu.Item.Icon slot="icon" />
extra <Menu.Item.Extra slot="extra" />

Menu.Item.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Menu.Group Props

key string
label string
itemsPanelClass string

Menu.Group Slots

default <Menu.Group.Item />

Menu.Group.Item Props

key string
href string
label string

Menu.Group.Item Slots

extra <Menu.Group.Item.Extra slot="extra" />

Menu Class Identifiers

stwui-menu
stwui-menu-item
stwui-menu-item-icon
stwui-menu-group
stwui-menu-group-item