Account

Buttons

Creative

Expand Button

Keeps a toolbar compact without leaving anyone guessing: the label slides out on hover or focus.

Install

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

Terminal
npx @galactrex/ui add expand-button

Usage

Example
import { ExpandButton } from "@/components/galactrex/expand-button";

<ExpandButton icon={<PlusIcon />} label="New project" />

Source

Installs to components/galactrex/expand-button.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
iconReactNode—Icon at rest.
labelstring—The words that slide out; also its name.
tone"solid" | "outline" | "ghost""outline"Look.
expandedboolean—Keep it open.
...button propsButtonHTMLAttributes—onClick, disabled, type and the rest.

Variants

  • Toolbar. A row of icon actions.

Accessibility

  • The label is always its accessible name.

Motion and reduced motion

  • Layout animation on a spring.
  • Reduced motion: the label appears without travel.