Components

Toggle Group ​

Toggle groups combine several related toggles into a single toolbar-like control. They work well for alignment, text formatting, and other compact grouped choices.

Basic Usage ​

Use a joined horizontal group for the most common compact toolbar pattern.

Variants ​

Variant changes help the same group pattern fit different control hierarchies.

Sizes ​

Size changes help the same group pattern fit both dense editors and more prominent control areas.

Orientation ​

Orientation lets the same interaction work as either a joined toolbar or a vertical control stack.

Spacing ​

Spacing can loosen the group when the items should read as related controls without touching edges.

Selection Modes ​

Use single selection for mutually exclusive choices, and multiple selection for independent formatting-style choices.

API ​

Slots ​

NameDescription
(default)pk-toggle or button[data-value] items

Props ​

NameDescription
joinedType boolean
Default true
multipleType boolean
Default false
orientationType PkToggleGroupOrientation
Default horizontal
sizeType PkToggleSize
Default default
spacingGap between items — 0 joins adjacent toggles (React spacing={0}).
Type number
Default 0
variantType PkToggleVariant
Default default

CSS Parts ​

NameDescriptionCSS selector
baseGroup container::part(base)
Edit this page
Last updated: Sep 9, 2026, 7:18 PM