Installation
Barrel
import { Toolbar } from "kumo-svelte"; Granular
import { Toolbar } from "kumo-svelte/components/toolbar";Usage
Use Toolbar when multiple controls should read as one compact toolbar or
filter card. Use Toolbar.Button, Toolbar.Input, and Toolbar.InputGroup to
opt supported controls into toolbar sizing, button styling, borders, and radii.
<script lang="ts"> import { FunnelSimple, MagnifyingGlass } from 'phosphor-svelte'; import { InputGroup, Toolbar } from 'kumo-svelte';</script><Toolbar> <Toolbar.InputGroup aria-label="Search DNS records"> <InputGroup.Addon> <MagnifyingGlass /> </InputGroup.Addon> <InputGroup.Input placeholder="Search DNS records" /> </Toolbar.InputGroup> <Toolbar.Button icon={FunnelSimple} aria-label="Filter" /></Toolbar>Behavior
Toolbar.Button,Toolbar.Input, andToolbar.InputGroupinherit the toolbarsize.Toolbar.Buttonalways renders with quiet toolbar button styling.Toolbar.InputGrouppasses props directly toInputGroupwith the toolbarsize.- Adjacent toolbar items share borders and only the outer corners are rounded.
- Direct
Toolbarchildren that are not one of the supported toolbar item components do not receive toolbar overrides.
Examples
Input Shorthand
Use Toolbar.Input for simple text inputs that do not need addons.
Input Group
Use Toolbar.InputGroup when one toolbar item needs its own inline addon or
suffix.
Sizes
The size prop supports xs, sm, base, and lg. Every supported toolbar
item is locked to the same size.
Button Actions
Toolbar buttons use quiet styling so grouped actions remain visually quiet and consistent.
Accessible Labels
Use aria-label for compact toolbar controls that do not have visible labels.
API Reference
Toolbar
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "xs" | "sm" | "base" | "lg" | "base" | Locks every toolbar item to this size. |
Toolbar.Button
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | Component | - | Optional icon component rendered before the label. |
| shape | "base" | "square" | "circle" | - | Button shape. Icon-only toolbar buttons default to square. |
| disabled | boolean | - | Disables the toolbar button. |
| loading | boolean | - | Shows a loading indicator and disables the toolbar button. |
Toolbar.Input
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | number | - | Input value, bindable with `bind:value`. |
| onValueChange | (value: string) => void | - | Called when the input value changes. |
Toolbar.InputGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| No component-specific props. Accepts standard HTML attributes. | |||