Account

Cards

Creative

Tilt Card

Children marked data-depth float at different heights, so a title, an image and a badge separate as it tilts. A glare slides across.

Install

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

Terminal
npx @galactrex/ui add tilt-card

Usage

Example
import { TiltCard } from "@/components/galactrex/tilt-card";

<TiltCard><img data-depth="1" … /><h3 data-depth="2">Orbit</h3></TiltCard>

Source

Installs to components/galactrex/tilt-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; data-depth="1"–"3" lifts parts.
tiltnumber10Largest tilt in degrees.
glarebooleantrueMoving glare.
classNamestring—Extra classes for the outer element.

Variants

  • Layered. Three depths of content.

Accessibility

  • Decorative motion; content keeps its semantics.

Motion and reduced motion

  • preserve-3d with translateZ layers and spring tilt.
  • Flat on touch and reduced motion.