Browse components
Cosmic Background
Deep-space nebula clouds with parallax star layers, twinkling flares and the odd shooting star. WebGL.
Installation
npx shadcn@latest add @glint-ui/cosmic-backgroundFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/cosmic-background.json
Usage
import { CosmicBackground } from "@/components/ui/cosmic-background";
<div className="relative h-96">
<CosmicBackground color="#6d28d9" accent="#db2777" />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "#6d28d9" | Main nebula color. |
| accent | string | "#db2777" | Secondary nebula color. |
| speed | number | 1 | Drift speed multiplier. |
| scale | number | 1 | Size of the nebula clouds. |
| intensity | number | 1 | Nebula brightness. |
| stars | number | 0.5 | Star density. |
| shootingStars | boolean | true | Show an occasional shooting star. |
| className | string | — | Extra classes for the root element. |