
A quiet pattern, drawn one slat at a time.
React Bits brings motion and character to your interface, one copy-paste component at a time.

A quiet pattern, drawn one slat at a time.
React Bits brings motion and character to your interface, one copy-paste component at a time.
A quiet pattern, drawn one slat at a time.
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 | 'swell' | 'tide' | 'storm' | 'signal' | 'swell' | A starting look for the sea. Every wave prop below overrides the preset value when you pass it. Signal turns the field into a flat, equalizer style wall. |
color | '#A855F7' | Color of the slats. | |
glintColor | '#ffffff' | Color the slats shift towards on wave crests and in the light the cursor leaves. | |
backgroundColor | '#000000' | Color behind the slats. Pass transparent to show the page through. | |
slatWidth | 10 | Width of one slat in CSS pixels. | |
slatHeight | 25 | Full height of one slat in CSS pixels. | |
gap | 3 | Space between slats in CSS pixels. | |
roundness | 0.75 | Corner rounding of each slat, from square at 0 to a full pill at 1. | |
scale | from preset | Size of the swell. Larger values give longer, calmer waves. | |
speed | from preset | How fast the waves roll. 0 freezes the sea while the cursor can still stir it. | |
direction | from preset | Heading of the swell in degrees. 270 rolls straight towards the viewer. | |
chop | from preset | Sharpens the crests and flattens the troughs, like wind on the water. | |
stretch | from preset | How much each slat grows and shrinks with the wave under it. 0 keeps every slat full length. | |
glint | from preset | Strength of the light caught on the crests. | |
contrast | from preset | Spread between dark troughs and bright crests. | |
perspective | from preset | How far the sea recedes towards a horizon above the top edge. 0 is a flat wall. | |
fog | from preset | Haze that fades the far rows into the background. | |
interactive | Lets the cursor stir the water. Moving it pushes a real fluid that bends the swell and carries a swirling trail of light, and a click spins out a splash. | ||
cursorStrength | Brightness of the light the cursor leaves in the water. | ||
cursorSize | 40 | Radius of the patch of water the cursor pushes, in CSS pixels. | |
swirl | How strongly the stirred water curls into eddies. | ||
trail | 1.4 | How long the stirred water and its light linger, in seconds. | |
lean | How far the slats tilt with the current. 0 keeps them upright. | ||
| Rolls the sea in from the horizon on mount, unfolding the slats row by row. | |||
introDuration | 1.5 | Length of the intro in seconds. | |
paused | Freezes the waves. The cursor can still stir the water. | ||
| Extra class names for the root element. | |||
| Inline styles for the root element. |
preset'swell' | 'tide' | 'storm' | 'signal'A starting look for the sea. Every wave prop below overrides the preset value when you pass it. Signal turns the field into a flat, equalizer style wall.
'swell'colorstringColor of the slats.
'#A855F7'glintColorstringColor the slats shift towards on wave crests and in the light the cursor leaves.
'#ffffff'backgroundColorstringColor behind the slats. Pass transparent to show the page through.
'#000000'slatWidthnumberWidth of one slat in CSS pixels.
10slatHeightnumberFull height of one slat in CSS pixels.
25gapnumberSpace between slats in CSS pixels.
3roundnessnumberCorner rounding of each slat, from square at 0 to a full pill at 1.
0.75scalenumberSize of the swell. Larger values give longer, calmer waves.
from presetspeednumberHow fast the waves roll. 0 freezes the sea while the cursor can still stir it.
from presetdirectionnumberHeading of the swell in degrees. 270 rolls straight towards the viewer.
from presetchopnumberSharpens the crests and flattens the troughs, like wind on the water.
from presetstretchnumberHow much each slat grows and shrinks with the wave under it. 0 keeps every slat full length.
from presetglintnumberStrength of the light caught on the crests.
from presetcontrastnumberSpread between dark troughs and bright crests.
from presetperspectivenumberHow far the sea recedes towards a horizon above the top edge. 0 is a flat wall.
from presetfognumberHaze that fades the far rows into the background.
from presetinteractivebooleanLets the cursor stir the water. Moving it pushes a real fluid that bends the swell and carries a swirling trail of light, and a click spins out a splash.
cursorStrengthnumberBrightness of the light the cursor leaves in the water.
cursorSizenumberRadius of the patch of water the cursor pushes, in CSS pixels.
40swirlnumberHow strongly the stirred water curls into eddies.
trailnumberHow long the stirred water and its light linger, in seconds.
1.4leannumberHow far the slats tilt with the current. 0 keeps them upright.
introbooleanRolls the sea in from the horizon on mount, unfolding the slats row by row.
introDurationnumberLength of the intro in seconds.
1.5pausedbooleanFreezes the waves. The cursor can still stir the water.
Extra class names for the root element.
Inline styles for the root element.
Dependencies
1 required package
npm install ogl


