CardsNew

Tilt

A card tilts in 3D after the cursor and springs back when it leaves.

Customize

glareColor
glowColor
edgeColor

Based on Tilt (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
childrenReactNode—The card or image that tilts.
rotationFactornumber15Maximum tilt in degrees.
isRevesebooleanfalseTilt away from the cursor instead of toward it.
springOptionsSpringOptions—Motion spring options: softness and speed of the tilt.
styleMotionStyle—Wrapper styles.
classNamestring—Tailwind classes for the wrapper.
glareColorstring"rgba(255,255,255,0.25)"Glare that follows the cursor across the card.
glowColorstring"rgba(255,255,255,0.08)"Soft glow under the card.
edgeColorstring"rgba(255,255,255,0.1)"Thin rim along the edge. It follows the element's rounded corners.

Dependencies

1 required package

npm install motion

Related components

View all