About
A control centre on a deep blue glow, with round toggles that swell into lit glass under your finger and a brightness knob that turns into a glass lens. More like this, plus a designer your coding agent can use, at studios.lou15.com/?ref=21st
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Quick Panel to your project and fits it to your theme.
Code
How Quick Panel is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import { QuickPanel, type QuickPanelToggles } from "@/components/ui/quick-panel";
type Scene = {
id: string;
name: string;
note: string;
toggles: QuickPanelToggles;
volume: number;
brightness: number;
colors: { background: string; glow: string; accent: string; focusColor: string; sunColor: string };
};
/* Each scene is nothing but props: the four toggles, both sliders and the backdrop colours. */
const SCENES: Scene[] = [
{
id: "day",
name: "Daytime",
note: "Everything on, screen at half",
toggles: { airplane: false, cellular: true, wifi: true, focus: false },
volume: 0.6,
brightness: 0.5,
colors: { background: "#080c1a", glow: "#0548e4", accent: "#167bf8", focusColor: "#5e5ce6", sunColor: "#92a5ca" },
},
{
id: "night",
name: "Wind down",
note: "Focus on, quiet and dim",
toggles: { airplane: false, cellular: true, wifi: true, focus: true },
volume: 0.22,
brightness: 0.18,
colors: { background: "#0a0716", glow: "#5a2bd4", accent: "#8b6cf6", focusColor: "#7a5cf0", sunColor: "#a597cf" },
},
{
id: "travel",
name: "In flight",
note: "Radios off, wifi kept for the cabin",
toggles: { airplane: true, cellular: false, wifi: true, focus: false },
volume: 0.42,
brightness: 0.78,
colors: { background: "#120906", glow: "#c9500c", accent: "#ff8a2a", focusColor: "#5e5ce6", sunColor: "#cfa58e" },
},
];
const ROWS: { key: keyof QuickPanelToggles; label: string; on: string }[] = [
{ key: "airplane", label: "Airplane mode", on: "#ff9f0a" },
{ key: "cellular", label: "Cellular data", on: "#32cc4d" },
{ key: "wifi", label: "Wifi", on: "#1474ea" },
{ key: "focus", label: "Focus", on: "#5e5ce6" },
];
/**
* A control centre on its own lit panel, driven from outside. Pick a scene and the toggles, both
* sliders and the glow change through props; switch a toggle, drag the tall volume slider or the
* brightness knob and the readout follows the change callbacks. The tour loops until you take over.
*/
export default function QuickPanelDemo() {
const [sceneIdx, setSceneIdx] = React.useState(0);
const scene = SCENES[sceneIdx];
const [toggles, setToggles] = React.useState<QuickPanelToggles>(scene.toggles);
const [volume, setVolume] = React.useState(scene.volume);
const [brightness, setBrightness] = React.useState(scene.brightness);
const [touched, setTouched] = React.useState(false);
const pick = (i: number) => {
const s = SCENES[i];
setSceneIdx(i);
setToggles(s.toggles);
setVolume(s.volume);
setBrightness(s.brightness);
setTouched(true);
};
return (
<main className="relative flex h-screen min-h-[340px] w-full items-center justify-center gap-[clamp(16px,4vw,40px)] overflow-hidden bg-background p-4 text-foreground">
{/* the panel is a lit object, so it keeps its own night backdrop; the page around it follows the theme */}
<div
className="relative aspect-square h-full max-h-[440px] max-w-full shrink-0 overflow-hidden rounded-[30px] shadow-xl ring-1 ring-black/5 dark:ring-white/10"
onPointerDown={() => setTouched(true)}
>
<QuickPanel
tour={!touched}
toggles={toggles}
onTogglesChange={setToggles}
volume={volume}
onVolumeChange={setVolume}
brightness={brightness}
onBrightnessChange={setBrightness}
{...scene.colors}
style={{ minHeight: 0 }}
/>
</div>
<aside className="hidden w-[250px] shrink-0 flex-col sm:flex">
<p className="text-[11.5px] font-medium uppercase tracking-[0.14em] text-muted-foreground">Scene</p>
<div className="mt-2 grid grid-cols-3 gap-1 rounded-xl border border-border p-1" role="radiogroup" aria-label="Scene">
{SCENES.map((s, i) => {
const on = i === sceneIdx;
return (
<button
key={s.id}
type="button"
role="radio"
aria-checked={on}
onClick={() => pick(i)}
className={`rounded-lg px-1 py-1.5 text-[12.5px] font-medium transition-colors ${
on ? "bg-foreground text-background" : "text-muted-foreground hover:text-foreground"
}`}
>
{s.name}
</button>
);
})}
</div>
<p className="mt-2 text-[12.5px] text-muted-foreground">{scene.note}</p>
<ul className="mt-4 flex flex-col divide-y divide-border border-y border-border text-[13px]" aria-live="polite">
{ROWS.map((r) => {
const on = toggles[r.key];
return (
<li key={r.key} className="flex items-center py-[7px]">
<span className="mr-2.5 h-2 w-2 rounded-full transition-colors" style={{ background: on ? (r.key === "focus" ? scene.colors.focusColor : r.on) : "rgba(127, 127, 127, 0.35)" }} />
<span>{r.label}</span>
<span className={`ml-auto ${on ? "font-medium" : "text-muted-foreground"}`}>{on ? "On" : "Off"}</span>
</li>
);
})}
{(
[
["Volume", volume],
["Brightness", brightness],
] as [string, number][]
).map(([label, v]) => (
<li key={label} className="flex items-center gap-3 py-[7px]">
<span className="w-[74px]">{label}</span>
<span className="h-1 flex-1 overflow-hidden rounded-full bg-muted">
<span className="block h-full rounded-full" style={{ width: `${Math.round(v * 100)}%`, background: scene.colors.accent }} />
</span>
<span className="w-9 text-right font-medium tabular-nums">{Math.round(v * 100)}%</span>
</li>
))}
</ul>
</aside>
</main>
);
}








