Hero Backgrounds

6 hero background presets — CSS-based and component-based — switchable from siteConfig.

LaunchFst includes 6 hero background presets that render behind the hero section. Switch between them with a single config change.

Available Backgrounds

BackgroundFileTypeDescription
gridbg-grid.tsxCSSSubtle grid lines with radial fade from center
dotsbg-dots.tsxCSSDot pattern at low opacity (DotPattern component)
gradientbg-gradient.tsxCSS3 layered gradient color blurs using primary/chart colors
particlesbg-particles.tsxComponentAnimated floating particles (Particles Magic UI component)
animated-gridbg-animated-grid.tsxComponentMoving grid squares (AnimatedGridPattern Magic UI component)
light-raysbg-light-rays.tsxComponentRadial light rays (LightRays Magic UI component)

Switching Backgrounds

Update heroBackground in lib/config/site.ts:

design: {
  heroBackground: "particles", // "grid" | "dots" | "gradient" | "particles" | "animated-grid" | "light-rays"
}

The HeroBackground component in components/blocks/backgrounds/hero-background.tsx reads this config and renders the matching background automatically.

CSS-Based vs Component-Based

CSS-based backgrounds (grid, dots, gradient) use CSS gradients and patterns with zero JavaScript overhead.

Component-based backgrounds (particles, animated-grid, light-rays) use Magic UI canvas/DOM animations. They require client-side JavaScript.

Performance Considerations

BackgroundJS BundleBest For
gridNoneBest Lighthouse scores
dotsNoneClean, minimal look
gradientNoneColorful but lightweight
animated-grid~3 KBBalanced impact vs. performance
light-rays~4 KBPremium dramatic effect
particles~5 KBRich visual, highest cost

For best Lighthouse scores, use a CSS-based background. animated-grid offers a good balance.

Customizing a Background

Each background is a standalone component in components/blocks/backgrounds/. Edit the file directly to adjust colors, opacity, or animation speed. All backgrounds use CSS variables from the active theme and adapt to dark/light mode automatically.

Demo Mode — Explore freely. Some actions are restricted. demo@launchfst.dev / demo1234

Get LaunchFst →