Buttons
CreativeExpand 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.
npx @galactrex/ui add expand-buttonUsage
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.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
icon | ReactNode | — | Icon at rest. |
label | string | — | The words that slide out; also its name. |
tone | "solid" | "outline" | "ghost" | "outline" | Look. |
expanded | boolean | — | Keep it open. |
...button props | ButtonHTMLAttributes | — | 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.