Planet

Renders a slowly rotating particle sphere as a hero object.

Variants

Supported configurations for this component.

Variants

2 examples
Shell
Mantle

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••

Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
particleCountnumber6000Number of surface particles; 6000 reads dense at 320 to 480px.
particleSizenumber0.028Per-particle point size in world units.
rotationSpeednumber0.0035Auto-rotation speed in radians per frame (assumes about 60fps).
variant'shell' | 'mantle''shell'Surface construction; Mantle divides the particles between a porous shell and a smaller inner body.
pausedbooleanfalseWhen true, the planet does not auto-rotate.
seednumber1Seeds the particle field. The same seed always builds the same planet, so a shot can be reproduced and two renders can be compared, screenshotted or regression-tested.
colorstring-Lit-body colour, any CSS colour syntax; defaults to `var(--andromeda-text-secondary, oklch(0.877 0.002 286.2))`. The terminator and the highlight specks are derived from this and `shadowColor`, so one value recolours the whole planet.
shadowColorstring-Unlit-side colour, any CSS colour syntax; defaults to `var(--andromeda-border-base, oklch(0.413 0.002 286.2))`.
classNamestring-Additional CSS classes applied to the root element.
styleReact.CSSProperties-Inline styles applied to the root element.

More Andromeda Pro components