Skip to content

PixelPlanet

Add interactive 3D pixel art planets to your application using PixelPlanet.

PixelPlanet is a React Three Fiber component that renders customizable, interactive 3D pixel art planets. You can control the planet type, surface colors, rotation speed, and atmospheric effects.

Open in

The most reliable way to install a component from a custom third-party registry without modifying your project configuration is to use the absolute URL to the component’s generated JSON definition.

Run the following command in your terminal:

npx shadcn@latest add https://pixel-planet-component.vercel.app/r/pixel-planet.json

This commands the CLI to fetch the component’s code and dependencies directly from the repository’s build output folder (`/r`).

Import the component and specify a type to render a planet.

import { PixelPlanet } from "@/components/pixel-planet"
export default function Page() {
return (
<div className="h-[400px] w-full">
<PixelPlanet type="earth" />
</div>
)
}

The component accepts the following properties for customization:

PropertyTypeDefaultDescription
typePlanetType"earth"The celestial body type (e.g., earth, lava, gas-giant).
seedstring | number123Seed for randomized surface patterns.
animatebooleantrueEnables or disables the rotation animation.
classNamestringundefinedAdditional CSS classes for the container.

You can choose from several predefined planet types:

Life-bearing planet with oceans and clouds.

Open in

Volcanic world with flowing magma.

Open in

Frozen planet with icy plains.

Open in

Massive planet with atmospheric bands.

Open in

Alternative gas giant variant.

Open in

Irregular rocky body.

Open in

Luminous celestial object.

Open in

Barren planet with dry terrain.

Open in

Rocky planet with no atmosphere.

Open in