
Balls! What's not to like about them?
React Bits brings motion and character to your interface, one copy-paste component at a time.

Balls! What's not to like about them?
React Bits brings motion and character to your interface, one copy-paste component at a time.
Balls! What's not to like about them?
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.
count | 200 | Number of balls in the pit. | |
colors | Array<string | number> | ['#ffffff'] | Ball colors, handed out in turn. Hex strings or numbers such as 0x5227ff. |
material | 'satin' | 'matte' | 'gloss' | 'frosted' | 'metal' | 'satin' | Surface finish: soft satin, chalky matte, polished gloss, see-through frosted or brushed metal. |
minSize | 0.5 | Smallest ball radius. The view is about 18 units tall. | |
maxSize | Largest ball radius. | ||
gravity | 0.5 | Pull toward the floor. 0 lets the balls float, around 0.5 piles them up. | |
friction | 0.9975 | How much speed the balls keep each frame. 1 never slows them down. | |
wallBounce | 0.95 | How much speed the balls keep when they hit the edges, from 0 to 1. | |
bounce | 0.85 | How bouncy the balls are against each other, from 0 to 1. | |
depth | 2 | How deep the pit is, so balls can sit in front of and behind each other. | |
drift | Gentle wandering that keeps floating balls moving on their own. | ||
followCursor | A ball follows the cursor and shoves the others out of the way. | ||
cursorSize | Radius of the cursor ball. | ||
grab | Press on a ball to pick it up, drag it around and throw it. | ||
clickEffect | 'burst' | 'none' | 'burst' | Clicking an empty spot blasts the nearby balls away with a flash of light. |
lightColor | '#ffffff' | Color of the light that follows the cursor and lights up the balls around it. | |
lightIntensity | Brightness of the cursor light. | ||
exposure | Overall brightness of the balls. | ||
shadows | 0.6 | Strength of the soft shadows where balls touch each other and the floor. | |
| Balls pour in from the top on mount, or burst out from the center when gravity is near zero. | |||
dpr | auto | Maximum device pixel ratio, capped at 2. | |
| Extra class names for the container. | |||
| Inline styles for the container. |
countnumberNumber of balls in the pit.
200colorsArray<string | number>Ball colors, handed out in turn. Hex strings or numbers such as 0x5227ff.
['#ffffff']material'satin' | 'matte' | 'gloss' | 'frosted' | 'metal'Surface finish: soft satin, chalky matte, polished gloss, see-through frosted or brushed metal.
'satin'minSizenumberSmallest ball radius. The view is about 18 units tall.
0.5maxSizenumberLargest ball radius.
gravitynumberPull toward the floor. 0 lets the balls float, around 0.5 piles them up.
0.5frictionnumberHow much speed the balls keep each frame. 1 never slows them down.
0.9975wallBouncenumberHow much speed the balls keep when they hit the edges, from 0 to 1.
0.95bouncenumberHow bouncy the balls are against each other, from 0 to 1.
0.85depthnumberHow deep the pit is, so balls can sit in front of and behind each other.
2driftnumberGentle wandering that keeps floating balls moving on their own.
followCursorbooleanA ball follows the cursor and shoves the others out of the way.
cursorSizenumberRadius of the cursor ball.
grabbooleanPress on a ball to pick it up, drag it around and throw it.
clickEffect'burst' | 'none'Clicking an empty spot blasts the nearby balls away with a flash of light.
'burst'lightColorstringColor of the light that follows the cursor and lights up the balls around it.
'#ffffff'lightIntensitynumberBrightness of the cursor light.
exposurenumberOverall brightness of the balls.
shadowsnumberStrength of the soft shadows where balls touch each other and the floor.
0.6introbooleanBalls pour in from the top on mount, or burst out from the center when gravity is near zero.
dprnumberMaximum device pixel ratio, capped at 2.
autoExtra class names for the container.
Inline styles for the container.



