@reinvented/design 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +214 -0
  3. package/package.json +4 -3
  4. package/skills/apps/analytics.md +103 -0
  5. package/skills/apps/booking-scheduling.md +97 -0
  6. package/skills/apps/content-management.md +52 -0
  7. package/skills/apps/crm.md +80 -0
  8. package/skills/apps/e-commerce.md +109 -0
  9. package/skills/apps/education.md +79 -0
  10. package/skills/apps/finance.md +68 -0
  11. package/skills/apps/health-fitness.md +72 -0
  12. package/skills/apps/marketplace.md +99 -0
  13. package/skills/apps/messaging.md +84 -0
  14. package/skills/apps/portfolio-personal.md +90 -0
  15. package/skills/apps/project-management.md +95 -0
  16. package/skills/apps/saas-dashboard.md +104 -0
  17. package/skills/apps/social-platform.md +50 -0
  18. package/skills/blocks/auth.md +106 -0
  19. package/skills/blocks/communication.md +98 -0
  20. package/skills/blocks/content.md +107 -0
  21. package/skills/blocks/data-management.md +109 -0
  22. package/skills/blocks/data-viz.md +92 -0
  23. package/skills/blocks/ecommerce.md +126 -0
  24. package/skills/blocks/feedback.md +97 -0
  25. package/skills/blocks/filtering.md +127 -0
  26. package/skills/blocks/marketing.md +136 -0
  27. package/skills/blocks/media.md +102 -0
  28. package/skills/blocks/navigation.md +136 -0
  29. package/skills/blocks/onboarding.md +75 -0
  30. package/skills/blocks/profiles.md +131 -0
  31. package/skills/blocks/scheduling.md +117 -0
  32. package/skills/blocks/settings.md +102 -0
  33. package/skills/components/advanced-components.md +142 -0
  34. package/skills/components/avatar.md +92 -0
  35. package/skills/components/badge.md +105 -0
  36. package/skills/components/button.md +87 -0
  37. package/skills/components/card.md +144 -0
  38. package/skills/components/chart.md +88 -0
  39. package/skills/components/dialog.md +109 -0
  40. package/skills/components/dropdown-menu.md +117 -0
  41. package/skills/components/extended-components.md +187 -0
  42. package/skills/components/feedback.md +165 -0
  43. package/skills/components/form.md +112 -0
  44. package/skills/components/input.md +107 -0
  45. package/skills/components/map.md +53 -0
  46. package/skills/components/navigation.md +73 -0
  47. package/skills/components/overlay.md +77 -0
  48. package/skills/components/page-header.md +51 -0
  49. package/skills/components/select.md +175 -0
  50. package/skills/components/table.md +102 -0
  51. package/skills/components/tabs.md +105 -0
  52. package/skills/components/utilities.md +138 -0
  53. package/skills/devices/desktop.md +43 -0
  54. package/skills/devices/mobile.md +77 -0
  55. package/skills/foundation/design-principles.md +77 -0
  56. package/skills/foundation/design-tokens.md +121 -0
  57. package/skills/foundation/mockup-generation.md +118 -0
  58. package/skills/foundation/rules.md +54 -0
  59. package/skills/foundation/tailwind-usage.md +204 -0
  60. package/skills/layouts/dashboard.md +71 -0
  61. package/skills/layouts/full-page-form.md +75 -0
  62. package/skills/layouts/list-detail.md +70 -0
  63. package/skills/layouts/marketing.md +70 -0
  64. package/skills/layouts/responsive.md +67 -0
  65. package/skills/layouts/settings-page.md +106 -0
  66. package/skills/layouts/sidebar.md +73 -0
  67. package/skills/layouts/topbar.md +68 -0
  68. package/skills/patterns/auth.md +131 -0
  69. package/skills/patterns/content-display.md +164 -0
  70. package/skills/patterns/dashboards.md +104 -0
  71. package/skills/patterns/data-tables.md +113 -0
  72. package/skills/patterns/empty-states.md +71 -0
  73. package/skills/patterns/error-states.md +73 -0
  74. package/skills/patterns/forms.md +136 -0
  75. package/skills/patterns/loading-states.md +92 -0
  76. package/skills/patterns/navigation.md +113 -0
  77. package/skills/patterns/notifications.md +91 -0
  78. package/skills/patterns/onboarding.md +42 -0
  79. package/skills/patterns/search.md +55 -0
  80. package/skills/patterns/settings.md +132 -0
  81. package/skills/patterns/user-profiles.md +67 -0
  82. package/skills/personas/business-operator.md +114 -0
  83. package/skills/personas/consumer-casual.md +60 -0
  84. package/skills/personas/consumer-power-user.md +109 -0
  85. package/skills/personas/creative-professional.md +109 -0
  86. package/skills/personas/enterprise-admin.md +134 -0
  87. package/skills/visual/color-usage.md +62 -0
  88. package/skills/visual/dark-mode.md +50 -0
  89. package/skills/visual/polish-techniques.md +101 -0
  90. package/skills/visual/spacing-composition.md +69 -0
  91. package/skills/visual/transitions-animations.md +66 -0
  92. package/skills/visual/typography-hierarchy.md +66 -0
  93. package/DESIGN_GUIDE.md +0 -148
@@ -0,0 +1,54 @@
1
+ # Rules (Non-Negotiable)
2
+
3
+ These rules must NEVER be violated. Any output that breaks these rules is rejected.
4
+
5
+ ## Component Rules
6
+
7
+ 1. **No raw `<button>`** — use `<Button>` from `@reinvented/design`
8
+ 2. **No raw `<input>`** — use `<Input>` from `@reinvented/design`
9
+ 3. **No raw `<select>`** — use `<Select>` from `@reinvented/design`
10
+ 4. **No raw `<textarea>`** — use `<Textarea>` from `@reinvented/design`
11
+ 5. **No `alert()`, `confirm()`, `prompt()`** — use `<Dialog>`, `<AlertDialog>`, or `toast()`
12
+ 6. **No raw `<table>`** — use `<Table>` and its subcomponents
13
+
14
+ ## Styling Rules
15
+
16
+ 7. **No hardcoded colors** — no `#333`, no `rgb(...)`, no `text-gray-500`. Use token classes: `text-foreground`, `text-muted-foreground`, `bg-primary`, `bg-card`, `border-border`, etc.
17
+ 8. **No arbitrary Tailwind values** — no `text-[#333]`, `p-[13px]`, `w-[347px]`. Use the spacing scale: `p-4`, `gap-6`. Use named sizes for widths: `max-w-md`, `max-w-7xl`.
18
+ 9. **No inline styles** — all styling through Tailwind utility classes. Exception in mockup mode: CSS gradients used as image replacements.
19
+ 10. **No `@apply` blocks** — compose utility classes directly in templates.
20
+
21
+ ## Icon Rules
22
+
23
+ 11. **No emojis** — use Lucide icons from `lucide-react` exclusively.
24
+ 12. **Icon sizing standard**: `w-4 h-4` in buttons/inline, `w-5 h-5` in navigation, `w-8 h-8` or `w-12 h-12` in empty states.
25
+
26
+ ## Composition Rules
27
+
28
+ 13. **Items always inside groups**: `<SelectItem>` must be wrapped in `<SelectGroup>`, `<DropdownMenuItem>` in `<DropdownMenuGroup>`, and `<ContextMenuItem>` in `<ContextMenuGroup>`.
29
+ 14. **Tabs structure**: `<TabsTrigger>` MUST be wrapped inside `<TabsList>`. Never place a trigger directly inside `<Tabs>`.
30
+ 15. **Overlays require titles**: `<Dialog>`, `<Sheet>`, and `<Drawer>` must always contain their respective title (`<DialogTitle>`, etc.) inside their Header components. Use `className="sr-only"` if it should be visually hidden.
31
+ 16. **Cards use full structure**: Never place content directly inside `<Card>`. Always use `<CardHeader>` and `<CardContent>`.
32
+ 17. **Use primitives for layout**: Use `<Separator>` instead of `<hr>` or border divs. Use `<Badge>` instead of rounded colorful spans.
33
+ 18. **Avatars require fallbacks**: Always include `<AvatarFallback>` alongside `<AvatarImage>`.
34
+
35
+ ## Layout Rules
36
+
37
+ 19. **No horizontal scrolling** on any viewport.
38
+ 20. **44px minimum touch targets** on mobile.
39
+ 21. **No custom scrollbar styling** — use `<ScrollArea>` from the DS.
40
+ 22. **Page content max width**: `max-w-7xl mx-auto` (1280px).
41
+ 23. **Page-level spacing**: Always use `space-y-6` for page-level vertical rhythm. Do not exceed `gap-6` or `space-y-6` for structural gaps.
42
+ 24. **No nested scrolling (scrolling within scrolling)**: This is a terrible UX pattern. If a specific section like a sidebar or Kanban column requires its own `<ScrollArea>`, the main parent page MUST be fixed height without scrolling (e.g., `h-[100dvh] overflow-hidden`). Otherwise, let the whole page scroll naturally and omit the inner `ScrollArea`s.
43
+
44
+ ## State Rules
45
+
46
+ 24. **Every view must handle**: loading state, empty state, error state, data state.
47
+ 25. **Every mutation button**: shows a `<Loader2>` spinner icon and is `:disabled` during the request.
48
+ 26. **Every list**: has an empty state with descriptive text and a primary CTA button.
49
+
50
+ ## Import Rules
51
+
52
+ 27. **Always import DS components** from `@reinvented/design` — this is the primary source for all UI components, `cn()`, and `toast`.
53
+ 28. **Always import icons** from `lucide-react`.
54
+ 29. You may use react-router-dom, pinia, data fetching libraries, chart libraries, etc., alongside standard UI components.
@@ -0,0 +1,204 @@
1
+ # Tailwind CSS Usage
2
+
3
+ This design system uses Tailwind CSS with custom theme tokens. All styling is done through utility classes in templates.
4
+
5
+ ## About Numeric Classes
6
+
7
+ In Tailwind, numeric utility classes (`gap-4`, `p-6`, `w-64`) **are** the design tokens — they map to a consistent 4px base scale. `gap-4` = 16px is semantically "the standard item gap" just as `gap-6` = 24px is "the standard section gap." These numbers are NOT arbitrary — they're the spacing system.
8
+
9
+ **What IS bad practice**: arbitrary values via bracket notation (`w-[347px]`, `p-[13px]`). These break the spacing scale. Never use them.
10
+
11
+ **Prefer `size-*` over `w-* h-*`**: For equal width and height (like icons, avatars, fixed squares), always use the `size-*` utility instead of separate width and height classes. `size-4` is preferred over `w-4 h-4`.
12
+
13
+ **Prefer `gap-*` over margin between siblings**: When building flex or grid layouts, always use `gap-*` for spacing between elements. Avoid using `space-x-*` or direct margin utilities (`ml-2`) between siblings. `space-y-*` is acceptable ONLY for macro document flow (like `space-y-6` between major sections).
14
+
15
+ **Prefer named sizes where available**: For max-widths, Tailwind provides semantic names that are more readable:
16
+
17
+ | Named Size | Pixels | When to Use |
18
+ |-----------|--------|-------------|
19
+ | `max-w-sm` | 384px | Auth cards, small dialogs |
20
+ | `max-w-md` | 448px | Standard forms, dialogs |
21
+ | `max-w-lg` | 512px | Large forms, content panels |
22
+ | `max-w-xl` | 576px | Complex dialogs |
23
+ | `max-w-2xl` | 672px | Wide content areas |
24
+ | `max-w-3xl` | 768px | Narrow page content (portfolio, blog) |
25
+ | `max-w-4xl` | 896px | Settings pages |
26
+ | `max-w-5xl` | 1024px | Marketing pages |
27
+ | `max-w-7xl` | 1280px | Standard page content container |
28
+
29
+ For container widths, always prefer named sizes (`max-w-md`, `max-w-7xl`) over numeric widths (`w-96`, `w-80`). For internal component dimensions like sidebar width (`w-64` = 256px), the numeric form is standard and correct.
30
+
31
+ ## The `cn()` Utility
32
+
33
+ Use `cn()` (imported from `@reinvented/design`) to merge classes conditionally:
34
+
35
+ ```ts
36
+ import { cn } from '@reinvented/design'
37
+
38
+ // Conditional classes
39
+ className={cn('flex items-center gap-2', isActive && 'bg-accent', className)}
40
+ ```
41
+
42
+ ## Common Class Patterns
43
+
44
+ ### Page Container
45
+ ```html
46
+ <div className="max-w-7xl mx-auto px-6 py-8">
47
+ ```
48
+ Centers content with a 1280px max width and consistent padding.
49
+
50
+ ### Page Header
51
+ ```tsx
52
+ <!-- Always use the explicit PageHeader components instead of raw divs -->
53
+ <PageHeader>
54
+ <PageHeaderHeading>
55
+ <PageHeaderTitle>Page Title</PageHeaderTitle>
56
+ <PageHeaderDescription>Description of this page.</PageHeaderDescription>
57
+ </PageHeaderHeading>
58
+ <PageHeaderActions>
59
+ <Button>Primary Action</Button>
60
+ </PageHeaderActions>
61
+ </PageHeader>
62
+ ```
63
+
64
+ ### Section Stack
65
+ ```html
66
+ <div className="space-y-6">
67
+ <!-- Section 1 -->
68
+ <!-- Section 2 -->
69
+ <!-- Section 3 -->
70
+ </div>
71
+ ```
72
+ Uses `space-y-6` for consistent vertical spacing between major sections.
73
+
74
+ ### Grid Layouts
75
+ ```html
76
+ <!-- Equal columns -->
77
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
78
+
79
+ <!-- Stat cards (4 columns on desktop) -->
80
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
81
+
82
+ <!-- Asymmetric (main + sidebar) -->
83
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
84
+ <div className="lg:col-span-2"><!-- Main --></div>
85
+ <div><!-- Sidebar --></div>
86
+ </div>
87
+ ```
88
+
89
+ ### Flexbox Patterns
90
+ ```html
91
+ <!-- Horizontal layout with spacing -->
92
+ <div className="flex items-center gap-3">
93
+
94
+ <!-- Space between (header with action) -->
95
+ <div className="flex items-center justify-between">
96
+
97
+ <!-- Vertical stack -->
98
+ <div className="flex flex-col gap-2">
99
+
100
+ <!-- Push item to the right -->
101
+ <div className="flex items-center gap-3">
102
+ <span>Left content</span>
103
+ <span className="ml-auto">Right content</span>
104
+ </div>
105
+ ```
106
+
107
+ ### Interactive States
108
+ ```html
109
+ <!-- Hoverable card -->
110
+ className="cursor-pointer transition-colors hover:bg-accent/50"
111
+
112
+ <!-- Hoverable list row -->
113
+ className="flex items-center gap-3 px-3 py-2 rounded-md transition-colors hover:bg-accent cursor-pointer"
114
+
115
+ <!-- Active/selected state -->
116
+ className="bg-accent font-medium"
117
+
118
+ <!-- Disabled state -->
119
+ className="opacity-50 pointer-events-none"
120
+ ```
121
+
122
+ ### Text Truncation
123
+ ```html
124
+ <!-- Single line truncate -->
125
+ <span className="truncate">Long text that might overflow</span>
126
+
127
+ <!-- Multi-line clamp -->
128
+ <p className="line-clamp-2">Text that wraps to maximum 2 lines</p>
129
+ ```
130
+
131
+ ### Responsive Patterns
132
+ ```html
133
+ <!-- Hide on mobile, show on desktop -->
134
+ className="hidden lg:block"
135
+
136
+ <!-- Show on mobile, hide on desktop -->
137
+ className="lg:hidden"
138
+
139
+ <!-- Stack on mobile, row on desktop -->
140
+ className="flex flex-col sm:flex-row gap-4"
141
+
142
+ <!-- Full width on mobile, fixed on desktop -->
143
+ className="w-full sm:w-auto"
144
+ ```
145
+
146
+ ## Anti-Patterns (Do NOT Do These)
147
+
148
+ ```html
149
+ <!-- ❌ Arbitrary values -->
150
+ <div className="p-[13px] w-[347px] text-[#666]">
151
+
152
+ <!-- ✅ Use token scale -->
153
+ <div className="p-3 w-80 text-muted-foreground">
154
+ ```
155
+
156
+ ```html
157
+ <!-- ❌ Inline styles -->
158
+ <div style="color: gray; margin-top: 20px;">
159
+
160
+ <!-- ✅ Utility classes -->
161
+ <div className="text-muted-foreground mt-5">
162
+ ```
163
+
164
+ ```html
165
+ <!-- ❌ Missing gap in flex/grid -->
166
+ <div className="flex items-center">
167
+ <Icon /><span>Text</span>
168
+ </div>
169
+
170
+ <!-- ✅ Always specify gap -->
171
+ <div className="flex items-center gap-2">
172
+ <Icon className="w-4 h-4" /><span>Text</span>
173
+ </div>
174
+ ```
175
+
176
+ ```html
177
+ <!-- ❌ Using margin for spacing between siblings -->
178
+ <div className="mt-4">Item 1</div>
179
+ <div className="mt-4">Item 2</div>
180
+
181
+ <!-- ✅ Use gap or space-y on the parent -->
182
+ <div className="space-y-4">
183
+ <div>Item 1</div>
184
+ <div>Item 2</div>
185
+ </div>
186
+ ```
187
+
188
+ ```html
189
+ <!-- ❌ Hacking Shadcn structural components -->
190
+ <TabsList className="h-8 p-0 bg-transparent gap-2">
191
+ <TabsTrigger className="h-7 px-3 text-xs data-[state=active]:bg-warning/20">
192
+
193
+ <!-- ✅ Use standard composition and let the DS handle internals -->
194
+ <TabsList className="grid w-full grid-cols-2">
195
+ <TabsTrigger>
196
+ ```
197
+
198
+ ```html
199
+ <!-- ❌ Inventing complex custom color variants with opacities -->
200
+ <Badge variant="outline" className="bg-warning/5 text-warning-foreground border-warning/30">
201
+
202
+ <!-- ✅ Trust the Design System tokens and default variants -->
203
+ <Badge variant="warning">
204
+ ```
@@ -0,0 +1,71 @@
1
+ # Layout: Dashboard
2
+
3
+ Overview pages with stats, charts, tables, and activity feeds. Use within a sidebar or topbar layout.
4
+
5
+ ## Structure
6
+
7
+ ```tsx
8
+ <div className="space-y-6">
9
+ <!-- Page header -->
10
+ <div className="flex items-center justify-between">
11
+ <div>
12
+ <h1 className="text-2xl font-bold">Dashboard</h1>
13
+ <p className="text-muted-foreground">Overview of your workspace.</p>
14
+ </div>
15
+ <div className="flex items-center gap-2">
16
+ <Button variant="outline" size="sm"><CalendarDays className="w-4 h-4" /> Last 30 Days</Button>
17
+ <Button variant="outline" size="sm"><Download className="w-4 h-4" /> Export</Button>
18
+ </div>
19
+ </div>
20
+
21
+ <!-- Stats grid: 4 columns on desktop -->
22
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
23
+ <!-- 4 stat cards (see patterns/dashboards.md) -->
24
+ </div>
25
+
26
+ <!-- Main content: asymmetric 2/3 + 1/3 split -->
27
+ <div className="grid grid-cols-1 lg:grid-cols-7 gap-6">
28
+ <Card className="lg:col-span-4">
29
+ <CardHeader>
30
+ <CardTitle>Overview</CardTitle>
31
+ <CardDescription>Revenue for the current year.</CardDescription>
32
+ </CardHeader>
33
+ <CardContent>
34
+ <AreaChart
35
+ :data="[{ month: 'Jan', total: 1200 }, { month: 'Feb', total: 2100 }]"
36
+ index="month"
37
+ :categories="['total']"
38
+ className="h-72"
39
+ />
40
+ </CardContent>
41
+ </Card>
42
+ <Card className="lg:col-span-3">
43
+ <CardHeader>
44
+ <CardTitle>Recent Activity</CardTitle>
45
+ </CardHeader>
46
+ <CardContent>
47
+ <!-- Activity feed -->
48
+ </CardContent>
49
+ </Card>
50
+ </div>
51
+
52
+ <!-- Bottom section: full-width table -->
53
+ <Card>
54
+ <CardHeader className="flex flex-row items-center justify-between">
55
+ <CardTitle>Recent Transactions</CardTitle>
56
+ <Button variant="ghost" size="sm">View All <ArrowRight className="w-4 h-4" /></Button>
57
+ </CardHeader>
58
+ <CardContent className="p-0">
59
+ <!-- Table -->
60
+ </CardContent>
61
+ </Card>
62
+ </div>
63
+ ```
64
+
65
+ ## Grid Proportions
66
+
67
+ | Content Pair | Grid Setup |
68
+ |-------------|------------|
69
+ | Chart + sidebar | `lg:grid-cols-7` → `lg:col-span-4` + `lg:col-span-3` |
70
+ | Equal halves | `lg:grid-cols-2` |
71
+ | Main + narrow | `lg:grid-cols-3` → `lg:col-span-2` + `lg:col-span-1` |
@@ -0,0 +1,75 @@
1
+ # Layout: Full-Page Form
2
+
3
+ Centered form card or multi-step wizard. Used for auth pages, onboarding, and standalone form flows.
4
+
5
+ ## Centered Card Form
6
+
7
+ ```tsx
8
+ <div className="flex min-h-screen items-center justify-center px-4 bg-background">
9
+ <Card className="w-full max-w-md">
10
+ <CardHeader>
11
+ <CardTitle>Create Account</CardTitle>
12
+ <CardDescription>Get started with your free account.</CardDescription>
13
+ </CardHeader>
14
+ <CardContent>
15
+ <form className="space-y-4">
16
+ <div className="grid grid-cols-2 gap-4">
17
+ <div className="space-y-2">
18
+ <Label for="firstName">First Name</Label>
19
+ <Input id="firstName" placeholder="Sarah" />
20
+ </div>
21
+ <div className="space-y-2">
22
+ <Label for="lastName">Last Name</Label>
23
+ <Input id="lastName" placeholder="Chen" />
24
+ </div>
25
+ </div>
26
+ <div className="space-y-2">
27
+ <Label for="email">Email</Label>
28
+ <Input id="email" type="email" placeholder="sarah@example.com" />
29
+ </div>
30
+ <div className="space-y-2">
31
+ <Label for="password">Password</Label>
32
+ <Input id="password" type="password" />
33
+ </div>
34
+ </form>
35
+ </CardContent>
36
+ <CardFooter className="flex-col gap-3">
37
+ <Button type="submit" className="w-full">Create Account</Button>
38
+ <p className="text-xs text-center text-muted-foreground">
39
+ Already have an account? <Button variant="link" className="px-1 h-auto text-xs">Sign in</Button>
40
+ </p>
41
+ </CardFooter>
42
+ </Card>
43
+ </div>
44
+ ```
45
+
46
+ ## Split Layout (Form + Hero)
47
+
48
+ For marketing-oriented auth pages:
49
+
50
+ ```tsx
51
+ <div className="flex min-h-screen">
52
+ <!-- Left: brand/hero panel -->
53
+ <div className="hidden lg:flex flex-1 bg-gradient-to-br from-primary/20 via-primary/5 to-transparent items-end p-12">
54
+ <div className="space-y-2">
55
+ <h2 className="text-2xl font-bold">Build something amazing.</h2>
56
+ <p className="text-muted-foreground">Join 10,000+ teams shipping faster with our platform.</p>
57
+ </div>
58
+ </div>
59
+ <!-- Right: form -->
60
+ <div className="flex-1 flex items-center justify-center px-6">
61
+ <Card className="w-full max-w-sm border-0 shadow-none">
62
+ <!-- Form content -->
63
+ </Card>
64
+ </div>
65
+ </div>
66
+ ```
67
+
68
+ ## Key Rules
69
+ - Use `min-h-screen` + `items-center justify-center` for vertical centering
70
+ - Card widths: `max-w-sm` (auth), `max-w-md` (standard form), `max-w-lg` (complex form)
71
+ - Submit button should be `className="w-full"` for full-width emphasis
72
+ - Toggle link (sign in ↔ sign up) below the submit button, `text-xs text-muted-foreground`
73
+ - For 2-column field grids (first + last name), use `grid grid-cols-2 gap-4`
74
+ - For wizards, see `patterns/onboarding.md`
75
+ - Split layout: hero panel on left (`hidden lg:flex`), form on right
@@ -0,0 +1,70 @@
1
+ # Layout: List-Detail
2
+
3
+ Master list on one side, detail view on the other. For email, messaging, or any browse-and-inspect workflow.
4
+
5
+ ## Side-by-Side (Desktop)
6
+
7
+ ```tsx
8
+ <div className="flex h-screen">
9
+ <!-- Sidebar nav (if applicable) -->
10
+
11
+ <!-- List panel -->
12
+ <div className="w-80 border-r flex flex-col shrink-0">
13
+ <div className="h-14 flex items-center justify-between px-4 border-b">
14
+ <h2 className="text-sm font-semibold">Inbox</h2>
15
+ <Button variant="ghost" size="icon" className="h-8 w-8"><Plus className="w-4 h-4" /></Button>
16
+ </div>
17
+ <div className="p-2">
18
+ <div className="relative">
19
+ <Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
20
+ <Input className="pl-9" placeholder="Search..." />
21
+ </div>
22
+ </div>
23
+ <ScrollArea className="flex-1">
24
+ <div className="space-y-0.5 p-2">
25
+ <button v-for="item in items" :key="item.id"
26
+ className={cn(
27
+ 'w-full text-left p-3 rounded-md transition-colors',
28
+ selectedId === item.id ? 'bg-accent' : 'hover:bg-accent/50'
29
+ )}
30
+ onClick="selectedId = item.id">
31
+ <p className="text-sm font-medium truncate">{{ item.title }}</p>
32
+ <p className="text-xs text-muted-foreground truncate">{{ item.preview }}</p>
33
+ <p className="text-xs text-muted-foreground mt-1">{{ item.date }}</p>
34
+ </button>
35
+ </div>
36
+ </ScrollArea>
37
+ </div>
38
+
39
+ <!-- Detail panel -->
40
+ <div className="flex-1 overflow-y-auto">
41
+ <div v-if="selected" className="max-w-3xl mx-auto px-6 py-8">
42
+ <!-- Detail content -->
43
+ </div>
44
+ <div v-else className="flex items-center justify-center h-full text-muted-foreground">
45
+ <p className="text-sm">Select an item to view details</p>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ ```
50
+
51
+ ## Key Details
52
+
53
+ - **List panel width**: `w-80` (320px) or `w-96` (384px)
54
+ - **List items**: Full-width buttons with text-left alignment
55
+ - **Selected state**: `bg-accent` background
56
+ - **Empty detail state**: Centered message when nothing is selected
57
+ - **Scroll**: List and detail scroll independently (`ScrollArea` + `overflow-y-auto`)
58
+
59
+ ## Drill-Down (Alternative)
60
+
61
+ Instead of side-by-side, navigate from list → detail page:
62
+ - List view: Card grid or stacked list (see `patterns/content-display.md`)
63
+ - Detail view: Full-page detail with back button (see `patterns/content-display.md`)
64
+
65
+ ## When to Use
66
+
67
+ | Pattern | Best For |
68
+ |---------|----------|
69
+ | Side-by-side | Email, messaging, task lists (frequent switching) |
70
+ | Drill-down | Products, projects, articles (focused viewing) |
@@ -0,0 +1,70 @@
1
+ # Layout: Marketing / Landing Page
2
+
3
+ Hero sections, feature grids, CTA blocks, and footer for marketing pages.
4
+
5
+ ## Structure
6
+
7
+ ```tsx
8
+ <div className="min-h-screen bg-background">
9
+ <!-- Nav (see layouts/topbar.md) -->
10
+
11
+ <!-- Hero -->
12
+ <section className="max-w-5xl mx-auto px-6 py-24 text-center">
13
+ <Badge variant="secondary" className="mb-4">Now in Beta</Badge>
14
+ <h1 className="text-4xl sm:text-5xl font-bold tracking-tight mb-4">
15
+ Build beautiful interfaces<br />with confidence
16
+ </h1>
17
+ <p className="text-lg text-muted-foreground max-w-2xl mx-auto mb-8">
18
+ A complete design system for Vue 3 that helps you ship polished UIs faster than ever before.
19
+ </p>
20
+ <div className="flex items-center justify-center gap-3">
21
+ <Button size="lg">Get Started</Button>
22
+ <Button variant="outline" size="lg">View Demo</Button>
23
+ </div>
24
+ </section>
25
+
26
+ <!-- Features Grid -->
27
+ <section className="max-w-5xl mx-auto px-6 py-16">
28
+ <div className="text-center mb-12">
29
+ <h2 className="text-2xl font-bold mb-2">Everything you need</h2>
30
+ <p className="text-muted-foreground">Thoughtfully designed components for every use case.</p>
31
+ </div>
32
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
33
+ <Card v-for="feature in features" :key="feature.title">
34
+ <CardHeader>
35
+ <div className="w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center mb-2">
36
+ <component :is="feature.icon" className="w-5 h-5 text-primary" />
37
+ </div>
38
+ <CardTitle className="text-lg">{{ feature.title }}</CardTitle>
39
+ <CardDescription>{{ feature.description }}</CardDescription>
40
+ </CardHeader>
41
+ </Card>
42
+ </div>
43
+ </section>
44
+
45
+ <!-- CTA -->
46
+ <section className="max-w-3xl mx-auto px-6 py-16 text-center">
47
+ <h2 className="text-2xl font-bold mb-2">Ready to get started?</h2>
48
+ <p className="text-muted-foreground mb-6">Start building beautiful UIs today.</p>
49
+ <Button size="lg">Start Free Trial</Button>
50
+ </section>
51
+
52
+ <!-- Footer -->
53
+ <footer className="border-t">
54
+ <div className="max-w-5xl mx-auto px-6 py-8 flex items-center justify-between text-sm text-muted-foreground">
55
+ <p>© 2024 Acme Inc. All rights reserved.</p>
56
+ <div className="flex items-center gap-4">
57
+ <a href="#" className="hover:text-foreground transition-colors">Privacy</a>
58
+ <a href="#" className="hover:text-foreground transition-colors">Terms</a>
59
+ </div>
60
+ </div>
61
+ </footer>
62
+ </div>
63
+ ```
64
+
65
+ ## Key Rules
66
+ - **Narrow max width**: `max-w-5xl` (not 7xl) for marketing — improves readability
67
+ - **Generous vertical padding**: `py-16` to `py-24` between sections
68
+ - **Center-aligned text**: Hero and CTA sections are centered
69
+ - **Feature icons**: Use `bg-primary/10` with `text-primary` icon for the tinted icon box pattern
70
+ - **Button hierarchy**: Primary CTA first, outline secondary CTA second
@@ -0,0 +1,67 @@
1
+ # Layout: Responsive Behavior
2
+
3
+ How layouts adapt across viewport sizes.
4
+
5
+ ## Breakpoints
6
+
7
+ | Name | Min Width | Tailwind Prefix | Typical Behavior |
8
+ |------|-----------|----------------|------------------|
9
+ | Mobile | 0 | (default) | Single column, stacked, full-width |
10
+ | sm | 640px | `sm:` | Two-column grids possible |
11
+ | md | 768px | `md:` | Navigation visible, side panels |
12
+ | lg | 1024px | `lg:` | Full multi-column layouts, sidebars |
13
+ | xl | 1280px | `xl:` | Max-width containers fully visible |
14
+
15
+ ## Common Responsive Patterns
16
+
17
+ ### Grid Columns
18
+ ```html
19
+ className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"
20
+ className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4" <!-- Stat cards -->
21
+ ```
22
+
23
+ ### Sidebar Visibility
24
+ ```html
25
+ <!-- Desktop: sidebar visible. Mobile: hidden (use Sheet for mobile nav) -->
26
+ <aside className="hidden lg:flex w-64 border-r flex-col">
27
+ ```
28
+
29
+ ### Stack to Row
30
+ ```html
31
+ className="flex flex-col sm:flex-row gap-4"
32
+ ```
33
+
34
+ ### Hide/Show Elements
35
+ ```html
36
+ className="hidden sm:block" <!-- Hide on mobile -->
37
+ className="sm:hidden" <!-- Show only on mobile -->
38
+ ```
39
+
40
+ ### Content Width
41
+ ```html
42
+ <!-- Content respects max-width and has appropriate padding -->
43
+ className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
44
+ ```
45
+
46
+ ## Mobile Adaptations
47
+
48
+ 1. **Sidebar → Sheet**: Replace sidebar with a hamburger menu that opens a Sheet
49
+ 2. **Tables → Card lists**: On mobile, consider replacing tables with stacked cards
50
+ 3. **Multi-column grids → Single column**: Everything stacks to `grid-cols-1`
51
+ 4. **Horizontal toolbars → Simplified**: Reduce filter options, hide secondary actions
52
+ 5. **Touch targets**: All interactive elements ≥ 44px (h-11) tall
53
+
54
+ ## Example: Responsive Page Header
55
+
56
+ ```tsx
57
+ <!-- Desktop: title left, actions right. Mobile: stacked -->
58
+ <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
59
+ <div>
60
+ <h1 className="text-2xl font-bold">Projects</h1>
61
+ <p className="text-muted-foreground">Manage your projects.</p>
62
+ </div>
63
+ <div className="flex items-center gap-2">
64
+ <Button className="w-full sm:w-auto"><Plus className="w-4 h-4" /> New Project</Button>
65
+ </div>
66
+ </div>
67
+ ```