A translucent ribbon of light tied into a slowly turning knot
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#FF9FFC"] | The two colours the ribbon blends between along its length. On light backgrounds they become matching inks. |
backgroundColor | string | "transparent" | Background of the component. Transparent reads the colour behind the component. |
shape | "trefoil" | "cinquefoil" | "septafoil" | "star" | "tangle" | "halo" | "trefoil" | The knot the ribbon is tied into. Halo is a plain ring that frames a headline. |
size | number | 0.72 | Size of the knot as a share of the frame. Values above 1 crop it for a close-up. |
offsetX | number | 0 | Moves the knot sideways, as a share of the frame width. |
offsetY | number | 0 | Moves the knot down (positive) or up (negative), as a share of the frame height. |
ribbonWidth | number | 0.34 | Width of the ribbon relative to the knot. |
loop | number | 0.42 | How far the knot loops out from its centre ring. |
twists | number | 4 | Half-turns of twist along the ribbon. One half-turn on the halo makes a Möbius band. |
flowSpeed | number | 0.5 | How fast the twist and the colours drift along the ribbon. |
rotationSpeed | number | 0.5 | Speed of the slow turn. Negative values turn the other way. |
tilt | number | 32 | How far the knot leans back from the viewer, in degrees. |
glow | number | 1 | Brightness of the translucent body of the ribbon. |
edges | number | 1 | Brightness of the fine lines along the ribbon's edges. |
folds | number | 1 | How brightly light gathers where the ribbon turns edge-on. |
sheen | number | 1 | Strength of the silky highlight. The pointer moves its light. |
threads | number | 0 | Weaves fine threads into the ribbon, like organza. |
depth | number | 0.6 | How much the far side of the knot dims and softens. |
parallax | number | 0.5 | How much the knot leans toward the pointer as it moves. |
interactive | boolean | true | The pointer moves the light across the ribbon, and a click flips the ribbon at the nearest point. |
draggable | boolean | true | Drag to turn the knot. It keeps the speed of your throw, then settles back. |
flip | number | 1 | Strength of the twist a click sends along the ribbon, from 0 to 2. |
bloom | number | 0.6 | Soft glow around the brightest folds and edges. |
grain | number | 0.25 | Fine film grain over the lit areas. |
intro | boolean | true | The ribbon draws itself along the knot and closes it when the component appears. |
paused | boolean | false | Stops the motion. Dragging still turns the knot. Reduced-motion users get a still knot. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
children | ReactNode | — | Content laid over the scene. Clicks on its links and buttons never flip the ribbon. |
ref | { flip, spin, replay } | — | flip(position?, strength?) sends a twist from a point along the ribbon (0 to 1), spin(velocity?) throws the knot, replay() ties the knot again. |
className | string | — | Classes for the root element. It fills its parent, with a 320px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]The two colours the ribbon blends between along its length. On light backgrounds they become matching inks.
["#5227FF", "#FF9FFC"]backgroundColorstringBackground of the component. Transparent reads the colour behind the component.
"transparent"shape"trefoil" | "cinquefoil" | "septafoil" | "star" | "tangle" | "halo"The knot the ribbon is tied into. Halo is a plain ring that frames a headline.
"trefoil"sizenumberSize of the knot as a share of the frame. Values above 1 crop it for a close-up.
0.72offsetXnumberMoves the knot sideways, as a share of the frame width.
0offsetYnumberMoves the knot down (positive) or up (negative), as a share of the frame height.
0ribbonWidthnumberWidth of the ribbon relative to the knot.
0.34loopnumberHow far the knot loops out from its centre ring.
0.42twistsnumberHalf-turns of twist along the ribbon. One half-turn on the halo makes a Möbius band.
4flowSpeednumberHow fast the twist and the colours drift along the ribbon.
0.5rotationSpeednumberSpeed of the slow turn. Negative values turn the other way.
0.5tiltnumberHow far the knot leans back from the viewer, in degrees.
32glownumberBrightness of the translucent body of the ribbon.
1edgesnumberBrightness of the fine lines along the ribbon's edges.
1foldsnumberHow brightly light gathers where the ribbon turns edge-on.
1sheennumberStrength of the silky highlight. The pointer moves its light.
1threadsnumberWeaves fine threads into the ribbon, like organza.
0depthnumberHow much the far side of the knot dims and softens.
0.6parallaxnumberHow much the knot leans toward the pointer as it moves.
0.5interactivebooleanThe pointer moves the light across the ribbon, and a click flips the ribbon at the nearest point.
truedraggablebooleanDrag to turn the knot. It keeps the speed of your throw, then settles back.
trueflipnumberStrength of the twist a click sends along the ribbon, from 0 to 2.
1bloomnumberSoft glow around the brightest folds and edges.
0.6grainnumberFine film grain over the lit areas.
0.25introbooleanThe ribbon draws itself along the knot and closes it when the component appears.
truepausedbooleanStops the motion. Dragging still turns the knot. Reduced-motion users get a still knot.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent laid over the scene. Clicks on its links and buttons never flip the ribbon.
—ref{ flip, spin, replay }flip(position?, strength?) sends a twist from a point along the ribbon (0 to 1), spin(velocity?) throws the knot, replay() ties the knot again.
—classNamestringClasses for the root element. It fills its parent, with a 320px minimum height.
—styleCSSPropertiesInline styles for the root element.
—