Template
Meadowbyte
The time-off page of an HR and payroll platform, as seen by an employee. A month calendar shows booked leave and public holidays; a summary rail lists days available, pending requests, upcoming days, yearly allowance, carry-over and national holidays. The main action is requesting time off.
Employee time-off calendar with balance summary · App screen: calendar · Small tools and apps · full-stack app (auth + DB)
A mock-up of the screen, drawn from its layout, palette and typefaces. A build follows the full prompt below.
Start from this screenRead the build prompt
Typefaces
The catalog's own faces. A screen composed into a template is drawn in that template's typefaces.
- InterHeadings: Inter 600, 26px for page title; 20px 600 month title
- InterBody: Inter 400, 16px/1.5; stat counts 16px 600; captions 14px muted; grid dates 14px tabular
Patterns
- sidebar with personal section
- underline tabs (calendar / requests)
- month grid with today pill and arrows
- weekend columns de-emphasised by tint
- summary rail of balance cards
- primary pill request button in header
- floating help chat bubble
States it is designed for
- loading grid skeleton
- no leave booked (plain grid, balances shown)
- pending request (striped amber bar with 'Pending' text)
- approved leave (solid green bar)
- public holiday (flag + name)
- zero balance (request button still available, dialog warns)
- request submitted toast
- request failed with retry
- policy not assigned (empty rail with contact admin)
Who it is for
- employees of distributed companies
- contractors on managed payroll
- people managers checking their own leave
Layout
- Sidebar (~150px, pale blue-grey): wordmark, Dashboard, 'PERSONAL' group (Personal details, Documents, Time off active, Time tracking, Expenses), user card at bottom with overflow
- Header: title left; primary pill 'Request time off' and icon buttons (search, apps, help, notifications with dot) right
- Tabs: Calendar | Requests
- Calendar card: Today pill, prev/next, month title; 7-column grid (Mon-Sun), 5-6 rows, today in blue disc, weekend cells tinted
- Summary rail (~220px): 'Your leave summary' + Learn more link; stacked stat cards (icon tile, bold count, caption), first card highlighted
- Floating help bubble bottom-right
- Below 1100px rail moves below the calendar; below 640px calendar switches to an agenda list
Palette
Friendly, orderly, reassuring. Plenty of white and a single confident blue.
- canvas
#f3f4f8 - surface
#ffffff - text
#0f1b33 - muted
#5b6478 - border
#dde3ec - weekend
#f7f9fc - primary
#0b63d6 - on-primary
#ffffff - highlight
#eaf3fe - leave-approved
#1f7a4d - leave-pending
#9a5b00 - focus
#0b63d6
Every checked pair, measured again
| Sample | Where | Ratio | Needs |
|---|---|---|---|
| Aa | body text on white | 17.14:1 | 4.5:1 |
| Aa | muted caption on stat card | 5.93:1 | 4.5:1 |
| Aa | muted text on canvas | 5.40:1 | 4.5:1 |
| Aa | primary button label | 5.57:1 | 4.5:1 |
| Aa | text on highlighted stat card | 15.31:1 | 4.5:1 |
| approved leave bar on white | 5.32:1 | 3:1 | |
| Aa | pending leave text on white | 5.43:1 | 4.5:1 |
| focus ring on weekend tint | 5.28:1 | 3:1 | |
| Aa | date text on weekend tint | 5.63:1 | 4.5:1 |
As vibld’s tokens
The palette on the fifteen colour tokens vibld styles a project with, each text colour on the fill it is read on. Marked tokens are solved from the palette, because no swatch held that role at 4.5:1.
- background
- card
- muted
- primary
- secondary
- accent
- destructive *
Type scale
- Display
- Inter 600, 26px for page title; 20px 600 month title
- Body
- Inter 400, 16px/1.5; stat counts 16px 600; captions 14px muted; grid dates 14px tabular
Similar to the observed geometric-humanist sans. Sidebar group label 12px 600 uppercase +0.06em.
Spacing and imagery
Comfortable; 8px base; calendar cells ~64px tall with 8px padding; summary cards 12px padding, 8px gap; radius 12px cards, 8px stat cards, full pill buttons; very light shadow on the calendar and rail cards.
Line icons in tiles; leave shown as coloured bars inside day cells; flag icon for holidays.
Components
- sidebar nav
- user card
- header icon buttons
- primary pill button
- underline tabs
- month grid
- leave bar in day cell
- holiday marker
- summary stat card
- help chat bubble
- request time off dialog
Interactions
- Clicking or dragging across days opens the request dialog prefilled with that range
- Hovering a leave bar shows type, dates and status
- Today pill jumps to the current month
- Arrows animate month change with a 150ms slide
- Stat cards link to the relevant filtered list
Data
Employee{id, name, country, manager_id}LeavePolicy{id, name, days_per_year, carryover_max}LeaveRequest{id, employee_id, type (vacation|sick|personal), start_date, end_date, half_day, status (pending|approved|declined|cancelled), note}Holiday{country, date, name}Balance{employee_id, year, available, used, pending, carried_over}
Guardrails
Experience
- Keep 'Request time off' visible on every tab
- Show balance impact in the request dialog before submission
- Differentiate pending and approved leave with pattern and text, not just colour
- Start weeks on the locale's first day
- List national holidays in the rail and on the grid
- Never let employees edit approved requests without manager re-approval
Accessibility
- Calendar uses a grid role with date labels including leave status
- Leave bars carry text labels on hover and in accessible names
- Tabs follow the tabs pattern
- Dialog date pickers are keyboard operable
- Notification dot has an accessible count
- Help bubble does not cover focused content and can be dismissed
Security
- RLS: employees read their own requests and balances; managers read reports' via a manager_id check; HR admin role for all
- Balance changes computed server-side from approved requests only
- Validate date ranges and half-day flags; prevent overlapping requests
- PII minimised: notes visible only to employee, manager and HR
Build prompt
The baseline every prompt in the catalog assumes, then this design’s own ten sections, from goal to guardrails.
The baseline
### How to use these prompts Paste an entry's build prompt into your coding agent as the first message. Each prompt names its own stack, tokens and acceptance criteria; the rules below apply to all of them and can be prepended once per project. ### Engineering baseline - TypeScript strict mode, no `any`, small typed components, feature folders, and one source of truth for design tokens (CSS variables consumed by Tailwind). - Validate every input with a shared zod schema on the client and again on the server or edge function. Never trust client-side checks alone. - Show loading, empty and error states for every async view. Surface errors in plain language with a retry, and log details to the console in development only. - Keep secrets out of the bundle. Only publishable keys (for example a Supabase anon key) belong in client code; service-role keys, API keys and webhooks live in server or edge-function environment variables. ### Data and auth baseline (full-stack entries) - Enable Row Level Security on every table before inserting data. Default-deny, then add owner-scoped policies (`auth.uid() = user_id`) and explicit role checks for admin views. - Store roles in a separate table checked by a security-definer function, never in a user-editable profile field. - Upload files to private storage buckets with size and MIME limits, and serve them through signed URLs. - Rate-limit public endpoints (forms, auth, AI calls) and add a honeypot field or captcha to anonymous forms. - Take payments through a hosted checkout and verify webhooks by signature. Never handle raw card data. ### Accessibility and UX baseline - Target WCAG 2.2 AA: 4.5:1 contrast for normal text and 3:1 for large text, input borders, focus rings and meaningful icons or chart lines. Every palette in this catalog lists its verified pairs; re-check with a contrast tool after any colour change. - Keep body text at 16px or larger with 1.5 line height, nothing below 12px, no light weights under 24px, and uppercase only for short labels. - Give every interactive element a visible focus ring, full keyboard support, semantic landmarks, labelled form fields, and alt text on meaningful images. - Respect `prefers-reduced-motion` for every animation. Give drag-and-drop and carousels keyboard and button alternatives. - Build mobile-first and test at 375px, 768px and 1280px. ### Content guardrails - Use original copy, fictional sample data and placeholder or licensed imagery. Do not reuse another product's name, logo, screenshots or marketing text. - Label demo testimonials and metrics as samples. Collect the minimum personal data the feature needs. ### SaaS screen baseline - Design every screen for its full set of states: first-run empty, loading skeleton, partial data, error with retry, permission-denied, and success feedback. Each entry lists the states its screen needs. - Keep destructive actions (delete, revoke, downgrade, remove member) behind a confirmation that names the object, and prefer undo over a second dialog where the action is reversible. - Enforce authorisation on the server for every action a screen exposes. Hiding a button is not access control; check the role again in the API or RLS policy. - Never show secrets (API keys, tokens) in full after creation. Show them once, then mask them, and offer rotate and revoke. - Keep the app shell (navigation, workspace switcher, account menu) consistent across screens, and preserve filters, sort and scroll position when the user navigates back.
### Goal Build **Meadowbyte**, the employee Time off page of a global HR and payroll platform. A month calendar shows the person's leave and public holidays; a summary rail shows balances and counts; 'Request time off' opens a dialog that previews the balance impact. ### Stack React 18 + TypeScript + Vite, Tailwind CSS, shadcn/ui (Tabs, Dialog, Calendar, Select, Toast, Tooltip), lucide-react, date-fns, react-hook-form + zod, TanStack Query. Supabase Auth and Postgres. ### Pages & layout 1. **Shell**: sidebar (wordmark, Dashboard, PERSONAL: Personal details, Documents, Time off, Time tracking, Expenses; user card 'Maya Okafor, Brightwell Co.'). Header with title and icon buttons. 2. **/time-off** (this screen): tabs Calendar | Requests; calendar card for November with Today pill and arrows; rail cards: 12 days available, 1 pending request, 3 days upcoming, 25 days per year, 2 days carried over, 9 national holidays (See list). 3. **/time-off/requests**: table of requests with status badges. 4. **Request dialog**: type, date range, half-day toggle, note, balance before/after. 5. Responsive: rail below calendar under 1100px; agenda list under 640px. ### Design system - Colors: `--canvas: #f3f4f8`, `--surface: #ffffff`, `--text: #0f1b33`, `--muted: #5b6478`, `--border: #dde3ec`, `--weekend: #f7f9fc`, `--primary: #0b63d6`, `--on-primary: #ffffff`, `--highlight: #eaf3fe`, `--leave-approved: #1f7a4d`, `--leave-pending: #9a5b00`, `--focus: #0b63d6`. - Fonts: Inter (similar to observed). Title 26px/600; month 20px/600; body 16px/1.5; captions 14px; grid dates 14px tabular. - Spacing: 8px base; card padding 20px; cell padding 8px. - Radius: cards 12px, stat cards 8px, buttons full pill, today disc full circle. - Shadows: `0 1px 3px rgba(15,27,51,.06)` on cards. - Motion: 150ms month slide; dialog 200ms; reduced motion respected. ### Components & interactions `HrSidebar`, `PageHeader` (RequestButton, IconButtons, NotificationDot), `Tabs`, `MonthGrid` (DayCell with LeaveBar, HolidayMarker, today disc), `SummaryRail` (StatCard), `RequestDialog` (type Select, range Calendar, half-day Switch, note, BalancePreview), `HelpBubble`. Pending bars use diagonal stripes plus a 'Pending' label. ### Data & state Tables per data model. `balances` maintained by a trigger on approval. Requests of the visible month fetched by range; holidays by country and year. Mock employee in Portugal with one approved week, one pending day and national holidays. ### Accessibility Day cells expose names like 'Wednesday 12 November, vacation approved'. Stripes plus text for pending. All dialog fields labelled; errors linked. Focus returns to the originating cell after closing the dialog. Verified contrast: body text on white: #0f1b33 on #ffffff = 17.14:1; muted caption on stat card: #5b6478 on #ffffff = 5.93:1; muted text on canvas: #5b6478 on #f3f4f8 = 5.4:1; primary button label: #ffffff on #0b63d6 = 5.57:1; text on highlighted stat card: #0f1b33 on #eaf3fe = 15.31:1; approved leave bar on white: #1f7a4d on #ffffff = 5.32:1; pending leave text on white: #9a5b00 on #ffffff = 5.43:1; focus ring on weekend tint: #0b63d6 on #f7f9fc = 5.28:1; date text on weekend tint: #5b6478 on #f7f9fc = 5.63:1. ### Security RLS: `leave_requests` select where employee is self, or manager_id = self for reports, or role = hr_admin; insert only for self; update by self only while pending (cancel), by manager for status. Balances read-only for employees. Overlap and range checks in a constraint or trigger. Notes hidden from peers. ### Performance & SEO Fetch only the visible month plus one either side. Prefetch next month on arrow hover. Noindex. ### Guardrails - Invented people, companies and countries' holidays sample - Do not show colleagues' leave details on this personal page - Balance math only on the server - Typed code, clear errors - Acceptance criteria: (1) selecting a range opens a prefilled request with balance preview; (2) pending and approved leave are distinguishable without colour; (3) holidays appear in grid and rail; (4) RLS enforces employee/manager/HR access; (5) agenda view at 390px.