Components / Surfaces and motion / Pill buttons

M4 · Surfaces and motion New

Pill buttons

Pill actions at two heights, 28 px and 34 px, with an 8 px gap.

When to use

  • Actions sit in a compact bar.
  • The radius should be a pill rather than 8 px.

When not to use

  • The action is a primary page button. Use .btn.
  • The control is a filter. Use a chip.

Usage

<div class="c-pills">
  <button type="button" class="c-pill">Save</button>
  <button type="button" class="c-pill sm ghost">Small</button>
</div>

Variants

The preview shows the form used in the gallery.

Props

NameTypeDefaultDescription
c-pillclass—34 px height.
c-pill smclass—28 px height.
ghostclassabsentSurface fill and a line.
disabledattributeabsentTrack fill, no action.

Keyboard

KeyAction
Enter or SpaceActivates the button.
TabMoves across the row.

Accessibility

Motion

Pattern origin

Pattern type: pill buttons at 28 px and 34 px, with an 8 px gap.

Related

ButtonChipExpandable island