Prompt library
cat prompts/*.md | agent
Prompts that turn a design into working UI. Blanks in yellow are variables — fill them, copy, paste into your agent.
grep
prompts/
# fill the blanks — leave empty to keep the default
You are working in my existing codebase. Implement the **Flora** design system and restyle the whole app with it. Stack: Next.js (App Router) + TypeScript + Tailwind CSS 4. ## 1. Read before you write - Inspect the project structure, the global stylesheet, the layout file and any existing UI components. - Do not install new UI libraries. Do not rename routes, change data fetching or touch business logic. ## 2. Add the tokens Create `src/styles/flora.css` with exactly these variables and import it once from the global stylesheet: ```css :root { --flora-canvas: #F1E9DC; --flora-surface: #FBF6EC; --flora-surface-hover: #E9DDCD; --flora-ink: #2F4038; --flora-muted: #6D786D; --flora-border: #31473B; --flora-shadow-color: #35483B; --flora-sage: #C7D2B1; --flora-terracotta: #B86752; --flora-rose: #DDA095; --flora-botanical-blue: #82998C; --flora-deep-teal: #273A32; --flora-on-dark: #F1E9DC; --flora-radius-button: 8px; --flora-radius-card: 12px; --flora-radius-panel: 18px; --flora-radius-pill: 999px; --flora-shadow-small: 2px 2px 0 var(--flora-shadow-color); --flora-shadow-card: 4px 4px 0 var(--flora-shadow-color); --flora-shadow-large: 6px 6px 0 var(--flora-shadow-color); --flora-font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif; --flora-font-serif: "DM Serif Display", ui-serif, Georgia, serif; } ``` If Tailwind 4 is present, also map them in an `@theme` block (`--color-canvas`, `--color-paper`, `--color-ink`, `--color-muted`, `--color-line`, `--color-sage`, `--color-terracotta`, `--color-rose`, `--color-botanical`, `--color-teal`, `--shadow-flora`, `--radius-card`) so utilities like `bg-paper shadow-flora rounded-card` work. Load DM Sans (400/500/700) and DM Serif Display (400) with the framework's font loader — `next/font/google` in Next.js — not a render-blocking `<link>`. ## 3. Build these primitives Put them in `src/components/ui`, one file each, typed props, no inline styles: - `Button` — variants default / primary (terracotta) / secondary (sage) / dark / ghost; sizes sm / md / lg / icon. Hover: translate(-2px,-2px) + 4px shadow. Active: translate(2px,2px) + no shadow. - `Card` — paper surface, 2px border, 4px hard shadow; tones paper / sage / dark; optional `href` turns it into a lifting link. - `Pill` — status variants live / wip / paused / archived with a colored dot. - `InputField`, `TextareaField`, `Checkbox` — label, hint and error wired with `aria-describedby`. - `Navbar` — serif brand, pill links with `aria-current`, mobile disclosure menu. - `Callout` — tip / info / warning / danger with an 8px left accent border. - `Hero` — serif title, lead, actions and up to three floral decoration layers. - `Stat` + `DataTable`. ## 4. Botanical decorations - Use transparent WebP florals from `public/flora`. If none exist, leave clearly named placeholders and tell me which files to add. - Decorations are `<img alt="" aria-hidden="true">` with `position:absolute; z-index:-1; pointer-events:none` inside a parent that has `position:relative; isolation:isolate; overflow:hidden`. - Opacity 0.18–0.72. Hide side and bloom layers below 768px; keep one corner. ## 5. Rules that must hold - Shadows are always hard offsets (zero blur). Never use `rgba(0,0,0,.1)` soft shadows. - No gradients, glassmorphism, neon or SaaS blue. - Body text ≥ 16px, contrast ≥ 4.5:1 on canvas, visible focus ring (3px terracotta outline, 3px offset). - Respect `prefers-reduced-motion`. - Flowers never sit on top of text or controls. ## 6. Done means - [ ] `npm run build` and lint pass. - [ ] Every page uses the canvas background and paper surfaces. - [ ] All buttons, cards, inputs and nav come from the new primitives. - [ ] Keyboard-only navigation works and focus is always visible. - [ ] Layout holds at 360px, 768px and 1280px wide. When finished, list the files you created or changed and anything you could not complete.