Components

Expandable

new

A surface that springs open in place to reveal more of itself.

In 15 min

Design sync

1:30 – 2:15 PM

Installation

npx shadcn@latest add @blank/expandable

Usage

import {
  Expandable,
  ExpandableContent,
  ExpandableTrigger,
} from "@/components/ui/expandable"
<Expandable className="w-80 transition-[width] data-[state=open]:w-96">
  <ExpandableTrigger>Design sync</ExpandableTrigger>
  <ExpandableContent preset="blur" stagger>
    <p>Agenda</p>
    <p>Attendees</p>
  </ExpandableContent>
</Expandable>

Expandable is Collapsible with motion. Reach for Collapsible when content just needs to show and hide; reach for this when the reveal is part of the design — a card that grows, details that arrive one after another.

The root does not animate itself: it puts data-state in the DOM, so its own width, shadow or radius follow with plain CSS transitions. Each ExpandableContent springs its height and brings its children in with a preset — fade, blur, slide-up, slide-down or scale — optionally staggered. With reduced motion, everything opens instantly.

Examples

Show more

Several ExpandableContents, or one placed mid-list, all follow the same root.

v3.1 · October 2026

What changed

Banner, Chip and Quantity Stepper join the library
Code Block highlights lines and copies the active tab
Input File keeps the native input in sync for forms