Glow

Stars

Seeded canvas starfield that fills a positioned parent with a mix of sharp and soft stars. Optional twinkle and fade-in respect reduced motion, and a circular cutout can hide stars behind an orb.

The source comes with full access.

One payment of $149 ($49 for now) opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/stars
npx shadcn add @01orbital/stars
yarn shadcn add @01orbital/stars
bunx --bun shadcn add @01orbital/stars

Part 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/glow/stars.tsx, as source you own and edit.

The example also uses eyebrow, heading and section. Install them too:

pnpm dlx shadcn add @01orbital/eyebrow @01orbital/heading @01orbital/section
npx shadcn add @01orbital/eyebrow @01orbital/heading @01orbital/section
yarn shadcn add @01orbital/eyebrow @01orbital/heading @01orbital/section
bunx --bun shadcn add @01orbital/eyebrow @01orbital/heading @01orbital/section

Usage

import { Eyebrow } from "@/components/editorial/eyebrow"
import { Heading } from "@/components/editorial/heading"
import {
  SectionDescription,
  SectionHeader,
  SectionTitleGroup,
} from "@/components/editorial/section"
import { Stars } from "@/components/glow/stars"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  eyebrow: "After hours",
  title: "A little room for wonder.",
  body: "A quiet sky behind whatever comes next.",
} as const

export default function StarsDemo({
  animated = false,
}: {
  animated?: boolean
}) {
  return (
    <div
      className="dark relative isolate grid min-h-full w-full flex-1 place-items-center overflow-hidden bg-background text-foreground"
      data-stars-demo
    >
      <Stars animated={animated} arrival={false} density={1.8} />
      <SectionHeader align="center" size="sm" className="relative">
        <SectionTitleGroup>
          <Eyebrow>{COPY.eyebrow}</Eyebrow>
          <Heading>{COPY.title}</Heading>
        </SectionTitleGroup>
        <SectionDescription variant="muted">{COPY.body}</SectionDescription>
      </SectionHeader>
    </div>
  )
}

API reference

Prop

Type

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

Dependencies

npm: cn. The CLI installs them for you.

No other registry pieces.