Components / Surfaces and motion / Expandable island

M1 · Surfaces and motion New

Expandable island

A one-line sheet. Opening animates width first, then height. Closing reverses that and does not overshoot.

When to use

  • A status line can grow into a short list.
  • The closed state must stay one line.

When not to use

  • The content is a full page.
  • The open state should be a route of its own.

Usage

<div class="c-island">
  <div class="c-island-bar"><span>4 items need a reviewer</span><button type="button" aria-expanded="false">Open</button></div>
  <div class="c-island-body"><div class="c-pad"><ul><li>DOC-1042 Access policy</li></ul></div></div>
</div>

Variants

The preview shows the form used in the gallery.

Props

NameTypeDefaultDescription
is-wideclassabsentApplied first on open, removed last on close.
body heightpx0Animated after the width, with --spring-panel at 320 ms.
aria-expandedtrue or falsefalseOn the Open button.

Keyboard

KeyAction
EnterOpens or closes the sheet.

Accessibility

Motion

Pattern origin

Pattern type: a sheet that opens width first, then height.

Related

Glance statusEnter transitionPill buttons