Horizon glow
Dark shader background with two light bands at a horizon.
Usage
import { HorizonGlowBackground } from '@/components/blocks/background-02'
<HorizonGlowBackground className="h-screen" />
// Optional: layer your own content on top
<HorizonGlowBackground className="min-h-[560px]">
<div />
</HorizonGlowBackground>
// The twilight preset, with a flatter, brighter horizon lower down
<HorizonGlowBackground
className="min-h-[640px]"
palette="twilight"
intensity={1.1}
curvature={0.7}
horizon={0.75}
speed={0.6}
/>
Install
pnpm dlx shadcn@latest add @pastaui-pro/background-02npx shadcn@latest add @pastaui-pro/background-02yarn dlx shadcn@latest add @pastaui-pro/background-02bunx --bun shadcn@latest add @pastaui-pro/background-02Source
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| palette | 'blue' | 'twilight' | = 'blue' | Preset colour scheme. 'blue' fades from a white core through our blue into navy; 'twilight' is the original lavender and violet on deep indigo. |
| colors | Partial<{ base: string; accent: string; highlight: string; core: string }> | = { base: '#030B1E', accent: '#2B7FFF', highlight: '#8EC5FF', core: '#F2F8FF' } | Hex colours that override single tones of the palette: the deep base, the saturated mid-tone of the bands, the lighter tone around the core and the near-white core at the edges. |
| intensity | number | = 1 | Brightness of the bands. Lower values keep the core from turning white. |
| curvature | number | = 1 | How strongly the bands bend away from the horizon toward the edges. 0 gives a flat line of light. |
| horizon | number | = 0.69 | Vertical position of the horizon, from 0 (top) to 1 (bottom). |
| speed | number | = 1 | How fast the bands breathe and shimmer. 0 freezes them. |
| children | ReactNode | = — | Content rendered on top of the background. |
| className | string | = — | Additional classes for the wrapper, such as a min height or layout. |
| style | CSSProperties | = — | Inline styles for the wrapper. |