Skip to content

pastetaste

Tilt Plate

CardsInteraction

A plate that leans toward the pointer with plain perspective, rotateX and rotateY (no matrix3d), eased by a loop that sleeps once settled, with a soft sheen that follows the lean.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/tilt-plate.tsx.

npx shadcn@latest add https://pastetaste.com/r/tilt-plate.json

Prompt

Install the pastetaste component "Tilt Plate" (tilt-plate) into this Next.js project and use it.

What it is: A plate that leans toward the pointer with plain perspective, rotateX and rotateY (no matrix3d), eased by a loop that sleeps once settled, with a soft sheen that follows the lean.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/tilt-plate.json
   (it writes components/pastetaste/tilt-plate.tsx; install any npm packages it reports).
2. Import it: import { TiltPlate } from "@/components/pastetaste/tilt-plate" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- max: number = 12 — Maximum lean in degrees per axis.
- perspective: number = 900 — Perspective distance in px.
- hoverScale: number = 1.02 — Scale while hovered.
- ease: number = 0.14 — How quickly the plate follows, 0 to 1.
- sheen: number = 0.18 — Strength of the highlight, 0 disables it.
- invert: boolean = false — Lean away from the pointer instead of toward it.
- rounded: number = 20 — Corner radius in px of the plate and its sheen.

Live preview: https://pastetaste.com/c/tilt-plate
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 7

PropTypeDefaultDescription
maxnumber12Maximum lean in degrees per axis.
perspectivenumber900Perspective distance in px.
hoverScalenumber1.02Scale while hovered.
easenumber0.14How quickly the plate follows, 0 to 1.
sheennumber0.18Strength of the highlight, 0 disables it.
invertbooleanfalseLean away from the pointer instead of toward it.
roundednumber20Corner radius in px of the plate and its sheen.
View all →