---
title: "Tilt"
description: "Any item turns in 3D toward the mouse, up to 6 degrees, and grows 2%. Tilt Glare adds a soft light at the pointer."
url: https://gelatinui.com/components/tilt
markdown_url: https://gelatinui.com/components/tilt.md
access: free
install: "npx shadcn@latest add @gelatin-ui/tilt"
registry_item: https://gelatinui.com/r/tilt.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Tilt

> Any item turns in 3D toward the mouse, up to 6 degrees, and grows 2%. Tilt Glare adds a soft light at the pointer.

Page: https://gelatinui.com/components/tilt

## When to use it

Best for: Plan, product, or feature cards that turn toward the mouse on a landing page.

- Wrap one card. Put `TiltGlare` as the last child of the card, and give the card `relative`.
- Keep `maxAngle` near 6. More than about 10 reads as a toy.
- For a large item, set `perspective` near its width.
- Use `useTiltMotion` for a light layer of your own, such as a foil.

## When not to use it

- For an item that moves toward the mouse with no turn, use [Magnetic](https://gelatinui.com/components/magnetic.md).
- For a plain surface with no effect, use a [Card](https://gelatinui.com/components/card.md).

## Notes for agents

- `maxAngle` (default 6), `scale` (default 1.02), and `perspective` (default 900px) set the turn.
- A mouse, a pen, or a finger held on the item turns it; it settles when the finger lifts. A scroll that passes over it does nothing. With `disabled` it stays flat.
- The glare takes the corner radius of its parent, so it never shows past a round edge.
- No React render on a pointer move, and no work while the item is off screen.

## Anatomy

```text
Tilt
└─ TiltGlare (0..n)
```

## API reference

### Tilt

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `maxAngle` | `number` | 6 | The largest turn in degrees, reached at an edge. More than about 10 reads as a toy. |
| `scale` | `number` | 1.02 | The size while the mouse is on: 1.02 is 2% larger. 1 turns the growth off. |
| `perspective` | `number` | 900 | The 3D depth in px. Smaller is stronger; set it near the item width for a large item. |
| `disabled` | `boolean` | false | Keeps the item flat and stops the pointer work. |

### TiltGlare

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Tilt | `tilt` |  | `--tilt-active`, `--tilt-max-angle`, `--tilt-perspective`, `--tilt-scale`, `--tilt-x`, `--tilt-y` |  |
| TiltGlare | `tilt-glare` |  | `--tilt-active`, `--tilt-x`, `--tilt-y` |  |

## Usage

Wrap one card. Put `TiltGlare` last inside the card.

```tsx title="plan-card.tsx"
import { Tilt, TiltGlare } from "@/components/effects/tilt";

export function PlanCard() {
  return (
    <Tilt className="w-72">
      <div className="relative rounded-2xl border bg-card p-6">
        <p className="text-sm font-medium">Pro</p>
        <p className="mt-2 text-3xl font-semibold">$24 / mo</p>
        <TiltGlare />
      </div>
    </Tilt>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/tilt
```

It adds 20 registry items: 19 files, 3283 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Magnetic](https://gelatinui.com/components/magnetic.md)
- [Card](https://gelatinui.com/components/card.md)
- [Image](https://gelatinui.com/components/image.md)
- [Choice Card](https://gelatinui.com/components/choice-card.md)

## Accessibility

Decoration only: it adds no role, no name, and no focus stop. The child keeps its own focus and clicks.

The glare is `aria-hidden` and ignores the pointer, so links and buttons under it stay clickable.

## Motion

| Part | Motion |
| --- | --- |
| Turn | hover · 150ms · ease-out (0, 0, 0.2, 1), to each new pointer place |
| Grow and glare | hover · 150ms · ease-out (0, 0, 0.2, 1), in when the mouse enters, out when it leaves |
