
Every line turns to follow your cursor
React Bits brings motion and character to your interface, one copy-paste component at a time.

Every line turns to follow your cursor
React Bits brings motion and character to your interface, one copy-paste component at a time.
Every line turns to follow your cursor
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.
spacing | 30 | Distance between lines in px. The grid fills the area with as many lines as fit. | |
rows | Exact number of rows. Overrides spacing. | ||
columns | Exact number of columns. Overrides spacing. | ||
containerSize | number | string | Draws a square field of this width instead of filling the parent. Numbers are in px; strings take any CSS length. | |
lineColor | '#efefef' | Color of the lines. | |
accentColor | Color lines take on near the cursor. Compass needles use it for their north half. | ||
lineWidth | number | string | 2 | Thickness of each line. Numbers are in px; strings take any CSS length. |
lineHeight | number | string | 18 | Length of each line. Numbers are in px; strings take any CSS length. |
baseAngle | -10 | Resting angle of the lines in degrees, used before the intro and outside the reach. | |
mode | 'orbit' | 'attract' | 'spiral' | 'dipole' | 'orbit' | Shape of the field: rings around the cursor, lines aiming at it, a vortex, or a bar magnet that turns with your movement. |
shape | 'line' | 'arrow' | 'needle' | 'line' | Draws each line as a rounded bar, an arrow showing the field direction, or a two-tone compass needle. |
rainbow | Colors every line by the direction it points, so the field becomes a color wheel. | ||
radius | 200 | Size of the area around the cursor where lines are brightest and longest, in px. | |
fade | 0.65 | How much lines dim away from the cursor, from 0 to 1. 0 keeps every line at full strength. | |
edgeFade | Fades the edges into the page, from 0 to 1. | ||
stretch | 0.4 | How much lines grow near the cursor, from 0 to 2. | |
reach | Distance in px within which lines follow the cursor. Lines farther out settle back to their resting angle. 0 means every line follows. | ||
scatter | Randomizes the resting angle of each line, from 0 to 1, like loose iron filings. Pairs well with reach. | ||
inertia | 0.35 | How slowly the lines swing into place, from 0 to 1. 0 snaps them instantly. | |
bounce | 0.3 | How much the lines overshoot and wobble as they settle, from 0 to 1. | |
ripple | 0.3 | Delays lines by their distance from the cursor so movement ripples outward, from 0 to 1. | |
clickPulse | Clicking sends a ring that spins the lines as it travels outward. | ||
| Lines fade in from the center and swing into place when the field mounts. | |||
idle | Moves the field on its own when the cursor is away. | ||
tiltX | Tilts the field back in 3D around the horizontal axis, in degrees. A full-size field stretches to the horizon. | ||
tiltY | Tilts the field in 3D around the vertical axis, in degrees. | ||
maxDevicePixelRatio | 2 | Highest pixel ratio the canvas renders at. | |
| Extra class names for the container. | |||
| Inline styles for the container. |
spacingnumberDistance between lines in px. The grid fills the area with as many lines as fit.
30rowsnumberExact number of rows. Overrides spacing.
columnsnumberExact number of columns. Overrides spacing.
containerSizenumber | stringDraws a square field of this width instead of filling the parent. Numbers are in px; strings take any CSS length.
lineColorstringColor of the lines.
'#efefef'accentColorstringColor lines take on near the cursor. Compass needles use it for their north half.
lineWidthnumber | stringThickness of each line. Numbers are in px; strings take any CSS length.
2lineHeightnumber | stringLength of each line. Numbers are in px; strings take any CSS length.
18baseAnglenumberResting angle of the lines in degrees, used before the intro and outside the reach.
-10mode'orbit' | 'attract' | 'spiral' | 'dipole'Shape of the field: rings around the cursor, lines aiming at it, a vortex, or a bar magnet that turns with your movement.
'orbit'shape'line' | 'arrow' | 'needle'Draws each line as a rounded bar, an arrow showing the field direction, or a two-tone compass needle.
'line'rainbowbooleanColors every line by the direction it points, so the field becomes a color wheel.
radiusnumberSize of the area around the cursor where lines are brightest and longest, in px.
200fadenumberHow much lines dim away from the cursor, from 0 to 1. 0 keeps every line at full strength.
0.65edgeFadenumberFades the edges into the page, from 0 to 1.
stretchnumberHow much lines grow near the cursor, from 0 to 2.
0.4reachnumberDistance in px within which lines follow the cursor. Lines farther out settle back to their resting angle. 0 means every line follows.
scatternumberRandomizes the resting angle of each line, from 0 to 1, like loose iron filings. Pairs well with reach.
inertianumberHow slowly the lines swing into place, from 0 to 1. 0 snaps them instantly.
0.35bouncenumberHow much the lines overshoot and wobble as they settle, from 0 to 1.
0.3ripplenumberDelays lines by their distance from the cursor so movement ripples outward, from 0 to 1.
0.3clickPulsebooleanClicking sends a ring that spins the lines as it travels outward.
introbooleanLines fade in from the center and swing into place when the field mounts.
idlebooleanMoves the field on its own when the cursor is away.
tiltXnumberTilts the field back in 3D around the horizontal axis, in degrees. A full-size field stretches to the horizon.
tiltYnumberTilts the field in 3D around the vertical axis, in degrees.
maxDevicePixelRationumberHighest pixel ratio the canvas renders at.
2Extra class names for the container.
Inline styles for the container.



