Skip to Content

Moon Sphere

Moon sphere graphic: a single-element sphere lit on one limb, a radial gradient from the lower-left corner running transparent out to a warm rim color on the far edge. Used for moonrise effects over dark grounds.

Installation

pnpm dlx shadcn@latest add @01orbital/moon-sphere

Usage

import { MoonSphere } from "@/components/orbs/moon-sphere"

// The default warm rim, and the same sphere with moonColor set.
export default function MoonSphereDemo() {
  return (
    <div className="flex flex-wrap items-center justify-center gap-16">
      <MoonSphere size={320} />
      <MoonSphere size={320} moonColor="oklch(0.72 0.11 232)" />
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/moon-sphere-demo

Examples

Bluemoon-sphere-blue

Blue moon example showing MoonSphere with a blue rim on a dark ground.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-blue

Silvermoon-sphere-silver

Moon Sphere color example with a silver rim on a dark ground.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-silver

Risingmoon-sphere-rising

Hero section example with a Moon Sphere: a dark band with a centered heading and a line of copy, and a large glowing moon rising from the bottom edge like a planet on the horizon.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-rising

Splitmoon-sphere-split

Quote section example with a Moon Sphere: a dark band with a testimonial and byline on the right and a glowing moon cropped by the left edge. On phones the moon steps aside to keep the quote readable.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-split

Sleep Schedulemoon-sphere-sleep-schedule

Sleep tracker card example on deep indigo: a lilac Moon Sphere above the wind-down time and two sleep averages. Shows the glowing orb as a status graphic in a health or wellness dashboard widget.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-sleep-schedule

Game Briefingmoon-sphere-game-briefing

Game chapter card example with a Moon Sphere: a large ember-rimmed moon glows in the corner of a near-black card beside a folded mission briefing. Shows the orb as moody artwork for game menus and story screens.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-game-briefing

Blue Frostmoon-sphere-blue-frost

Frosted panel example showing a blue MoonSphere on a dark glass panel, with a small caption row above it and one line of text below.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-blue-frost

Amber Papermoon-sphere-amber-paper

Moonrise example showing MoonSphere: warm paper holds an amber sphere at a modest size, with a short caption row and one line of note text.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-amber-paper

Silver Cropmoon-sphere-silver-crop

Cropped orb panel example: an oversized silver Moon Sphere pushed off the left edge of a midnight blue panel so only its lit limb shows. A bold crescent backdrop for banners and hero sections.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-silver-crop

Jade Risemoon-sphere-jade-rise

Call to action section example with a Moon Sphere: a centered invitation sits above a large jade moon rising from the bottom edge of a dark panel. A glowing orb horizon for landing page closing sections.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-jade-rise

Two Scalesmoon-sphere-two-scales

Orb size comparison example: two Moon Spheres on a plum ground, a small violet one and a larger silver one, each with a short caption. Shows how a single orb component scales for icons and hero art.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-two-scales

Letter Cardmoon-sphere-letter-card

Newsletter signup card example: a small amber Moon Sphere in an inset frame above a short headline and a working email form. Shows the orb as card artwork for a subscribe or waitlist prompt.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-letter-card

Empty Statemoon-sphere-empty-state

404 page empty state example with a Moon Sphere: a message and two links sit on the left while a full blue moon fills the right. Shows how the glowing orb works as artwork on a not found or error screen.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-empty-state

Rim Palettesmoon-sphere-rim-palettes

Interactive Moon Sphere example: a blue moon with six buttons that switch its rim color and a status line naming the current choice. A pattern for letting users pick an orb color or theme.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-rim-palettes

Hue Slidermoon-sphere-hue-slider

Interactive Moon Sphere example on midnight blue with a range slider that sweeps the rim color through the full hue circle. Shows how one color value recolors the glowing orb live.

pnpm dlx shadcn@latest add @01orbital/moon-sphere-hue-slider

API reference

A sphere lit only on one limb, for a moon rising over a dark ground. A radial gradient from the lower-left corner runs transparent out to moonColor at the upper-right edge, so the rest of the disc shows the ground behind it. It is decorative and hidden from assistive tech.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Used in blocks

3 blocks are built with Moon Sphere:

Last updated on