RibbonField
An animated canvas field of two woven ribbons, with an optional word threaded through the weave. Colors come from the theme tokens; the ribbons bend toward the pointer while it is held down.
Install: pnpm add-component RibbonField
Live field
The canvas fills its container, so the height comes from the parent. Press and drag inside it — hovering does nothing, the pull is a grab.
Full-viewport hero
One viewport tall, with the word inside the canvas rather than layered under it — which is what lets the ribbons thread through the letters instead of lying flat across them. There is no text in the section: the word in the weave is the text, so keep the page's real h1 in the section below.
Explicit ramps
Each ramp runs shadow → highlight and is sampled per-quad by the lighting term, so they are gradients rather than flat values. Pass your own when the field should not track the theme.
Decorative background
With no word and no pointer handling, the field is a moving backdrop. It still stops drawing when scrolled out of view or when the tab is hidden.
API
word(string): Woven into the ribbons at z = 0. Pass it already cased — nothing is uppercased for you. Omit it for a field of bare ribbons.ramps(readonly (readonly string[])[]): Two ramps of CSS colors, shadow → highlight, replacing the ones derived from --color-accent / --color-ring. Any stop count works.wordColor(string): Fill for the word. Any CSS color.interactive(boolean): Set false for a purely decorative field that ignores the pointer — no grab cursor, no listeners bound.