Holo Foil
Web (React)
An iridescent holographic foil card with glitter and rainbow sheen.
A rounded holographic foil card with an animated rainbow sheen, crinkles and glitter, on a dark gradient with fine grain. It fills its positioned parent and freezes its animation when the user prefers reduced motion. Built on the shaders library (MIT) and rendered with WebGPU.
Holo Foil
Installation
CLI
npx @modus-ui/cli add holo-foilManual
- Install
shaderswithnpm install shaders. - Copy the code from the component tab.
- Create a file at
components/ui/holo-foil.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
backgroundFrom | string | "#18181b" | Gradient start colour. |
backgroundTo | string | "#09090b" | Gradient end colour. |
speed | number | 1 | Sheen animation speed. |
saturation | number | 0.75 | Saturation of the foil colours. |
sparkle | number | 0.4 | Amount of glitter. |
crinkle | number | 0.5 | Amount of crinkle in the foil. |
width | number | 0.32 | Card half-width (fraction of the canvas). |
height | number | 0.42 | Card half-height (fraction of the canvas). |
rounding | number | 0.06 | Corner rounding. |
Comments