Account

Cards

Creative

Expandable Card

A disclosure card for FAQs, changelogs and settings groups, with nothing jumping around it.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add expandable-card

Usage

Example
import { ExpandableCard } from "@/components/galactrex/expandable-card";

<ExpandableCard summary={<h3>What is included?</h3>}>…</ExpandableCard>

Source

Installs to components/galactrex/expandable-card.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
summaryReactNode—Always visible.
childrenReactNode—Shown when expanded.
defaultOpenbooleanfalseInitial state.
labels[string, string]—Toggle words.
classNamestring—Extra classes for the outer element.

Variants

  • FAQ. A stack of them.

Accessibility

  • A disclosure button with aria-expanded and aria-controls.

Motion and reduced motion

  • Layout animation for the card and siblings.
  • Reduced motion: instant.