Desktop components

Toolbars

A toolbar provides convenient access to frequently used commands, controls, navigation, and search. Items sit in glass capsules that float in a window’s titlebar.

Preview

Anatomy

A group is a Liquid Glass capsule. Three layers make the glass:

The shadow is almost nothing, so depth comes from the rim.

PartValue
Height, regular36px
Radius, regular18px
Height, small24px
Radius, small12px
Shadow0 8px 15px at 2 to 4% (--p-shadow-glass-control)
Item cell32px
Group padding2px at each end, so three icons make a 100px group

Both sizes are true capsules, so the corners need no squircle.

PartValue
Glyph13px (10px in small) in #1A1A1A
Hover and pressed pill32×28px, 14px radius, inset 4px from the capsule (24×20px, 10px radius in small)
Pill fillBlack at 10% (#E6E6E6 on white), so it follows the gradient underneath
Item spacing with dividers3px
Divider1×20px line (1×16px in small) at black 15%
ClassRole
.p-toolbar-groupGlass capsule, 36px, radius 18px. role="toolbar" belongs here.
.p-toolbar-group-small24px capsule, radius 12px.
.p-toolbar-group-verticalColumn orientation, same values rotated.
.p-toolbar-btnIcon button with the hover pill.
.p-toolbar-text-btnLabel + chevrons variant.
.p-toolbar-divider1px separator, role="separator".
.p-toolbar-circleA single glass icon button, a 36px circle (-small: 24px).
.p-toolbar-popupPopup chip: icon + down chevron in a 50×36px capsule (-small: 39×24px).

In a window, groups sit in the titlebar 8px from the band edges and 8px apart. The first group sits 16px after the zoom light, and the title follows it 8px later. See windows for the three titlebar layouts. The flat macOS 26 slots (.p-window-toolbar-btn in a .p-window-toolbar-flat row) remain for existing layouts, but glass groups are the default look.

Toolbar search is the standard search field: the 24px capsule matches the small toolbar scale and the 36px -xlarge step matches the regular one.

States

Hover and [aria-pressed="true"] (or .p-active) show the pill. Disabled buttons drop their ink to #BFBFBF and ignore the pointer. Focus uses the standard ring, 3px at 50% blue, inset to follow the pill shape.

When the window loses focus (.p-window-inactive on the window, or .p-inactive on the glass itself), the glass flattens. The gradient and speculars drop away and only the keyline remains.

Dark mode

Dark glass is additive light: white at about 6% at the top rising to 15% at the bottom (about #2C2C2C to #3F3F3F on #1E1E1E). It sits inside a near-black keyline, with bright 1px rims top and bottom. The hover pill and dividers turn lighter than the glass: white at 9% and 18%. Ink is #F5F5F5. Both .p-dark-mode and .p-auto-dark-mode are supported.

Code

<div class="p-toolbar-group" role="toolbar" aria-label="View options">
  <button class="p-toolbar-btn" aria-pressed="true" aria-label="Grid view">
    <i class="ph-bold ph-squares-four"></i>
  </button>
  <div class="p-toolbar-divider" role="separator"></div>
  <button class="p-toolbar-btn" aria-label="List view">
    <i class="ph-bold ph-list"></i>
  </button>
</div>

Icon-only buttons need aria-labels, and toggles should carry aria-pressed so state is announced. With prefers-reduced-transparency the glass becomes an opaque gradient with the same ramp, and with prefers-contrast: more the keyline becomes a solid 1px line in the ink color.

Copied