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/GlassFlow.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/GlassFlow.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/GlassFlow.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
Direction of the flowing ribbons in degrees.
- Type
number- Default
-68- Range / values
-180–180
Strength of the organic bends in the ribbons.
- Type
number- Default
0.5- Range / values
0–2
Size of the flowing pattern behind the glass.
- Type
number- Default
2- Range / values
0.25–2
Spread of the color transitions around the ribbons.
- Type
number- Default
1- Range / values
0.25–3
Direction of the glass ribs in degrees.
- Type
number- Default
0- Range / values
-180–180
Strength of image displacement.
- Type
number- Default
1- Range / values
0–3
Separation of red and blue along the refracted direction.
- Type
number- Default
0.35- Range / values
0–3
Width of each repeating glass rib.
- Type
number- Default
0.75- Range / values
0.2–2.5
Speed of the flowing ribbons behind the glass.
- Type
number- Default
0.3- Range / values
0–2
Color between the flowing ribbons behind the glass.
- Type
string- Default
"#16171D"
Color of the outer transition around the ribbons.
- Type
string- Default
"#363764"
Color of the broad bands around the ribbons.
- Type
string- Default
"#9084FF"
Color inside the ribbons.
- Type
string- Default
"#C2C6FF"
Color at the center of the ribbons.
- Type
string- Default
"#F0F2FF"
Strength of the dusty texture and scattered pigment.
- Type
number- Default
0.25- Range / values
0–1
Size of the coarse grain in CSS pixels, independent of the pattern.
- Type
number- Default
0.5- Range / values
0.5–4
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
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
Direction of the flowing ribbons in degrees.
- Type
number- Default
-68- Range / values
-180–180
Strength of the organic bends in the ribbons.
- Type
number- Default
0.5- Range / values
0–2
Size of the flowing pattern behind the glass.
- Type
number- Default
2- Range / values
0.25–2
Spread of the color transitions around the ribbons.
- Type
number- Default
1- Range / values
0.25–3
Direction of the glass ribs in degrees.
- Type
number- Default
0- Range / values
-180–180
Strength of image displacement.
- Type
number- Default
1- Range / values
0–3
Separation of red and blue along the refracted direction.
- Type
number- Default
0.35- Range / values
0–3
Width of each repeating glass rib.
- Type
number- Default
0.75- Range / values
0.2–2.5
Speed of the flowing ribbons behind the glass.
- Type
number- Default
0.3- Range / values
0–2
Color between the flowing ribbons behind the glass.
- Type
string- Default
"#16171D"
Color of the outer transition around the ribbons.
- Type
string- Default
"#363764"
Color of the broad bands around the ribbons.
- Type
string- Default
"#9084FF"
Color inside the ribbons.
- Type
string- Default
"#C2C6FF"
Color at the center of the ribbons.
- Type
string- Default
"#F0F2FF"
Strength of the dusty texture and scattered pigment.
- Type
number- Default
0.25- Range / values
0–1
Size of the coarse grain in CSS pixels, independent of the pattern.
- Type
number- Default
0.5- Range / values
0.5–4
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
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
GlassFlowHandle- Range / values
pause, resume, reset, resize, destroy
Types below match the selected Vue component.
Additional classes for the parent-sized root element.
- Type
string
Direction of the flowing ribbons in degrees.
- Type
number- Default
-68- Range / values
-180–180
Strength of the organic bends in the ribbons.
- Type
number- Default
0.5- Range / values
0–2
Size of the flowing pattern behind the glass.
- Type
number- Default
2- Range / values
0.25–2
Spread of the color transitions around the ribbons.
- Type
number- Default
1- Range / values
0.25–3
Direction of the glass ribs in degrees.
- Type
number- Default
0- Range / values
-180–180
Strength of image displacement.
- Type
number- Default
1- Range / values
0–3
Separation of red and blue along the refracted direction.
- Type
number- Default
0.35- Range / values
0–3
Width of each repeating glass rib.
- Type
number- Default
0.75- Range / values
0.2–2.5
Speed of the flowing ribbons behind the glass.
- Type
number- Default
0.3- Range / values
0–2
Color between the flowing ribbons behind the glass.
- Type
string- Default
"#16171D"
Color of the outer transition around the ribbons.
- Type
string- Default
"#363764"
Color of the broad bands around the ribbons.
- Type
string- Default
"#9084FF"
Color inside the ribbons.
- Type
string- Default
"#C2C6FF"
Color at the center of the ribbons.
- Type
string- Default
"#F0F2FF"
Strength of the dusty texture and scattered pigment.
- Type
number- Default
0.25- Range / values
0–1
Size of the coarse grain in CSS pixels, independent of the pattern.
- Type
number- Default
0.5- Range / values
0.5–4
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
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