Gyre
Your words in extruded iridescent foil, running round the edge of their box, ring behind ring, until the deeper rings fade into black. Resize the box and the rings re-fit live, picking how many copies of the phrase close one lap. Move the pointer and the rings shift in parallax; scroll the wheel to push them faster. The words, separator, letter size, depth, bevel, ring spacing, lens, seven foil colours, glints, glow and grain are all props, with a light mode alongside the dark default. Three.js with opentype.js glyphs, one instanced shader, bloom and film grain.
npx shadcn@latest add @compronents/gyreInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
Checking access…
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | "SAY IT LOUDER" | The words, up to 60 characters. Uppercased, runs of spaces collapsed. |
| sep | string | "•" | Mark between repeats of the phrase, up to 4 characters. Empty for none. |
| tracking | number | 0.04 | Letter spacing in cap heights, -0.1 to 0.4. |
| wordGap | number | 0.42 | Word spacing in cap heights, 0.1 to 1.5. |
| size | number | 0.115 | Letter size as a share of the box's short side, 0.05 to 0.22. The ring count rounds this so the phrase closes the loop. |
| extrude | number | 0.5 | Letter depth in cap heights, 0.05 to 1.2. Changing it re-cuts every glyph. |
| bevel | number | 0.045 | Bevel in cap heights, 0 to 0.12. |
| margin | number | 18 | Space between the front ring and the box edge, in CSS px, 0 to 80. |
| corner | number | 0.6 | Corner radius of the ring path in cap heights, 0.1 to 3. |
| turnGap | number | 0.55 | Gap between one ring and the next, 0.05 to 1.5. |
| turns | number | 8 | Rings drawn behind the front one, 2 to 12. Fog usually hides the last few. |
| fogStart | number | 0.7 | Ring at which the fade into the ground starts, 0 to 8. |
| fogEnd | number | 3.8 | Ring at which letters are fully gone, 1 to 12. |
| speed | number | 0.6 | Letters per second, -3 to 3. Negative runs the other way. |
| push | number | 1.2 | How hard the mouse wheel throws the rings, 0 to 4. The push decays over about half a second. |
| fov | number | 52 | Lens in degrees, 20 to 90. Wider makes the rings recede faster. |
| parallax | number | 0.5 | How far the eye follows the pointer, 0 to 1.5. The front ring stays pinned to the box. |
| resizeLag | number | 0 | Seconds the rings take to follow a resize, 0 to 1. 0 follows at once. |
| c1 … c7 | string | "#6f9fc8" … "#5e5fa3" | The seven foil colours in light mode, swept round the frame. |
| c1Dark … c7Dark | string | "#9cc6e0" … "#8689bd" | The seven foil colours in dark mode. |
| sat | number | 1.7 | Colour strength, 0 (grey) to 3. |
| spread | number | 0.9 | How many times the ramp repeats round one lap, 0 to 3. |
| letterHue | number | 0.32 | Colour change from the foot to the top of a letter, 0 to 1.5. |
| film | number | 0.75 | Colour shift with view angle, like thin film, 0 to 2. |
| drift | number | 0.03 | Slow colour drift over time, 0 to 0.3. |
| sideShade | number | 0.66 | Brightness of the extruded sides, 0.2 to 1.2. |
| sideShift | number | 0.3 | How far along the ramp the sides sit from the face, 0 to 1. |
| pale | number | 0.12 | Whitens faces that look straight at the camera, 0 to 1. Halved in light mode. |
| gloss | number | 0.7 | Horizon band reflected in the faces, 0 to 2. |
| glint | number | 1.6 | Strength of the two specular glints, 0 to 4. |
| glintColor / glintColorDark | string | "#ffffff" | Glint and band colour per mode. |
| glow | number | 0.4 | Bloom strength, 0 to 2. Light mode uses 30% of it. |
| grain | number | 0.055 | Film grain, 0 to 0.25. Light mode uses 70% of it. |
| appearance | "auto" | "light" | "dark" | "dark" | Which colour set to use. "auto" follows the page: data-theme, color-scheme, a .dark class, then the OS. |
| ground / groundDark | string | "#ecebe7" / "#020203" | Background and fog colour per mode. |
| fontUrl | string | GYRE_FONT_URL | Font for the letters (woff, ttf or otf), parsed with opentype.js. Defaults to Unbounded Black. |
| onReady | (gyre: GyreHandle) => void | — | Receives the running engine: set(), setZoom(), stats() and debug (freeze, setTime, settle, hand) for exact frames. |
| className | string | — | Classes for the root. It fills its parent, so give the parent a size. |
| style | CSSProperties | — | Additional styles for the root. |
threeopentype.js