For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /dolan/toolbar.md.

Toolbar

Bar buttons, grouped the way iOS 26 groups them on one Liquid Glass capsule, for the Navigation Bar and for a bar of actions along the bottom of the screen.

Installation

npx @blotch/dolan add toolbar
import {
  UiBarScroll,
  UiToolbar,
  UiToolbarGroup,
  UiToolbarItem,
  UiToolbarSpacer,
} from '../components/ui/toolbar';
Tip

This also adds Glass, which draws the items, and Icon, whose icons they show.

Usage

Put a <ui-toolbar> after the screen's <scroll-view>, and ui-bar-scroll on the scroll view so the content ends above it:

<scroll-view ui-bar-scroll scroll-orientation="vertical" class="h-full w-full">
  …
</scroll-view>

<ui-toolbar>
  <ui-toolbar-group>
    <ui-toolbar-item
      icon="list-checks"
      label="Checklist"
      (pressed)="addChecklist()"
    />
    <ui-toolbar-item icon="camera" label="Camera" (pressed)="addPhoto()" />
  </ui-toolbar-group>
  <ui-toolbar-spacer />
  <ui-toolbar-item icon="pencil" label="New note" (pressed)="compose()" />
</ui-toolbar>
  • The toolbar floats over the content at the bottom of the screen, above the home indicator. Content scrolls beneath it, and on iOS 26 fades out as it does.
  • Items spread across it. A <ui-toolbar-spacer> takes the free space instead, pushing what follows it to the end.
  • Every item needs a label. It's what a screen reader says, and what the item shows without an icon.

What each platform draws

PlatformToolbarItems
iOS 26 and laterNo bar: the items float in Liquid GlassGlass circles and capsules; a group shares one capsule
iOS 15 to 25Edge to edge, on the bars' chrome material with a hairline while content continues beneath it, clear at the end of itPlain bar buttons in the tint color, which fade while pressed
AndroidMaterial 3 Expressive's docked toolbar, on the surface containerMaterial icon buttons with a state layer; labels are text buttons
Android, with provideGlass()As on iOS 26, drawn with Android's blurAs on iOS 26
Web previewAs on iOS 26, drawn with WebGLAs on iOS 26

Groups

<ui-toolbar-group> puts related items on one glass capsule, as iOS 26 groups a bar's items. Before iOS 26 and on Android it only keeps them together.

<ui-toolbar-group>
  <ui-toolbar-item icon="share-2" label="Share" (pressed)="share()" />
  <ui-toolbar-item icon="heart" label="Favorite" (pressed)="favorite()" />
</ui-toolbar-group>
  • An item on its own is a glass circle for an icon, or a capsule for a label.
  • Keep labels apart from icons. Side by side on one capsule, they read as one button.
  • Aim for three groups at most in a bar, as Apple suggests.

Prominent items

prominent marks the screen's key action, such as Done: tinted glass on iOS 26, a bold label before it, and a filled button on Android. Give it a place of its own at the trailing end; in a group it's a plain item.

<ui-toolbar-item label="Done" prominent (pressed)="save()" />

Back items

back draws the platform's Back button: a glass circle with a chevron on iOS 26, the chevron and label before it, and Material's arrow on Android. The Navigation Bar shows one by itself; use this one for a Back button of your own.

Your own icon

For an action the icon set has nothing for, pass your own icon's markup to svg instead of icon:

<ui-toolbar-item [svg]="acmeMark" label="Open in Acme" (pressed)="open()" />
  • currentColor takes the item's color for its design, as the set's icons do: the glass's foreground on iOS 26, the tint color before, and the tint's foreground on a prominent item. Colors written out stay.
  • xmlns is optional, and lines must be <path>s, as for an icon's own SVG.
  • Give icon or svg, not both. A Back item draws the platform's chevron whatever it's given.

The scroll view

ui-bar-scroll on a <scroll-view> or a <list> is what connects the content to the bars over it:

  • It makes room for the navigation bar and the status bar at the top, and the toolbar and the home indicator at the bottom.
  • It draws the large title of a navigation bar with largeTitle, as a button when the bar has a title menu, with an element marked largeTitleAccessory beside it.
  • It fades content out under glass bars, iOS 26's scroll edge effect. Android's scroll view takes no mask, so there the glass bars fade content to the theme's background color themselves.
  • It tells the bars where the content is: the frosted bars turn opaque, and Material's top app bar changes color, as content scrolls under them.

It reads the scroll view's events itself rather than through a template listener, so it updates the bars only when they change.

A long feed is a <list>, which takes it too. Everything in a list is a list item, so the room for the bars and the large title are items of their own, before the list's items and after them, each a whole row of a flow or waterfall list (full-span). Their keys are ui-bar-scroll-top, ui-bar-scroll-large-title and ui-bar-scroll-bottom (BAR_SCROLL_ITEM_KEYS), so don't give your items those. A list sends scroll every 200 ms by default, which would bring the large title into the bar late, so it sends it about every frame unless you set scroll-event-throttle yourself:

<list ui-bar-scroll scroll-orientation="vertical" class="h-full w-full">
  @for (note of notes(); track note.id) {
  <list-item [attr.item-key]="note.id">…</list-item>
  }
</list>

API

UiToolbarItem

InputTypeDefaultDescription
labelstring—Required. What the item does: shown without an icon, and read by screen readers.
iconIconName | undefinedundefinedThe Icon shown instead of the label. Give this or svg.
svgstring | undefinedundefinedSVG markup to show instead, with currentColor in the item's color.
prominentbooleanfalseThe screen's key action, tinted, on its own.
backbooleanfalseThe platform's Back button, with label as the previous screen's title.
disabledbooleanfalseDims the item and ignores taps.
OutputTypeDescription
pressedvoidEmits on a tap, unless it's disabled.

UiToolbar, UiToolbarGroup and UiToolbarSpacer

ComponentSelectorInputsDescription
UiToolbarui-toolbarclassThe bar along the bottom, which places itself at its parent's bottom.
UiToolbarGroupui-toolbar-groupclassItems sharing one glass capsule.
UiToolbarSpacerui-toolbar-spacer—Flexible space between items.

UiBarScroll and UiBarState

NameKindDescription
UiBarScrollComponent, scroll-view[ui-bar-scroll], list[ui-bar-scroll]Makes room for the bars, draws the large title, fades content under glass bars and tells the bars where the content is.
UiBarStateRoot serviceWhat the bars and the scroll view tell each other. Provide one on a component to give its bars their own (see Two bars at once).
injectBarState()FunctionThe UiBarState of the screen a bar is on: a component's own, a stack screen's, or the root's. For a bar of your own.

Accessibility

  • Each item is one button, named by its label. A disabled item also has the disabled trait.
  • Reduce Motion: the web preview's glass stops swelling under the finger, and the item shows a highlight instead. iOS calms its own glass.
  • Reduce Transparency and Increase Contrast are handled by the glass.
  • Navigation Bar: the bar at the top of a screen, with a title and a Back button
  • Button Group: a group of glass buttons inside a screen's content
  • Dock: a floating glass tab bar for the app's top-level screens
  • Glass: the glass the items are drawn with