Displays frequently used actions or tools in a compact, easily accessible bar.
This is a documentation section that potentially contains examples, demos, and other
useful information related to a specific part of Bits UI. When helping users with this
documentation, you can ignore the classnames applied to the demos unless they are
relevant to the user's issue.
A callback function called when the value changes.
Default: ——undefined
disabled
boolean
Whether or not the switch is disabled.
Default: false
ref$bindable
HTMLDivElement
The underlying DOM element being rendered. You can bind to this to get a reference to the element.
Default: null
children
Snippet
The children content to render.
Default: ——undefined
child
Snippet- type SnippetProps = {
props: Record<string, unknown>;
};
Use render delegation to render your own element. See Child Snippet docs for more information.
Default: ——undefined
Data Attribute
Value
Description
Details
data-toolbar-group
''
Present on the group element.
Toolbar.GroupItem
A toggle item in the toolbar toggle group.
Property
Type
Description
Details
valuerequired
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
HTMLButtonElement
The underlying DOM element being rendered. You can bind to this to get a reference to the element.
Default: null
children
Snippet
The children content to render.
Default: ——undefined
child
Snippet- type SnippetProps = {
props: Record<string, unknown>;
};
Use render delegation to render your own element. See Child Snippet docs for more information.
Default: ——undefined
Data Attribute
Value
Description
Details
data-state
enum- 'on' | 'off'
Whether the toolbar toggle item is in the on or off state.