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
- ProPro · unlocked
- 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
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.
| Type | Notes | ||
|---|---|---|---|
colors | string[] | No | Three CSS colours, one per curtain. Default the theme's info blue, a violet and a teal mixed from it. |
position | "top" | "bottom" | "full" | No | Where the light sits. Default "top". |
intensity | number | No | How strong the light is, 0 to 1. Default 0.6. |
speed | number | No | Seconds for one slow sway of the curtains. Default 16. |
blur | number | No | Softness of the streaks, in pixels. Default 6. |
children | React.ReactNode | No | – |
Dependencies
npm packages
clsxtailwind-mergeLiro foundations, installed alongside it
liro-themeStates
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