reactbits.dev
Get started

Every line turns to follow your cursor

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

Start buildingBrowse components
9:41

Every line turns to follow your cursor

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

Start buildingBrowse components

Every line turns to follow your cursor

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

Get startedLearn more
Spacing
30px
Line Width
2px
Line Length
18px
Base Angle
-10°
Radius
200px
Fade
0.65
Edge Fade
0
Stretch
0.4
Reach
0px
Scatter
0
Inertia
0.35
Bounce
0.3
Ripple
0.3
Tilt X
0°
Tilt Y
0°

More backgrounds in Pro

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

View all 106
29 properties
spacing30Distance between lines in px. The grid fills the area with as many lines as fit.
rowsExact number of rows. Overrides spacing.
columnsExact 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.
lineColor'#efefef'Color of the lines.
accentColorColor lines take on near the cursor. Compass needles use it for their north half.
lineWidthnumber | string2Thickness of each line. Numbers are in px; strings take any CSS length.
lineHeightnumber | string18Length of each line. Numbers are in px; strings take any CSS length.
baseAngle-10Resting 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.
rainbowColors every line by the direction it points, so the field becomes a color wheel.
radius200Size of the area around the cursor where lines are brightest and longest, in px.
fade0.65How much lines dim away from the cursor, from 0 to 1. 0 keeps every line at full strength.
edgeFadeFades the edges into the page, from 0 to 1.
stretch0.4How much lines grow near the cursor, from 0 to 2.
reachDistance in px within which lines follow the cursor. Lines farther out settle back to their resting angle. 0 means every line follows.
scatterRandomizes the resting angle of each line, from 0 to 1, like loose iron filings. Pairs well with reach.
inertia0.35How slowly the lines swing into place, from 0 to 1. 0 snaps them instantly.
bounce0.3How much the lines overshoot and wobble as they settle, from 0 to 1.
ripple0.3Delays lines by their distance from the cursor so movement ripples outward, from 0 to 1.
clickPulseClicking 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.
idleMoves the field on its own when the cursor is away.
tiltXTilts the field back in 3D around the horizontal axis, in degrees. A full-size field stretches to the horizon.
tiltYTilts the field in 3D around the vertical axis, in degrees.
maxDevicePixelRatio2Highest pixel ratio the canvas renders at.
Extra class names for the container.
Inline styles for the container.
spacingnumber

Distance between lines in px. The grid fills the area with as many lines as fit.

Default30
rowsnumber

Exact number of rows. Overrides spacing.

columnsnumber

Exact number of columns. Overrides spacing.

containerSizenumber | string

Draws a square field of this width instead of filling the parent. Numbers are in px; strings take any CSS length.

lineColorstring

Color of the lines.

Default'#efefef'
accentColorstring

Color lines take on near the cursor. Compass needles use it for their north half.

lineWidthnumber | string

Thickness of each line. Numbers are in px; strings take any CSS length.

Default2
lineHeightnumber | string

Length of each line. Numbers are in px; strings take any CSS length.

Default18
baseAnglenumber

Resting angle of the lines in degrees, used before the intro and outside the reach.

Default-10
mode'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.

Default'orbit'
shape'line' | 'arrow' | 'needle'

Draws each line as a rounded bar, an arrow showing the field direction, or a two-tone compass needle.

Default'line'
rainbowboolean

Colors every line by the direction it points, so the field becomes a color wheel.

radiusnumber

Size of the area around the cursor where lines are brightest and longest, in px.

Default200
fadenumber

How much lines dim away from the cursor, from 0 to 1. 0 keeps every line at full strength.

Default0.65
edgeFadenumber

Fades the edges into the page, from 0 to 1.

stretchnumber

How much lines grow near the cursor, from 0 to 2.

Default0.4
reachnumber

Distance in px within which lines follow the cursor. Lines farther out settle back to their resting angle. 0 means every line follows.

scatternumber

Randomizes the resting angle of each line, from 0 to 1, like loose iron filings. Pairs well with reach.

inertianumber

How slowly the lines swing into place, from 0 to 1. 0 snaps them instantly.

Default0.35
bouncenumber

How much the lines overshoot and wobble as they settle, from 0 to 1.

Default0.3
ripplenumber

Delays lines by their distance from the cursor so movement ripples outward, from 0 to 1.

Default0.3
clickPulseboolean

Clicking sends a ring that spins the lines as it travels outward.

introboolean

Lines fade in from the center and swing into place when the field mounts.

idleboolean

Moves the field on its own when the cursor is away.

tiltXnumber

Tilts the field back in 3D around the horizontal axis, in degrees. A full-size field stretches to the horizon.

tiltYnumber

Tilts the field in 3D around the vertical axis, in degrees.

maxDevicePixelRationumber

Highest pixel ratio the canvas renders at.

Default2

Extra class names for the container.

Inline styles for the container.