# Tilt Card

> Real 3D: layers lift off the face as it turns.

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

- Family: Cards
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/tilt-card/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add tilt-card
```

It installs to `components/galactrex/tilt-card.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

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

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

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Content; data-depth="1"–"3" lifts parts. |
| `tilt` | `number` | `10` | Largest tilt in degrees. |
| `glare` | `boolean` | `true` | Moving glare. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Layered.** Three depths of content.

## Accessibility

- Decorative motion; content keeps its semantics.

## Motion

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