Skip to content

Light streak

Dark shader background with a sweeping ribbon of light.

Usage

Usage
import { LightStreakBackground } from '@/components/blocks/background-04'


<LightStreakBackground className="h-screen" />


// Optional: layer your own content on top
<LightStreakBackground className="min-h-[560px]">
  <div />
</LightStreakBackground>


// The nebula preset, softer and with less grain
<LightStreakBackground
  className="min-h-[560px]"
  palette="nebula"
  intensity={0.9}
  grain={0.4}
  speed={0.7}
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/background-04

Source

Props

Light streak props
PropTypeDefaultDescription
palette'blue' | 'nebula'= 'blue'Preset colour scheme. 'blue' is a blue ribbon with a navy haze; 'nebula' is the original violet ribbon with an indigo haze and lilac core.
colorsPartial<{ base: string; haze: string; primary: string; secondary: string; core: string }>= { base: '#0A0A0A', haze: '#0A2A66', primary: '#2B7FFF', secondary: '#8EC5FF', core: '#F2F8FF' }Hex colours that override single tones of the palette: the near-black base, the deep haze around the ribbon, its main glow, the brighter tone around the core and the almost white core.
intensitynumber= 1Brightness of the ribbons. Lower values keep the core from turning white.
grainnumber= 0.5Strength of the film grain, from 0 to 1.
speednumber= 1How fast the ribbon sways and breathes. 0 freezes it.
fluteWidthnumber= 56Width of each fluted glass slice in CSS pixels on wide screens. Slices narrow on smaller screens, down to 24px.
childrenReactNode= —Content rendered on top of the background.
classNamestring= —Additional classes for the wrapper, such as a min height or layout.
styleCSSProperties= —Inline styles for the wrapper.