2.9 KiB
2.9 KiB
Lovable — Notifications + UI States Kit (Micro-App)
Before you start: read and follow DESIGN_SYSTEM_BRIEF.md, UX_TOKEN_CONTRACT.md, REPO_SCOPING_RULES.md, and ACCEPTANCE_CHECKLIST.md.
Goal
Build a UI/UX-rich Next.js micro-app that serves as a reusable Notifications + UI States Kit we can copy into:
dashboards/admin-webdashboards/tracker-web- product web dashboards
This is design-led: prioritize interaction polish, spacing, typography, and accessibility.
Constraints
- Only modify files in this repository.
- pnpm only.
- Next.js 16 App Router, React 19, TypeScript strict.
- TailwindCSS v4.
- No network calls.
- No
console.log. - No hardcoded colors — use
--ux-*CSS variables fromUX_TOKEN_CONTRACT.md. - Avoid unnecessary dependencies. If you add a dependency, justify why it is required.
Must-have routes
/overview landing + links/toaststoast system demos/bannersinline banner demos/statesloading / empty / error patterns/dialogsconfirm dialog patterns/formsvalidation + helper text patterns
App shell
- Left sidebar navigation
- Top bar with:
- theme toggle (light/dark)
- “Shortcuts” button
Toast system (core deliverable)
Build a toast system that supports:
- Variants: info, success, warning, error
- Title + optional description
- Optional action button (e.g. Undo)
- Optional progress countdown bar
- Stacking / queue behavior (max visible, overflow count)
- Dismiss: close button, swipe (optional), timeout
- Position selector demo: top-right (default), bottom-right, bottom-center
Accessibility requirements:
- ARIA live region (
politefor info/success,assertivefor error) - Focus behavior: toasts should not steal focus by default
Banners
Create inline banners for page-level messaging:
- Variants: info/success/warn/error
- Optional “Retry” action
- Dismissible
States gallery
Create reusable components:
Skeletonprimitives (text line, avatar, card)EmptyStatewith icon + title + description + CTAErrorStatewith retry + “copy details” action (copies JSON)
Provide demos:
- Table loading skeleton
- Card grid loading skeleton
- Detail drawer loading skeleton
Dialogs
- Confirm dialog (destructive)
- Confirm dialog (non-destructive)
- Modal focus trap + Esc close
Forms
Create a small form with:
- Required fields + inline errors
- Disabled state
- Helper text
- Success state
Visual / UX bar
- Premium spacing/typography
- Subtle animations (not flashy)
- Excellent focus rings (token-driven)
- Mobile responsive
Deliverables
- Full Next.js app with scripts:
devcheck(must runtsc --noEmit+eslint)build(must runnext build --webpack)
Verification
From repo root:
pnpm installpnpm run checkpnpm run build
Output expectation
Open a PR that only changes files in this repo.