Tilt
A restrained depth response to the pointer, returning cleanly to rest.
Live — this one is real
POINTER STUDY
A little depth.
Move across the surface. The reading order and hit targets stay familiar.
Usage
import { Tilt, Frame } from "mizu-ui";
export function Example() {
return (
<Tilt max={5}>
<Frame>
<p className="mizu-field-hint">POINTER STUDY</p>
<h3 style={{ fontSize: 36, letterSpacing: "-.04em", margin: "20px 0" }}>
A little depth.
</h3>
<p className="mizu-field-hint">
Move across the surface. The reading order and hit targets stay
familiar.
</p>
</Frame>
</Tilt>
);
}
Source & setup
Import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Requires React and Motion.
Inspect motion/Tilt.tsx
Source is included in the npm package under src/motion/Tilt.tsx.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| max | number | 6 | Maximum tilt in degrees, clamped to 0–20. |
| children / className | ReactNode / string | — | Surface content and styling. |
Accessibility
Pointer-mouse enhancement only. Touch and keyboard receive a stable surface; no essential information is pointer-dependent.
Motion
Motion springs settle on leave. Reduced motion disables rotation.