reactbits.dev
Get started

Components you shall have, young padawan.

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

Start buildingBrowse components
9:41

Components you shall have, young padawan.

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

Start buildingBrowse components

Components you shall have, young padawan.

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

Get startedLearn more
Hue Shift
140°
Saturation
0
Density
Glow
0.3
Star Size
Flares
Twinkle
0.3
Star Speed
0.5
Speed
Rotation Speed
0.1
Layers
4
Repulsion Strength
2

More backgrounds in Pro

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

View all 106
29 properties
starColorsstring[]Up to four colors the stars are picked from. Replaces the hue shift and saturation coloring.
hueShift140Shifts the hue of the stars, in degrees.
saturationColor saturation of the stars, from 0 to 1.
densityHow densely the stars are packed.
glowIntensity0.3Brightness of the glow around each star.
starSizeSize of each star glow.
flareIntensityStrength of the cross flares on the brightest stars.
twinkleIntensity0.3How much the stars twinkle, from 0 to 1.
starSpeed0.5How fast you travel through the stars.
speedOverall speed of the animation.
rotationSpeed0.1How fast the starfield rotates.
layers4Number of star layers, from 2 to 8.
direction'forward' | 'backward''forward'Whether you fly into the stars or drift back out of them.
mouseInteractionLets the cursor interact with the stars.
mouseRepulsionPushes the stars away from the cursor. When off, the field shifts with the cursor instead.
repulsionStrength2Strength of the push away from the cursor.
autoCenterRepulsionPushes the stars away from the center without the cursor. 0 turns it off.
clickWarpClicking jumps forward at warp speed.
Drops out of warp speed on mount.
focal[number, number][0.5, 0.5]Center of the starfield, from 0 to 1.
rotation[number, number][1, 0]Fixed rotation of the starfield as a [cos, sin] pair.
transparentShows the page behind the stars. When off, the stars sit on the background color.
backgroundColor'#000000'Background behind the stars when transparent is off, or the paper color in light mode.
lightModeDraws the stars as ink for light backgrounds.
opacityOpacity of the whole effect.
disableAnimationFreezes the animation.
dprautoMaximum device pixel ratio, capped at 2.
Extra class names for the container.
Inline styles for the container.
starColorsstring[]

Up to four colors the stars are picked from. Replaces the hue shift and saturation coloring.

hueShiftnumber

Shifts the hue of the stars, in degrees.

Default140
saturationnumber

Color saturation of the stars, from 0 to 1.

densitynumber

How densely the stars are packed.

glowIntensitynumber

Brightness of the glow around each star.

Default0.3
starSizenumber

Size of each star glow.

flareIntensitynumber

Strength of the cross flares on the brightest stars.

twinkleIntensitynumber

How much the stars twinkle, from 0 to 1.

Default0.3
starSpeednumber

How fast you travel through the stars.

Default0.5
speednumber

Overall speed of the animation.

rotationSpeednumber

How fast the starfield rotates.

Default0.1
layersnumber

Number of star layers, from 2 to 8.

Default4
direction'forward' | 'backward'

Whether you fly into the stars or drift back out of them.

Default'forward'
mouseInteractionboolean

Lets the cursor interact with the stars.

mouseRepulsionboolean

Pushes the stars away from the cursor. When off, the field shifts with the cursor instead.

repulsionStrengthnumber

Strength of the push away from the cursor.

Default2
autoCenterRepulsionnumber

Pushes the stars away from the center without the cursor. 0 turns it off.

clickWarpboolean

Clicking jumps forward at warp speed.

introboolean

Drops out of warp speed on mount.

focal[number, number]

Center of the starfield, from 0 to 1.

Default[0.5, 0.5]
rotation[number, number]

Fixed rotation of the starfield as a [cos, sin] pair.

Default[1, 0]
transparentboolean

Shows the page behind the stars. When off, the stars sit on the background color.

backgroundColorstring

Background behind the stars when transparent is off, or the paper color in light mode.

Default'#000000'
lightModeboolean

Draws the stars as ink for light backgrounds.

opacitynumber

Opacity of the whole effect.

disableAnimationboolean

Freezes the animation.

dprnumber

Maximum device pixel ratio, capped at 2.

Defaultauto

Extra class names for the container.

Inline styles for the container.