Account

Cards

Creative

Floating 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.

Terminal
npx @galactrex/ui add floating-card

Usage

Example
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.

See plans

Props

PropTypeDefaultDescription
childrenReactNode—Content.
floatnumber10Drift in px.
durationnumber5Seconds per drift.
phasenumber0Offset, 0–1.
classNamestring—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.