reactbits.dev
Get started

Soft light on a moving surface.

React Bits brings motion and character to your interface, one copy-paste component at a time.

Start buildingBrowse components
9:41

Soft light on a moving surface.

React Bits brings motion and character to your interface, one copy-paste component at a time.

Start buildingBrowse components

Soft light on a moving surface.

React Bits brings motion and character to your interface, one copy-paste component at a time.

Get startedLearn more
Characters
Spacing
9px
Mark Size
0.95
Depth
0.95
Light
0°
Shine
0.8
Contrast
1.2
Speed
0.35
Scale
Direction
20°
Fade Size
0.5
Opacity
Cursor Size
50px
Cursor Strength
0.6

More backgrounds in Pro

Shader scenes and animated surfaces made to sit behind real content.

View all 106
25 properties
preset'silk' | 'ocean' | 'pond' | 'lines' | 'terminal' | 'mesh''silk'A complete starting look. Every pattern, wave and light prop below overrides the preset value when you pass it.
pattern'dot' | 'square' | 'plus' | 'line' | 'glyph'from presetThe mark that draws the surface. Line traces it as flowing contour lines, glyph uses characters picked by brightness.
wave'silk' | 'swell' | 'ripple'from presetThe shape of the moving surface. Silk is draped fabric folds, swell is rolling parallel waves, ripple is rings travelling in from off screen.
color'#ffffff'The one color of the pattern. Shadows, midtones and highlights are all derived from it. A color darker than the background prints like ink.
backgroundColor'#000000'Color behind the pattern. Pass transparent to show the page through.
spacingfrom presetDistance between marks in CSS pixels. Smaller values give a finer print.
markSizefrom presetLargest mark as a fraction of the spacing.
depthfrom presetHow tall the surface is. Deeper surfaces cast stronger shading and lift the marks along the crests.
lightfrom presetAngle of the light across the waves in degrees, from -90 to 90. 0 lights the folds head on, larger values graze them.
shinefrom presetStrength of the glints where the surface catches the light.
contrastfrom presetSpread between the quiet shadows and the lit areas.
speedfrom presetHow fast the surface moves. 0 freezes it while the cursor keeps working.
scalefrom presetSize of the waves. Larger values give broader, calmer forms.
directionfrom presetDirection the waves travel in degrees. The light turns with it.
opacityOverall opacity of the pattern, from 0 to 1.
fade'edges' | 'center' | 'bottom' | 'top' | 'none''edges'Where the pattern fades into the background. Center keeps the middle calm for a headline, bottom and top fade towards that edge.
fadeSize0.5How far the fade reaches, from 0.05 to 1.
characters'.:-=+*#%@'Characters for the glyph pattern, ordered from the lightest to the densest.
interactiveLets the cursor disturb the surface. Moving it leaves a wake of ripples that catch the light, a click drops a splash.
cursorSize50Radius of the patch of surface the cursor pushes, in CSS pixels.
cursorStrength0.6How hard the cursor pushes the surface, from 0 to 1.
On mount the marks fade in from the center, then the surface rises and the light sweeps across it.
pausedFreezes the surface. The cursor ripples keep working.
Extra class names for the root element.
Inline styles for the root element.
preset'silk' | 'ocean' | 'pond' | 'lines' | 'terminal' | 'mesh'

A complete starting look. Every pattern, wave and light prop below overrides the preset value when you pass it.

Default'silk'
pattern'dot' | 'square' | 'plus' | 'line' | 'glyph'

The mark that draws the surface. Line traces it as flowing contour lines, glyph uses characters picked by brightness.

Defaultfrom preset
wave'silk' | 'swell' | 'ripple'

The shape of the moving surface. Silk is draped fabric folds, swell is rolling parallel waves, ripple is rings travelling in from off screen.

Defaultfrom preset
colorstring

The one color of the pattern. Shadows, midtones and highlights are all derived from it. A color darker than the background prints like ink.

Default'#ffffff'
backgroundColorstring

Color behind the pattern. Pass transparent to show the page through.

Default'#000000'
spacingnumber

Distance between marks in CSS pixels. Smaller values give a finer print.

Defaultfrom preset
markSizenumber

Largest mark as a fraction of the spacing.

Defaultfrom preset
depthnumber

How tall the surface is. Deeper surfaces cast stronger shading and lift the marks along the crests.

Defaultfrom preset
lightnumber

Angle of the light across the waves in degrees, from -90 to 90. 0 lights the folds head on, larger values graze them.

Defaultfrom preset
shinenumber

Strength of the glints where the surface catches the light.

Defaultfrom preset
contrastnumber

Spread between the quiet shadows and the lit areas.

Defaultfrom preset
speednumber

How fast the surface moves. 0 freezes it while the cursor keeps working.

Defaultfrom preset
scalenumber

Size of the waves. Larger values give broader, calmer forms.

Defaultfrom preset
directionnumber

Direction the waves travel in degrees. The light turns with it.

Defaultfrom preset
opacitynumber

Overall opacity of the pattern, from 0 to 1.

fade'edges' | 'center' | 'bottom' | 'top' | 'none'

Where the pattern fades into the background. Center keeps the middle calm for a headline, bottom and top fade towards that edge.

Default'edges'
fadeSizenumber

How far the fade reaches, from 0.05 to 1.

Default0.5
charactersstring

Characters for the glyph pattern, ordered from the lightest to the densest.

Default'.:-=+*#%@'
interactiveboolean

Lets the cursor disturb the surface. Moving it leaves a wake of ripples that catch the light, a click drops a splash.

cursorSizenumber

Radius of the patch of surface the cursor pushes, in CSS pixels.

Default50
cursorStrengthnumber

How hard the cursor pushes the surface, from 0 to 1.

Default0.6
introboolean

On mount the marks fade in from the center, then the surface rises and the light sweeps across it.

pausedboolean

Freezes the surface. The cursor ripples keep working.

Extra class names for the root element.

Inline styles for the root element.

Dependencies

1 required package

npm install ogl