Installation
Choose your framework. The registry installs the component and its runtime dependency.
Installation unavailable
The preview is public, but its installable release is still being prepared.
The registry command writes the component to src/lib/components/ui/PrismaticRibbon.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/PrismaticRibbon.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/PrismaticRibbon.vue and installs its dependencies.
Basic usage
The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.
Component API
Types below match the selected Svelte component.
Additional classes for the parent-sized root element.
- Type
string
Travel speed along the ribbon. Negative values reverse direction; zero holds the plates still while preserving pointer interaction.
- Type
number- Default
0.65- Range / values
-2–2
Size of the ribbon and its individual plates within the container.
- Type
number- Default
1- Range / values
0.6–1.8
Rotation of the entire ribbon composition in degrees.
- Type
number- Default
0- Range / values
-180–180
Number of plates along the curve. Lower values reveal more space between the beveled edges.
- Type
number- Default
1- Range / values
0.6–1.35
Depth of each plate. Its face size stays fixed while the edge bevel adapts to thinner profiles.
- Type
number- Default
0.092- Range / values
0.024–0.2
Brightness of the direct and reflected light on the metal plates.
- Type
number- Default
1- Range / values
0.25–3
Strength of the temporary plate tilt near the pointer.
- Type
number- Default
0.8- Range / values
0–1.5
Reach of the pointer in scene units, scaled with the ribbon.
- Type
number- Default
0.65- Range / values
0.2–1.5
Response rate as plates ease toward the pointer and settle after it leaves.
- Type
number- Default
7- Range / values
1–20
Base reflectance color of the metal.
- Type
string- Default
"#9084FF"
Blends between a non-metal surface and conductive metal.
- Type
number- Default
1- Range / values
0–1
Softness of the reflected lights and specular highlight.
- Type
number- Default
0.28- Range / values
0.04–1
Color of the first colored band in the reflected studio environment.
- Type
string- Default
"#C2C6FF"
Color of the second colored band in the reflected studio environment.
- Type
string- Default
"#363764"
Brightness of the reflected studio environment.
- Type
number- Default
1.25- Range / values
0–3
Contrast between dark and bright reflected panels.
- Type
number- Default
1.1- Range / values
0.25–2
Starting angle of the reflected studio lights.
- Type
number- Default
15- Range / values
0–360
Elongation of reflections along the anisotropic surface axes.
- Type
number- Default
0.2- Range / values
0–1
Rotates elongated reflections in the surface plane, in degrees.
- Type
number- Default
0- Range / values
0–360
Strength of the thin-film interference colors. Set to zero for uncoated metal.
- Type
number- Default
0- Range / values
0–1
Refractive index of the thin coating. Higher values strengthen the interference colors.
- Type
number- Default
1.3- Range / values
1–2.333
Thickness of the iridescent coating in nanometers. Changes the reflected color spectrum.
- Type
number- Default
400- Range / values
0–1200
Strength of a transparent polished layer over the metal.
- Type
number- Default
0- Range / values
0–1
Softness of the clearcoat reflections, independent of the metal underneath.
- Type
number- Default
0.1- Range / values
0.04–1
Refractive index of the non-metal portion. Has no effect at full metalness.
- Type
number- Default
1.5- Range / values
1–2.333
Applies a filmic contrast curve to the metal and its highlights.
- Type
boolean- Default
false
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Nearby plates gently tilt toward the pointer and settle when it leaves. Disabling interaction restores the uninterrupted ribbon.
- Type
boolean- Default
true- Range / values
true, false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy
Types below match the selected React component.
Additional classes for the parent-sized root element.
- Type
string
Travel speed along the ribbon. Negative values reverse direction; zero holds the plates still while preserving pointer interaction.
- Type
number- Default
0.65- Range / values
-2–2
Size of the ribbon and its individual plates within the container.
- Type
number- Default
1- Range / values
0.6–1.8
Rotation of the entire ribbon composition in degrees.
- Type
number- Default
0- Range / values
-180–180
Number of plates along the curve. Lower values reveal more space between the beveled edges.
- Type
number- Default
1- Range / values
0.6–1.35
Depth of each plate. Its face size stays fixed while the edge bevel adapts to thinner profiles.
- Type
number- Default
0.092- Range / values
0.024–0.2
Brightness of the direct and reflected light on the metal plates.
- Type
number- Default
1- Range / values
0.25–3
Strength of the temporary plate tilt near the pointer.
- Type
number- Default
0.8- Range / values
0–1.5
Reach of the pointer in scene units, scaled with the ribbon.
- Type
number- Default
0.65- Range / values
0.2–1.5
Response rate as plates ease toward the pointer and settle after it leaves.
- Type
number- Default
7- Range / values
1–20
Base reflectance color of the metal.
- Type
string- Default
"#9084FF"
Blends between a non-metal surface and conductive metal.
- Type
number- Default
1- Range / values
0–1
Softness of the reflected lights and specular highlight.
- Type
number- Default
0.28- Range / values
0.04–1
Color of the first colored band in the reflected studio environment.
- Type
string- Default
"#C2C6FF"
Color of the second colored band in the reflected studio environment.
- Type
string- Default
"#363764"
Brightness of the reflected studio environment.
- Type
number- Default
1.25- Range / values
0–3
Contrast between dark and bright reflected panels.
- Type
number- Default
1.1- Range / values
0.25–2
Starting angle of the reflected studio lights.
- Type
number- Default
15- Range / values
0–360
Elongation of reflections along the anisotropic surface axes.
- Type
number- Default
0.2- Range / values
0–1
Rotates elongated reflections in the surface plane, in degrees.
- Type
number- Default
0- Range / values
0–360
Strength of the thin-film interference colors. Set to zero for uncoated metal.
- Type
number- Default
0- Range / values
0–1
Refractive index of the thin coating. Higher values strengthen the interference colors.
- Type
number- Default
1.3- Range / values
1–2.333
Thickness of the iridescent coating in nanometers. Changes the reflected color spectrum.
- Type
number- Default
400- Range / values
0–1200
Strength of a transparent polished layer over the metal.
- Type
number- Default
0- Range / values
0–1
Softness of the clearcoat reflections, independent of the metal underneath.
- Type
number- Default
0.1- Range / values
0.04–1
Refractive index of the non-metal portion. Has no effect at full metalness.
- Type
number- Default
1.5- Range / values
1–2.333
Applies a filmic contrast curve to the metal and its highlights.
- Type
boolean- Default
false
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Nearby plates gently tilt toward the pointer and settle when it leaves. Disabling interaction restores the uninterrupted ribbon.
- Type
boolean- Default
true- Range / values
true, false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
PrismaticRibbonHandle- Range / values
pause, resume, reset, resize, destroy
Types below match the selected Vue component.
Additional classes for the parent-sized root element.
- Type
string
Travel speed along the ribbon. Negative values reverse direction; zero holds the plates still while preserving pointer interaction.
- Type
number- Default
0.65- Range / values
-2–2
Size of the ribbon and its individual plates within the container.
- Type
number- Default
1- Range / values
0.6–1.8
Rotation of the entire ribbon composition in degrees.
- Type
number- Default
0- Range / values
-180–180
Number of plates along the curve. Lower values reveal more space between the beveled edges.
- Type
number- Default
1- Range / values
0.6–1.35
Depth of each plate. Its face size stays fixed while the edge bevel adapts to thinner profiles.
- Type
number- Default
0.092- Range / values
0.024–0.2
Brightness of the direct and reflected light on the metal plates.
- Type
number- Default
1- Range / values
0.25–3
Strength of the temporary plate tilt near the pointer.
- Type
number- Default
0.8- Range / values
0–1.5
Reach of the pointer in scene units, scaled with the ribbon.
- Type
number- Default
0.65- Range / values
0.2–1.5
Response rate as plates ease toward the pointer and settle after it leaves.
- Type
number- Default
7- Range / values
1–20
Base reflectance color of the metal.
- Type
string- Default
"#9084FF"
Blends between a non-metal surface and conductive metal.
- Type
number- Default
1- Range / values
0–1
Softness of the reflected lights and specular highlight.
- Type
number- Default
0.28- Range / values
0.04–1
Color of the first colored band in the reflected studio environment.
- Type
string- Default
"#C2C6FF"
Color of the second colored band in the reflected studio environment.
- Type
string- Default
"#363764"
Brightness of the reflected studio environment.
- Type
number- Default
1.25- Range / values
0–3
Contrast between dark and bright reflected panels.
- Type
number- Default
1.1- Range / values
0.25–2
Starting angle of the reflected studio lights.
- Type
number- Default
15- Range / values
0–360
Elongation of reflections along the anisotropic surface axes.
- Type
number- Default
0.2- Range / values
0–1
Rotates elongated reflections in the surface plane, in degrees.
- Type
number- Default
0- Range / values
0–360
Strength of the thin-film interference colors. Set to zero for uncoated metal.
- Type
number- Default
0- Range / values
0–1
Refractive index of the thin coating. Higher values strengthen the interference colors.
- Type
number- Default
1.3- Range / values
1–2.333
Thickness of the iridescent coating in nanometers. Changes the reflected color spectrum.
- Type
number- Default
400- Range / values
0–1200
Strength of a transparent polished layer over the metal.
- Type
number- Default
0- Range / values
0–1
Softness of the clearcoat reflections, independent of the metal underneath.
- Type
number- Default
0.1- Range / values
0.04–1
Refractive index of the non-metal portion. Has no effect at full metalness.
- Type
number- Default
1.5- Range / values
1–2.333
Applies a filmic contrast curve to the metal and its highlights.
- Type
boolean- Default
false
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Nearby plates gently tilt toward the pointer and settle when it leaves. Disabling interaction restores the uninterrupted ribbon.
- Type
boolean- Default
true- Range / values
true, false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy