Tilt card
A Calamansi card that leans towards your pointer, with a light sheen that follows the tilt.
Rind
maxTilt 16 · glare on
Calamansi Surface
Leans smoothly towards the pointer with real-time 3D spring physics and interactive light sheen.
Flesh
maxTilt 8 · no glare
- Spring
- 220 / 18
- Fallback
- reduced motion
- Pointer
- continuous
- Return
- flat
Move your pointer over a card, then let it go.
Installation
npx shadcn@latest add fujiDevv/calamansi-ui/tilt-cardHow to use
import { TiltCard } from "@/components/ui/tilt-card"import { Citrus } from "lucide-react"export function Demo() {return (<TiltCardclassName="max-w-sm"icon={<Citrus className="size-5" />}title="Rind"subtitle="Interactive 3D"maxTilt={16}><p className="text-sm font-medium text-white/85">Move your pointer over the card to see it lean in 3D.</p></TiltCard>)}
Props
Options you can pass to customize this component.
titleoptionalReactNodeTitle displayed in the header.
subtitleoptionalReactNodeSubtitle or description shown under the title.
iconoptionalReactNodeIcon displayed alongside the title in the header.
badgeoptionalReactNodeBadge or element displayed at the top right.
headeroptionalReactNodeCustom header element replacing the default title row.
childrenoptionalReactNodeContent displayed on the surface.
maxTiltoptionalnumberMaximum rotation, in degrees, at the corners.
hoverScaleoptionalnumberScale applied while the pointer is over the card.
glareoptionalbooleanDraw a sheen that follows the pointer.
stiffnessoptionalnumberSpring stiffness for the return.
dampingoptionalnumberSpring damping. Lower is bouncier.
variantoptionalwhitecalamansislatecitrusSurface palette. Calamansi is the default slab; White is white in light mode and near-black in dark.
classNameoptionalstringExtra classes merged onto the card.
Dependencies
Credits
- •Design inspired by Jay Dwivedi (https://sprrrint.com/jaydwivedi)
License & Usage
- •Free to use and modify in personal and commercial projects.
- •Attribution to Calamansi UI is appreciated when using a component.
- •Please do not resell the components as your own kit.