Skip to Content

Celestograph Placeholder

Generative placeholder image art painted on canvas by the Celestograph engine: chemical pools and fronts seeded from any string. Square, circle, wide, portrait and banner shapes, sized to its box.

pnpm dlx shadcn add @01orbital/celestograph-placeholder

Usage

import { PLATE_PALETTES } from "@/components/celestograph/celestograph-engine"
import { CelestographPlaceholder } from "@/components/celestograph/celestograph-placeholder"

export default function CelestographPlaceholderDemo() {
  return (
    // Each tile fills its column and keeps its own ratio: stretched across,
    // never down to the tallest neighbor. One plate palette per tile.
    <div className="grid w-full max-w-2xl grid-cols-[1.6fr_1fr_1fr] place-items-center items-start justify-items-stretch gap-4 p-6">
      <CelestographPlaceholder
        shape="wide"
        from="wide"
        palette={PLATE_PALETTES.warmth}
      />
      <CelestographPlaceholder
        shape="portrait"
        from="portrait"
        palette={PLATE_PALETTES.tarn}
      />
      <CelestographPlaceholder
        shape="circle"
        from="circle"
        palette={PLATE_PALETTES.delft}
      />
    </div>
  )
}

API reference

Placeholder imagery painted on a canvas from a string, for image slots that have no picture yet. Not a gray box and not a stock photo: the same from always paints the same plate, on every machine, with nothing stored.

The box keeps the aspect ratio of its shape and shows bg-muted until the plate paints. Inside a Media, PersonPortrait or BentoCellMedia frame its corners are square, since the frame rounds them. Hidden from assistive tech by default; children render above the canvas.

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.