LumenConceptInteractive preview
Lumen: Create an alert
An alert builder whose live chart replays the last 30 periods of the chosen metric, with a draggable threshold line that shows exactly when you would have been alerted.
- Category
- Notifications
- Platform
- Web
Interactive screenClick through it, resize it, or switch states. It’s real UI, not a screenshot.
Use this screen
Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.
FreeReact 18+Tailwind v3.4 or v4No extra packages
1. Add it with the shadcn CLI
npx shadcn@latest add https://www.thatdesignui.com/r/screens/lumen-create-alert.json2. Use it
Every prop is optionalapp/page.tsx
import LumenAlertSetup from "@/components/lumen-alert-setup";
export default function Page() {
return <LumenAlertSetup />;
}Prefer to paste it yourself? Open the .
Under the hood
How it’s built
What’s inside
- The Lumen app shell (#f5f6fb page, 236px white sidebar with Alerts active, 26px conic indigo logo), a breadcrumb 'Alerts / New alert' and an h1 'Create an alert'. From 1280px wide the body is two columns: a 440px white form card (20px radius) and a chart card filling the rest; below that they stack.
- Form: a custom metric listbox (Signups, Conversion rate, Errors, Revenue, each with a 32px gradient icon tile and a one-line hint), a 3-way segmented radio group for the condition (Drops below / Rises above / Changes by %), a 48px threshold input with -/+ stepper buttons and a unit suffix, a 1h/24h/7d segmented window control, three Email/Slack/Webhook toggle cards (role=checkbox, indigo ring when on) and an alert name that is suggested from the choices ('Signups drop below 480 in 24h') until the user types their own, with a 'Use suggestion' reset.
- Chart: an SVG line (#6d5efc, 2.6px, soft gradient area) of the last 30 hours/days/weeks, a dashed #4338ca threshold line with a pill handle (role=slider) that can be dragged with mouse or touch or moved with arrow keys, PageUp/PageDown, Home and End, always in sync with the number input. The triggering side is tinted rose, would-be alerts are #e11d48 dots (larger with a halo where an alert would start), and 'Changes by %' switches to a period-over-period % chart with a mirrored ±line.
- Footer of the chart card: a bell tile and the sentence 'You'd have been alerted 3 times in the last 30 days' (aria-live) with the most recent trigger and channels, a 48px indigo 'Create alert' button that spins for ~0.7s then calls onContinue(alert), and an amber 'That's a lot of pings' note with 'Use suggested threshold' when 7 or more alerts would fire.
How it behaves
- Dragging the threshold line (or focusing its handle and pressing the arrow keys) changes the number input, the highlighted red points and the 'alerted N times' sentence together; typing a number moves the line.
- With no props it opens on Signups, Drops below, 24h, Email and Slack on, threshold 480, and says you'd have been alerted 3 times in the last 30 days.
- Switching the metric, condition or window resets the threshold to a sensible suggestion and updates the suggested alert name unless a custom name was typed.
- Turning off every channel shows 'Choose at least one channel.' and disables Create alert; clearing the name does the same.
- The metric picker opens with Enter or the arrow keys, moves with the arrows, selects with Enter and closes with Escape, returning focus to the button.
- At 375px the form and chart stack with no horizontal scroll and every control is at least 40px tall; with reduced motion the point pop-in is off.


