
Soft light on a moving surface.
React Bits brings motion and character to your interface, one copy-paste component at a time.

Soft light on a moving surface.
React Bits brings motion and character to your interface, one copy-paste component at a time.
Soft light on a moving surface.
React Bits brings motion and character to your interface, one copy-paste component at a time.
More backgrounds in Pro
Shader scenes and animated surfaces made to sit behind real content.
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 preset | The mark that draws the surface. Line traces it as flowing contour lines, glyph uses characters picked by brightness. |
wave | 'silk' | 'swell' | 'ripple' | from preset | The 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. | |
spacing | from preset | Distance between marks in CSS pixels. Smaller values give a finer print. | |
markSize | from preset | Largest mark as a fraction of the spacing. | |
depth | from preset | How tall the surface is. Deeper surfaces cast stronger shading and lift the marks along the crests. | |
light | from preset | Angle of the light across the waves in degrees, from -90 to 90. 0 lights the folds head on, larger values graze them. | |
shine | from preset | Strength of the glints where the surface catches the light. | |
contrast | from preset | Spread between the quiet shadows and the lit areas. | |
speed | from preset | How fast the surface moves. 0 freezes it while the cursor keeps working. | |
scale | from preset | Size of the waves. Larger values give broader, calmer forms. | |
direction | from preset | Direction the waves travel in degrees. The light turns with it. | |
opacity | Overall 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. |
fadeSize | 0.5 | How far the fade reaches, from 0.05 to 1. | |
characters | '.:-=+*#%@' | Characters for the glyph pattern, ordered from the lightest to the densest. | |
interactive | Lets the cursor disturb the surface. Moving it leaves a wake of ripples that catch the light, a click drops a splash. | ||
cursorSize | 50 | Radius of the patch of surface the cursor pushes, in CSS pixels. | |
cursorStrength | 0.6 | How 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. | |||
paused | Freezes 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.
'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.
from presetwave'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.
from presetcolorstringThe one color of the pattern. Shadows, midtones and highlights are all derived from it. A color darker than the background prints like ink.
'#ffffff'backgroundColorstringColor behind the pattern. Pass transparent to show the page through.
'#000000'spacingnumberDistance between marks in CSS pixels. Smaller values give a finer print.
from presetmarkSizenumberLargest mark as a fraction of the spacing.
from presetdepthnumberHow tall the surface is. Deeper surfaces cast stronger shading and lift the marks along the crests.
from presetlightnumberAngle of the light across the waves in degrees, from -90 to 90. 0 lights the folds head on, larger values graze them.
from presetshinenumberStrength of the glints where the surface catches the light.
from presetcontrastnumberSpread between the quiet shadows and the lit areas.
from presetspeednumberHow fast the surface moves. 0 freezes it while the cursor keeps working.
from presetscalenumberSize of the waves. Larger values give broader, calmer forms.
from presetdirectionnumberDirection the waves travel in degrees. The light turns with it.
from presetopacitynumberOverall 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.
'edges'fadeSizenumberHow far the fade reaches, from 0.05 to 1.
0.5charactersstringCharacters for the glyph pattern, ordered from the lightest to the densest.
'.:-=+*#%@'interactivebooleanLets the cursor disturb the surface. Moving it leaves a wake of ripples that catch the light, a click drops a splash.
cursorSizenumberRadius of the patch of surface the cursor pushes, in CSS pixels.
50cursorStrengthnumberHow hard the cursor pushes the surface, from 0 to 1.
0.6introbooleanOn mount the marks fade in from the center, then the surface rises and the light sweeps across it.
pausedbooleanFreezes 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


