Create UI
The UI counterpart of a backend scaffold: same architecture every time, decisions made in the right order, nothing shipped unverified. Read ui-conventions first; it applies throughout.
Phase 1 — Scope (then stop if anything is unclear)
From the request, a PRD or the repo, list:
- Platform and stack. Web (Next.js App Router by default for apps, Vite for SPAs/prototypes) or mobile (Expo + Expo Router + NativeWind + Reanimated). Keep an existing stack.
- Screens, each with its class (marketing, app shell, form, data view, editor, settings, moment) and its states: loading, empty, error, success, first-run.
- Navigation map. How screens connect (tabs, stack, sheets, modals).
- Inputs the user gave. Design system link, references, inspiration tools (e.g. a Mobbin MCP), assets coming later (e.g. Rive characters from another session), brand files.
- Data. Real API or mock. If mock, plausible fixtures in one place (
lib/mock/ordata/), shaped like the real thing will be.
Ask every open question in one message, each with a default, so the user can answer "defaults". Skip what's already answered.
Phase 2 — Direction (wait for approval)
Run design-direction. For moments the user called out (a success page, onboarding, a celebration), research them specifically with the inspiration tools available and note which motion and composition ideas you're taking.
Show: direction, token plan, a wireframe per key screen, the navigation map. Stop and wait for OK unless the user said to just build.
Phase 3 — Foundation
- Tailwind present? If not, ask, then
tailwind-setup. (Never skip this check.) - Wire tokens from
DESIGN.mdinto the theme. Light and dark if the product needs both. - Component layer:
- Web:
shadcn-ui(npx shadcn@latest init, pick a style close to the direction, then restyle via tokens andcvavariants). - Expo: a small
components/ui/set built on NativeWind —Button(press scale),Text(role variants from the type scale),Card,Sheet,Screen(safe areas). Only what the screens need.
- Web:
- Fonts loaded (
next/fontorexpo-font), icon set installed,cn()helper present. - Placeholders for assets arriving later. For Rive characters: a
<Character name state />component with a fixed-size slot and a static fallback, so swapping in.rivfiles later changes one component, not every screen. Document expected artboards, state machines and inputs inDESIGN.md.
Phase 4 — Build screens
One screen at a time, in navigation order, each finished before the next:
- Real copy (
ux-writing), realistic data, every state from Phase 1. - Layout and spacing from
layout-spacing, type fromtypography, color roles fromcolor-system, surfaces fromui-polish. - Mobile: safe areas, 44pt targets, native stack transitions,
formSheetfor sheets,NativeTabsor the platform tab bar, haptics only on meaningful events. - Web on phones:
mobile-webbaseline.
Phase 5 — Motion pass
After the screens work without motion. Run the frequency gate for every candidate (motion-web / motion-native). Spend the delight budget on the rare moments (success, completion, first run); keep everything frequent instant or near-instant. Coordinate multi-element moments with a written timeline (choreography in motion-web). Gestures and springs per apple-design.
Phase 6 — Review
Run ui-review on the whole flow, then unslop's checklist as a self-check, then break-ui on the densest list or card. Fix every HIGH finding before reporting.
Phase 7 — Verify
- Web: dev server, screenshots at 375px and 1440px in both themes, console clean, typecheck and lint pass.
- Expo: build to the iOS simulator (
npx expo run:ios), walk every screen,xcrun simctl io booted screenshoteach one and look at them. Gesture feel, haptics and 120fps need a real device — say which checks are pending on hardware. - Report: what was built (screens, components, tokens), what was verified and how, what's pending (assets, device checks), and any decisions you made on the user's behalf.
Layout of the result
Web (Next.js):
app/(marketing)/… app/(app)/… routes
components/ui/ shadcn primitives (restyled)
components/<feature>/ feature components
lib/utils.ts lib/mock/ cn(), fixtures
app/globals.css @theme tokens
DESIGN.md
Expo:
app/_layout.tsx app/(tabs)/… app/<screen>.tsx Expo Router
components/ui/ components/<feature>/
lib/ data/ assets/
global.css tailwind.config.js
DESIGN.md
Never
- Start building before the direction is approved (unless told to).
- Write UI without Tailwind, or install Tailwind without asking.
- Hand-roll a primitive the component layer already ships.
- Leave a screen with only its happy path.
- Claim a visual or device check you didn't run.