Planet Avatar
An avatar that is a planet. The name picks one of its colorways, so the same person always gets the same planet with nothing stored. Circle or squircle.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn add @01orbital/planet-avatarnpx shadcn add @01orbital/planet-avataryarn shadcn add @01orbital/planet-avatarbunx --bun shadcn add @01orbital/planet-avatarPart of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).
It lands at components/avatar/planet-avatar.tsx, as source you own and edit.
Usage
import { PlanetAvatar } from "@/components/avatar/planet-avatar"
// A review thread: each contributor gets a planet from their name, plus the
// same mark as circle, app tile and favicon.
const THREAD = [
{
name: "Loral O'Hara",
when: "2h",
line: "L42",
text: "pull this into a token?",
},
{ name: "Ulf Merbold", when: "30m", text: "Good catch, done." },
{ name: "Sirisha Bandla", when: "3h", text: "shipping this one." },
]
export default function Demo() {
return (
<div className="flex w-fit flex-col gap-8 p-6">
<ul className="flex flex-col gap-4">
{THREAD.map((t) => (
<li key={t.name} className="flex items-start gap-3">
<PlanetAvatar name={t.name} size={28} />
<div className="flex flex-col text-sm/5">
<span>
<span className="font-medium">{t.name}</span>{" "}
<span className="text-muted-foreground">{t.when}</span>
</span>
<span>
{t.line && (
<span className="mr-1 rounded bg-muted px-1 font-mono text-xs">
{t.line}
</span>
)}
{t.text}
</span>
</div>
</li>
))}
</ul>
<div className="flex items-end gap-8">
<figure className="flex flex-col items-center gap-2">
<PlanetAvatar name="01orbital" palette="planet-14" size={64} />
<figcaption className="font-mono text-xs tracking-widest text-muted-foreground uppercase">
Mark
</figcaption>
</figure>
<figure className="flex flex-col items-center gap-2">
<PlanetAvatar
name="01orbital"
palette="planet-14"
size={64}
shape="squircle"
/>
<figcaption className="font-mono text-xs tracking-widest text-muted-foreground uppercase">
App icon
</figcaption>
</figure>
<figure className="flex flex-col items-center gap-2">
<PlanetAvatar
name="01orbital"
palette="planet-14"
size={16}
shape="squircle"
/>
<figcaption className="font-mono text-xs tracking-widest text-muted-foreground uppercase">
Favicon
</figcaption>
</figure>
</div>
</div>
)
}API reference
Prop
Type
It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.
Dependencies
npm: cn. The CLI installs them for you.
Registry pieces it installs with it:
More Avatar
Cloudy Nimbus Moss Avatar
The moss Cloudy Nimbus orb as an avatar: the kit Avatar with the orb inside, 40px by default. Below 48px the orb drops its grain and adds a fine inner rim; decorative, so show the name in text.
Badge
Small pill label in default, secondary, destructive, outline, ghost and link variants. Built on Base UI useRender so it can render as a link; the filled and outline variants tint on hover only as anchors.