Account

Buttons

Creative

Animated Icon Button

The bell rings, the bin lifts its lid, the heart beats, the plane takes off, the arrow drops into the tray, the gear turns. Over before you click.

Install

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

Terminal
npx @galactrex/ui add animated-icon-button

Usage

Example
import { AnimatedIconButton } from "@/components/galactrex/animated-icon-button";

<AnimatedIconButton icon="bell" label="Notifications" />

Source

Installs to components/galactrex/animated-icon-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
icon"bell" | "trash" | "heart" | "send" | "refresh" | "download" | "settings" | "search"—Which icon.
labelstring—What it does; its accessible name.
childrenReactNode—Optional visible text.
sizenumber20Icon size in px.
...button propsButtonHTMLAttributes—onClick, disabled, type and the rest.

Variants

  • Icon only. Toolbars and cards.
  • With text. Pass children for a labelled button.

Accessibility

  • Named by `label` when icon-only.

Motion and reduced motion

  • Per-part variants on hover, focus and press.
  • Reduced motion: still icons.