Skip to content
Kimenpre-v1documentation home
Color scheme

ki-toolbar

Use a toolbar for a few related page actions. A floating toolbar is a pill that you place in your layout or over your content. Set orientation="vertical" when the actions run down the side of the content.

Theme for this example
Color scheme for this example
Bold Insert link
<ki-toolbar label="Formatting">
<ki-button variant="ghost" size="sm">Bold</ki-button>
<ki-divider orientation="vertical"></ki-divider>
<ki-button variant="ghost" size="sm">Insert link</ki-button>
</ki-toolbar>

For a separate primary action, put a companion FAB in slot="fab". It appears after the floating pill in reading order and has its own Tab stop. A docked toolbar uses the full bottom edge and includes the device’s bottom safe area. Reserve that edge for its horizontal action group on compact screens and leave enough space below content for the bar. Use MobileNav on screens that need navigation at that edge.

Supply a toolbar label, slot actions directly, and give every icon-only action a name. Tab enters on the most recently focused action. Arrow keys follow the layout and wrap at the ends. Home and End reach the first and last available action. Buttons own their activation and toggle state.

Use hide-on-scroll to free space while scrolling down the page. Scrolling up or tabbing to an action brings the surface back. The toolbar stays visible while an action or the companion FAB has focus.

API reference

When to use: group a small set of related page actions, such as text formatting or the commands on a compact message screen.

When not to use: for site navigation, mutually exclusive choices, or a docked bar on a screen already using MobileNav.

Properties & attributes

AttributePropertyTypeDefaultDescription
hide-on-scrollhideOnScrollbooleanfalseHides on downward page scroll and reveals on upward scroll or when an action receives focus. Use for secondary actions where content needs room.
labellabelstring–Accessible name for the group, such as "Formatting". Supply it in the page's language.
orientationorientation"horizontal" | "vertical"'horizontal'Layout and keyboard axis. Set vertical for a floating column. Docked is always horizontal.
tonetone"standard" | "vibrant"'standard'Surface palette. Use vibrant to emphasize the toolbar with an accent tint.
variantvariant"docked" | "floating"'floating'Floating leaves placement to the page. Docked fixes the surface to the viewport's bottom edge. Reserve space below the content when docking.

Slots

SlotDescription
(default)Direct ki-button, ki-icon-button (including toggles), native button and ki-divider children. Give every icon-only action an accessible name.
fabA companion ki-fab for the floating variant. It follows the toolbar and has its own Tab stop.

CSS parts

PartDescription
toolbarThe named surface containing the grouped actions.

CSS custom properties

The public styling contract of ki-toolbar: reassign these tokens at :root or on a subtree — never override internals.

TokenDescription
--ki-density-target-minThe smallest pointer target any density may produce: 24 x 24 CSS px by default and in compact (WCAG 2.5.8 AA), 44 x 44 in touch (WCAG 2.5.5). It floors a shrinking control but never lifts what a control paints: a control painted smaller extends its target to it, invisibly; rows and tabs grow to it (spec 045 A1).
--ki-focus-ring-widthThickness of the keyboard focus ring every focusable component draws (its outline). One token instead of one per component, so a mode or a theme changes every ring at once.
--ki-toolbar-backdrop-filterComplete backdrop filter behind the surface.
--ki-toolbar-bgBackground of the standard toolbar.
--ki-toolbar-bg-imageOptional image above the solid surface color.
--ki-toolbar-docked-padding-inlineInline insets for docked actions.
--ki-toolbar-docked-radiusCorner radius of the docked toolbar.
--ki-toolbar-fab-gapGap between a floating pill and its companion FAB.
--ki-toolbar-fgForeground of the standard toolbar.
--ki-toolbar-gapGap between toolbar actions.
--ki-toolbar-heightMinimum height of the docked toolbar before its safe area.
--ki-toolbar-paddingToolbar surface padding.
--ki-toolbar-radiusRadius of the floating pill.
--ki-toolbar-scroll-durationDuration of the scroll visibility transition.
--ki-toolbar-scroll-easingEasing of the scroll visibility transition.
--ki-toolbar-shadowResting elevation of the floating pill.
--ki-toolbar-vibrant-bgAccent background of the vibrant toolbar.
--ki-toolbar-vibrant-fgForeground on the vibrant toolbar.
--ki-typography-family-bodysemantic font family for typography family body.

Open ki-toolbar in Storybook