Toolbar
Displays frequently used actions or tools in a compact, easily accessible bar.
Structure
API Reference
The root component which contains the toolbar.
Property | Type | Description |
---|---|---|
loop | boolean | Whether or not the toolbar should loop when navigating. Default: true |
orientation | enum | The orientation of the toolbar. Default: horizontal |
ref bindable prop | HTMLDivElement | The underlying DOM element being rendered. You can bind to this to get a reference to the element. Default: undefined |
children | Snippet | The children content to render. Default: undefined |
child | Snippet | Use render delegation to render your own element. See delegation docs for more information. Default: undefined |
Data Attribute | Value | Description |
---|---|---|
data-orientation | '' | The orientation of the toolbar. |
data-toolbar-root | '' | Present on the root element. |
A button in the toolbar.
Property | Type | Description |
---|---|---|
disabled | boolean | Whether or not the button is disabled. Default: false |
ref bindable prop | HTMLButtonElement | The underlying DOM element being rendered. You can bind to this to get a reference to the element. Default: undefined |
children | Snippet | The children content to render. Default: undefined |
child | Snippet | Use render delegation to render your own element. See delegation docs for more information. Default: undefined |
Data Attribute | Value | Description |
---|---|---|
data-toolbar-button | '' | Present on the button element. |
A link in the toolbar.
Property | Type | Description |
---|---|---|
ref bindable prop | HTMLAnchorElement | The underlying DOM element being rendered. You can bind to this to get a reference to the element. Default: undefined |
children | Snippet | The children content to render. Default: undefined |
child | Snippet | Use render delegation to render your own element. See delegation docs for more information. Default: undefined |
Data Attribute | Value | Description |
---|---|---|
data-toolbar-link | '' | Present on the link element. |
A group of toggle items in the toolbar.
Property | Type | Description |
---|---|---|
type required prop | enum | The type of toggle group. Default: 'single' |
value bindable prop | union | The value of the toggle group. If the type is multiple, this will be an array of strings, otherwise it will be a string. Default: undefined |
onValueChange | function | A callback function called when the value changes. Default: undefined |
disabled | boolean | Whether or not the switch is disabled. Default: false |
ref bindable prop | HTMLDivElement | The underlying DOM element being rendered. You can bind to this to get a reference to the element. Default: undefined |
children | Snippet | The children content to render. Default: undefined |
child | Snippet | Use render delegation to render your own element. See delegation docs for more information. Default: undefined |
Data Attribute | Value | Description |
---|---|---|
data-toolbar-group | '' | Present on the group element. |
A toggle item in the toolbar toggle group.
Property | Type | Description |
---|---|---|
value required prop | string | The value of the toolbar toggle group item. When the toolbar toggle group item is selected, toolbar the toggle group's value will be set to this value if in single mode, or this value will be pushed to the toggle group's array value if in multiple mode. Default: undefined |
disabled | boolean | Whether or not the item is disabled. Default: false |
ref bindable prop | HTMLButtonElement | The underlying DOM element being rendered. You can bind to this to get a reference to the element. Default: undefined |
children | Snippet | The children content to render. Default: undefined |
child | Snippet | Use render delegation to render your own element. See delegation docs for more information. Default: undefined |
Data Attribute | Value | Description |
---|---|---|
data-state | enum | Whether the toolbar toggle item is in the on or off state. |
data-value | '' | The value of the toolbar toggle item. |
data-disabled | '' | Present when the toolbar toggle item is disabled. |
data-toolbar-item | '' | Present on the item element. |