Cards
CreativeFloating Card
Drifts slowly with a slight sway; its ground shadow grows and shrinks with the height. Hover settles it.
Install
Included with Creative: needs your API key. Initialize and log in once.
npx @galactrex/ui add floating-cardUsage
import { FloatingCard } from "@/components/galactrex/floating-card";
<FloatingCard phase={0.3}>…</FloatingCard>Source
Installs to components/galactrex/floating-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.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Content. |
float | number | 10 | Drift in px. |
duration | number | 5 | Seconds per drift. |
phase | number | 0 | Offset, 0–1. |
className | string | — | Extra classes for the outer element. |
Variants
- Hero pieces. Several with different phases.
Accessibility
- Decorative motion.
Motion and reduced motion
- Transform loop; pauses offscreen.
- Reduced motion: still.