Tilt Card
A card that tilts in 3D toward the pointer, with an optional glare.
Import
import { TiltCard } from "@cronus-ui/ui";
npx cronus-ui add tilt-card
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component TiltCardDefault layout:inline style:tilt-card {
label "Hover me"
}
page "/audit/tilt-card/default" type:custom {
use TiltCardDefault
}
API Reference
Generated from the component's exported types.
TiltCardProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
maxTilt | number | 12 | Maximum rotation, in degrees, reached on each axis at the card's edges. Higher feels more dramatic. |
glare | boolean | false | Render a soft pointer-following glare sheen across the surface. |
scale | number | 1.03 | Uniform zoom applied while the pointer is over the card (`1` = none). |
parallax | boolean | false | Lift the content toward the viewer on hover for a layered parallax depth effect. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |