Menu Item
<sc-menu-item></sc-menu-item>
This component let users create a menu item.
- Preview
- Code
<sc-menu style="max-width: 200px; border: solid 1px var(--sc-panel-border-color); border-radius: var(--sc-border-radius-medium);"><sc-menu-item>Option 1</sc-menu-item><sc-menu-item>Option 2</sc-menu-item><sc-menu-item>Option 3</sc-menu-item></sc-menu>
Component Codex
Properties
Property | Description | Type | Default |
---|---|---|---|
checked | Draws the item in a checked state. | boolean | false |
disabled | Draws the menu item in a disabled state. | boolean | false |
href | Optional link to follow. | string | |
target | The target of the link. | string | |
value | A unique value to store in the menu item. This can be used as a way to identify menu items when selected. | string | '' |
Methods
setBlur() => Promise<void>
Removes focus from the button.
setFocus(options?: FocusOptions) => Promise<void>
Sets focus on the button.
Shadow Parts
Part | Description |
---|---|
base | |
checked-icon | |
label | |
prefix | |
suffix |