2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

Particle

Updated: May 8, 2025
View on GitHub
The Particle component provides customizable decorative particles with gradients, dots, grids, lines, and masking effects. The density prop controls the number of particles to display. The color prop controls the color of the particles. The size prop controls the size of the particles. The speed prop controls the speed of the particles. The interactive prop controls whether the particles are interactive. Use the intensity prop to control the radius of the interaction area. The mode prop controls how particles interact with the cursor. Use repel to push particles away or attract to pull them towards the cursor. The opacity prop controls the opacity of the particles. Particle automatically detects low-end devices and the prefers-reduced-motion system setting. When either is detected, particles are placed statically without animation. The animation also pauses when the element is outside the viewport. You can override this with the reducedMotion prop. See useReducedMotion for details.
Prop
Type
Default
density
How many particles.
number100
color
Particle colour. Takes a token or any CSS colour.
ColorValuebrand-on-background-weak
size
Particle size, on the spacing scale.
SpacingToken2
speed
Drift multiplier. Not a duration.
number0.3
interactive
React to the pointer.
booleanfalse
mode
Whether the pointer pushes particles away or pulls them in.
repelattract
repel
intensity
How strongly the pointer acts, when interactive.
number20
opacity
Layer opacity, in steps of 10.
DisplayProps["opacity"]100
reducedMotion
"auto" follows the reader's system setting, which is the right default for anything ambient.
booleanauto
auto
className
string
style
React.CSSProperties
children
React.ReactNode
…and every FlexProps propinherited
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club