Dot Orbit Shader

Use Dot Orbit Shader as a decorative background or texture. It renders colored dots that orbit inside a repeated grid and can run continuously or remain still.

Preview

Reduce motion:Off
Tune:Off
Inspect

Installation

Basic usage

TypeScript
hero-background.tsx

Examples

Use a lower speed for ambient movement. Set speed to zero when the pattern should be static, and adjust colors, size, and spread to suit the background.

Usage

API

PropertyTypeDefaultDescription
colorBackstring"#000000"Background color. Accepts hex, RGB, or HSL strings.
colorsstring[]["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"]Up to 10 dot colors. Accepts hex, RGB, or HSL strings.
sizenumber0.4Dot radius relative to cell size (0–1).
sizeRangenumber0.3Random variation in dot size (0–1). 0 = uniform.
spreadingnumber0.5Maximum orbit distance around each cell center (0–1).
stepsPerColornumber1Extra color steps between base colors. 1 = N colors, 2 = 2×N, etc. (1–4).
speednumber1Animation speed multiplier. 0 = static.

Accessibility

Treat the shader as decorative and keep meaningful content outside it. Check text contrast against the final background and provide a reduced-motion alternative when needed.

Styling

Use className to place the shader in a bounded layer. The component accepts color and motion options without requiring changes to its source.

Contact

Found a bug or need help using this component? Open an issue on GitHub.

License & Usage

Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.

Was this page helpful?

Your response helps us improve component docs.