Aurora Panel
motiq/aurora-panelFreeComponent
A product card that carries its own sky: three dual-sine ribbons drift across a canvas roof, softened by one GPU CSS blur at 116% scale with a seeded grain tile over the top and dark-only stars beneath. Pointer x retargets a lean spring (k=50, d=14) that shifts ribbon phase up to 90px and lifts amplitude ~20%, relaxing home on leave. One rAF loop, DPR capped at 2x, still-frame under reduced motion.
Live preview
live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.motiq.dev/r/aurora-panel.jsonSource
1"use client";23import * as React from "react";45import { cn } from "@/lib/utils";6import { useReducedMotion, useVisibilityPause } from "@/lib/motiq";78/* -------------------------------------------------------------------------- */9/* Types */10/* -------------------------------------------------------------------------- */1112export interface AuroraPanelProps extends React.HTMLAttributes<HTMLDivElement> {13 /** Card body below the aurora roof. */14 children?: React.ReactNode;15 /** Roof height in px. */16 roofHeight?: number;17 /** Number of ribbons (clamped 2–5). */18 ribbons?: number;19 /** Ribbon colors, front to back. Defaults to the theme's cyan/azure pair. */20 colors?: string[];21 /** Ribbon opacity multiplier (0–1.6). */22 intensity?: number;23 /** Time multiplier for the ribbon drift. */24 speed?: number;25 /** Aurora leans toward the pointer over the roof. */26 lean?: boolean;27 /** Grain overlay opacity (0–1). */28 grain?: number;29 /** Badge slot pinned to the roof. */30 overlay?: React.ReactNode;31 /** Deterministic seed for grain + stars (SSR-stable). */32 seed?: number;33 /** Park the loop while scrolled offscreen or the tab is hidden. */34 pauseWhenHidden?: boolean;35 /** Force the static, motion-free sky regardless of system preference. */36 reducedMotion?: boolean;37}3839/* -------------------------------------------------------------------------- */40/* Physics + palette */41/* -------------------------------------------------------------------------- */4243/** Hand-rolled delta-time spring — keeps the component dependency-free. */44class Spring {45 x: number;46 v = 0;47 target: number;48 k: number;49 d: number;50 constructor(value: number, k: number, d: number) {51 this.x = value;52 this.target = value;53 this.k = k;54 this.d = d;55 }56 step(dt: number): number {57 const a = this.k * (this.target - this.x) - this.d * this.v;58 this.v += a * dt;59 this.x += this.v * dt;60 return this.x;61 }62}6364/** mulberry32 — no Math.random at render or module scope (SSR-stable). */65function makeRng(seed: number) {66 let a = seed >>> 0;67 return () => {68 a = (a + 0x6d2b79f5) | 0;69 let t = Math.imul(a ^ (a >>> 15), 1 | a);70 t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;71 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;72 };73}7475// … truncated
What it pulls in
Other registry items
Files it writes
More from motiq
All 100 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Activity Streamactivity-stream | motiq | Components | Free | 1 dep | |
| Adaptive Safe-Zone Gridadaptive-safe-zone-grid | motiq | Components | Free | no deps | |
| Agent Run Timelineagent-run-timeline | motiq | Components | Free | 1 dep | |
| AI Response Streamai-response-stream | motiq | Components | Free | 1 dep | |
| Animated Accordionanimated-accordion | motiq | Components | Free | 2 deps | |
| Animated Buttonanimated-button | motiq | Components | Free | 1 dep | |
| Animated Dialoganimated-dialog | motiq | Components | Free | 2 deps | |
| Animated Gridanimated-grid | motiq | Components | Free | 2 deps |
