Tilt
A wrapper that applies a mouse-tracking CSS 3D perspective tilt to any child element.
Installation
npx dafink-ui add tiltDemo
Hover me
max=20
Props
| Name | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | Content to tilt. Can be any element: card, image, hero block. |
| max | number | 15 | Maximum tilt angle in degrees. |
| scale | number | 1.05 | Scale factor applied while the cursor is inside the element. |
| perspective | number | 1000 | CSS perspective distance in pixels. Lower values exaggerate the effect. |
| className | string | "" | Additional classes applied to the wrapper div. |