Estimate: 35m · Depends on: 1.0.5.1
Build the React primitive components that every screen will compose from. Nine primitives cover almost everything Motir's UI needs: Button (4 variants), Input, Textarea, Card, Modal, Pill / Tag, Tooltip, Toast, Spinner. Each must use only the tokens from 1.0.5.1 — never hardcoded values — so a future theme tweak propagates through one source.
Why this is the biggest Subtask in Story 1.0.5: primitives are the foundation of every later UI Subtask in the entire project. Getting them right (accessible, consistent, composable) saves work in every Subtask that touches the UI; getting them wrong propagates problems for months. This Subtask deserves the most attention in the story.
What you'll do: For each primitive, create a file under /components/ui/<Name>.tsx with a typed props interface, all variants implemented, and full keyboard / aria support. Use class-variance-authority for variant management and tailwind-merge for class composition (the modern React + Tailwind primitive pattern). Render every variant + state of every primitive on the /app/_tokens/page.tsx route from 1.0.5.1 as a living style guide.
primary | secondary | ghost | danger × sizes sm | md | lg × states default | hover | active | focus | disabled | loading. Loading state shows the Spinner inline.<a> or button).globals.css — zero hardcoded hex / px values./app/_tokens/page.tsx renders all primitives × all variants × key states as a single specimen page.@example comment with a minimal usage sample./app/globals.css (from 1.0.5.1) — the token sourcetailwind.config.ts (from 1.0.5.1) — the Tailwind themecva + tailwind-merge docs