Skip to Content

Celestograph Cover

Full-bleed generative art cover that fills its parent as a card, banner or board cover. Four named palettes, plate species such as marble and nebula, and it repaints as the box resizes.

Installation

pnpm dlx shadcn@latest add @01orbital/celestograph-cover

Usage

import { CelestographCover } from "@/components/celestograph/celestograph-cover"

export default function Demo() {
  return (
    <div className="relative aspect-video w-full max-w-2xl overflow-hidden rounded-2xl">
      <CelestographCover from="enceladus" palette="delft" />
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/celestograph-cover-demo

API reference

A painted plate that fills its nearest positioned ancestor, used as a card background or to fill an avatar. The same from string always paints the same plate.

Hidden from assistive tech. The palette's lower color shows until the canvas paints, then the plate fades in over 500ms, or at once with reduced motion. It repaints when the box grows noticeably or changes shape.

Prop

Type

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

Dependencies

npm: @base-ui/react, cn. The CLI installs them for you.

Used in blocks

9 blocks are built with Celestograph Cover:

Last updated on