- Components
- Motion
- Tilt
Shadcn Tilt Components
A 3D tilt that follows the pointer on cards, images and icons, with optional glare, max angle, perspective, hover scale, reverse direction and smooth reset. Turned off on touch and for reduced motion. Browse our collection of 8 Shadcn Tilt variants.
Basic
Product card
Runner Pro
$149
Credit card
4821 0937 5512 7740
Profile card
Olivia Martin
Product designer at Acme
128
Posts
12.4k
Followers
312
Following
Pricing card
Pro
Popular$19/ month
- Unlimited projects
- Advanced analytics
- Priority support
Image gallery
App icons
Feature cards
Fast by default
Server rendered pages load in under a second.
Secure
SSO, audit logs and encryption at rest.
Themeable
Match your brand with CSS variables.
Unlock premium components
Explore Shadcn Blocks
Ready-made page sections built with the same components.
Shadcn Tilt Component
The Shadcn Tilt component rotates a card in 3D as the pointer moves across it, with an optional glare that follows the cursor. It adds depth to product cards, credit cards, profile cards and images, so the element feels physical and invites a closer look.
This collection shows the tilt on the surfaces where it works best: a basic card, a product card with glare, a credit card, a profile card, a pricing card, an image gallery, app icons and feature cards with a gentle reverse tilt. It is a small React component for shadcn/ui and Tailwind CSS with no animation library, and it wraps any content, including Card and Avatar.
What is the Shadcn Tilt Component?
Tilt is a wrapper that tracks the pointer and writes the rotation into CSS variables, which a perspective transform reads. React does not re-render while the pointer moves, so the effect stays smooth. When the pointer leaves, the element eases back to flat.
The tilt is turned off for touch input, where there is no hover, and for users who prefer reduced motion. Add glare for a soft light that moves with the cursor.
Anatomy of the Shadcn Tilt
| Part | Description |
|---|---|
| Tilt | The 3D wrapper. Props: maxTilt, perspective, scale, glare, glareOpacity, reverse and speed, plus every div prop. |
| Glare | An optional radial light layer that follows the pointer and fades in on hover. |
8 Shadcn Tilt Variants
Each tilt variant listed here is previewed live at the top of this page, together with its source code and install command.
- Basic: A simple card that follows the pointer.
- Product card: An image, Best seller badge, price and Add to cart button with glare.
- Credit card: A gradient bank card with a chip, number and strong glare.
- Profile card: An avatar, stats and a Follow button with a subtle tilt.
- Pricing card: A Popular plan with features and a light glare.
- Image gallery: Three photos that tilt independently.
- App icons: Rounded gradient icons with a strong tilt and scale.
- Feature cards: A grid of cards with a gentle reverse tilt and no scale.
How to Install the Shadcn Tilt Component
Set up shadcn/ui in your project if you have not already, then add the Shadcn UI Kit registry to your components.json once:
{
"registries": {
"@shadcnuikit": "https://shadcnuikit.com/r/{name}.json"
}
}Then install a tilt variant by its name:
npx shadcn@latest add @shadcnuikit/tilt1The same command works with pnpm dlx, yarn dlx and bunx --bun. Each variant has a copy button for every package manager, and the code is added to your project as plain React and Tailwind CSS that you can edit freely.
How to Use the Shadcn Tilt Component
Wrap the content in Tilt and give it the card styles. Use overflow-hidden when the content has an image so the corners stay rounded.
import { Tilt } from "@/components/ui/tilt"
export function FeaturedProduct() {
return (
<Tilt glare maxTilt={12} className="w-64 overflow-hidden rounded-2xl border bg-card">
<img src="/sneaker.jpg" alt="Running sneaker" />
<div className="p-4">Runner Pro</div>
</Tilt>
)
}Why Use the Shadcn Tilt Component
- Depth without 3D assets: A CSS perspective transform turns any card into a 3D object.
- Smooth: Rotation is written to CSS variables, so React does not re-render on pointer move.
- Optional glare: A moving light adds a glossy finish to cards and images.
- Tunable: Angle, perspective, scale, speed and direction are props.
- Safe defaults: Off on touch screens and for users who prefer reduced motion.
Common Tilt Use Cases
- E-commerce: Featured products and gift cards.
- Fintech: Credit and membership cards.
- Portfolios: Project and image tiles.
- Pricing pages: The highlighted plan.
- Profiles: Team and creator cards.
- Landing pages: App icons and feature cards.
Customizing the Shadcn Tilt
Use a small maxTilt (4 to 8) for text heavy cards and a larger one (12 to 20) for images and icons. A lower perspective makes the effect deeper. reverse makes the card lean away from the pointer, which feels calmer in grids.
<Tilt maxTilt={15} scale={1.04} glare glareOpacity={0.4} perspective={700}>
<CreditCard />
</Tilt>Tilt Accessibility
The tilt is visual only. The content keeps its normal reading order and focus behavior, and the glare layer is aria-hidden. Keep buttons inside the card large enough to click while the card moves.
The effect does not run for touch input or when the user prefers reduced motion, and it never hides content, so the card always works without it.
Tilt Best Practices
- Use tilt on a few featured elements, not on every card in a long list.
- Keep angles small on cards with text so it stays readable.
- Add glare to glossy surfaces like cards and images, not to plain text cards.
- Use overflow-hidden and a border radius so images tilt cleanly.
- Pair it with a clear call to action; the tilt draws attention, the button converts it.
Shadcn Tilt for AI Agents
Tilt is the effect an agent adds when one card should feel tangible: a featured product, a credit or membership card, a profile, the recommended plan or an image tile. Claude Code can wrap the existing card in Tilt, move its classes onto the wrapper and tune angle and glare.
Install it with an AI agent
Claude Code, Cursor, Codex and other agents can install these with the shadcn CLI, for example npx shadcn@latest add @shadcnuikit/tilt1. With the Shadcn UI Kit MCP server, your agent can search every variant by name and add the right one for you. To give it full context, share /components/tilt.md, the Markdown version of this page with every variant and install command.
Example prompts
- “Wrap the featured product card on the home page in Tilt with glare and a 12 degree max tilt.”
- “Add a subtle reverse Tilt with maxTilt 5 to our three feature cards.”
- “Make the virtual card on the wallet page tilt with a strong glare like a real card.”
Customize it with AI
Tilt writes CSS variables instead of state, so the agent should not add React state for the pointer position. Ask it to keep angles small on text heavy cards, add overflow-hidden for images and remember that the effect is off on touch and for reduced motion, so the card must look complete when flat.
Components Related to Tilt
Shadcn Tilt FAQ
npx shadcn@latest add @shadcnuikit/tilt1. With a Pro plan, the Shadcn UI Kit MCP server can also build complete sections and pages around it.Looking for something else? Browse all shadcn/ui components or ready-made UI blocks built with them.

















