Aurora Background

Slow ribbons of soft colour behind a hero, like light moving in the sky.

PROGet Aurora Background and 168 other Pro components with pro lifetime — Get Pro

Category
Creative
Access
Pro
Source
102 lines · one file
States
5 drawn

The decision inside it

It pauses when no one can see it

Off screen or in a hidden tab the drift stops, so it costs nothing on a long page; with reduced motion the colours stay and only the movement stops.

When to use it

Use Aurora Background behind a hero for slow, soft colour. It pauses off screen and holds still with reduced motion. For a quieter texture, use Grid & Dot Background.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Aurora Background for this.
Install it: npx shadcn@latest add @liro/aurora-background
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/aurora-background.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/launch-hero.tsx
import { AuroraBackground } from "@/components/ui/aurora-background";

export function LaunchHero() {
  return (
    <AuroraBackground position="top" className="rounded-3xl py-28 text-center">
      <h1 className="text-4xl font-semibold">Vertically ships on Fridays.</h1>
    </AuroraBackground>
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
colorsstring[] NoThree CSS colours, one per curtain. Default the theme's info blue, a violet and a teal mixed from it.
position"top" | "bottom" | "full" NoWhere the light sits. Default "top".
intensitynumber NoHow strong the light is, 0 to 1. Default 0.6.
speednumber NoSeconds for one slow sway of the curtains. Default 16.
blurnumber NoSoftness of the streaks, in pixels. Default 6.
childrenReact.ReactNode No–

Dependencies

npm packages

clsxtailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Top
  • Bottom
  • Full
  • Custom colours
  • Reduced motion

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances