@urbicon-ui/design-content 6.1.8

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 (111) hide show
  1. package/README.md +54 -0
  2. package/content/auth/components/account-settings/llm.txt +33 -0
  3. package/content/auth/components/forgot-password-page/llm.txt +25 -0
  4. package/content/auth/components/invitation-manager/llm.txt +28 -0
  5. package/content/auth/components/login-page/llm.txt +34 -0
  6. package/content/auth/components/notification-badge/llm.txt +21 -0
  7. package/content/auth/components/notification-center/llm.txt +33 -0
  8. package/content/auth/components/notification-listener/llm.txt +24 -0
  9. package/content/auth/components/passkey-manager/llm.txt +27 -0
  10. package/content/auth/components/push-permission-prompt/llm.txt +32 -0
  11. package/content/auth/components/register-page/llm.txt +35 -0
  12. package/content/auth/components/reset-password-page/llm.txt +26 -0
  13. package/content/auth/components/session-manager/llm.txt +32 -0
  14. package/content/auth/components/two-factor-manager/llm.txt +40 -0
  15. package/content/auth/components/verify-email-page/llm.txt +25 -0
  16. package/content/blocks/components/area-chart/llm.txt +46 -0
  17. package/content/blocks/components/bar-chart/llm.txt +44 -0
  18. package/content/blocks/components/calendar/llm.txt +105 -0
  19. package/content/blocks/components/chart-frame/llm.txt +38 -0
  20. package/content/blocks/components/command-palette/llm.txt +60 -0
  21. package/content/blocks/components/composition-bar/llm.txt +69 -0
  22. package/content/blocks/components/currency-input/llm.txt +65 -0
  23. package/content/blocks/components/date-picker/llm.txt +90 -0
  24. package/content/blocks/components/donut-chart/llm.txt +45 -0
  25. package/content/blocks/components/empty-state/llm.txt +43 -0
  26. package/content/blocks/components/file-upload/llm.txt +76 -0
  27. package/content/blocks/components/guide/llm.txt +49 -0
  28. package/content/blocks/components/guide-article/llm.txt +30 -0
  29. package/content/blocks/components/guide-beacon/llm.txt +38 -0
  30. package/content/blocks/components/guide-hint/llm.txt +41 -0
  31. package/content/blocks/components/guide-marker/llm.txt +36 -0
  32. package/content/blocks/components/guide-mention/llm.txt +31 -0
  33. package/content/blocks/components/guide-panel/llm.txt +42 -0
  34. package/content/blocks/components/guide-provider/llm.txt +31 -0
  35. package/content/blocks/components/line-chart/llm.txt +45 -0
  36. package/content/blocks/components/locale-switcher/llm.txt +44 -0
  37. package/content/blocks/components/planner/llm.txt +68 -0
  38. package/content/blocks/components/sankey/llm.txt +72 -0
  39. package/content/blocks/components/sidebar-layout/llm.txt +87 -0
  40. package/content/blocks/components/sparkline/llm.txt +33 -0
  41. package/content/blocks/components/theme-switcher/llm.txt +40 -0
  42. package/content/blocks/primitives/accordion/llm.txt +57 -0
  43. package/content/blocks/primitives/alert/llm.txt +54 -0
  44. package/content/blocks/primitives/avatar/llm.txt +61 -0
  45. package/content/blocks/primitives/badge/llm.txt +60 -0
  46. package/content/blocks/primitives/breadcrumb/llm.txt +47 -0
  47. package/content/blocks/primitives/button/llm.txt +80 -0
  48. package/content/blocks/primitives/button-group/llm.txt +65 -0
  49. package/content/blocks/primitives/card/llm.txt +68 -0
  50. package/content/blocks/primitives/checkbox/llm.txt +61 -0
  51. package/content/blocks/primitives/collapsible/llm.txt +66 -0
  52. package/content/blocks/primitives/combobox/llm.txt +86 -0
  53. package/content/blocks/primitives/confirm-dialog/llm.txt +47 -0
  54. package/content/blocks/primitives/dialog/llm.txt +59 -0
  55. package/content/blocks/primitives/drawer/llm.txt +54 -0
  56. package/content/blocks/primitives/form-field/llm.txt +43 -0
  57. package/content/blocks/primitives/input/llm.txt +73 -0
  58. package/content/blocks/primitives/menu/llm.txt +81 -0
  59. package/content/blocks/primitives/pagination/llm.txt +68 -0
  60. package/content/blocks/primitives/popover/llm.txt +72 -0
  61. package/content/blocks/primitives/progress/llm.txt +55 -0
  62. package/content/blocks/primitives/radio-group/llm.txt +53 -0
  63. package/content/blocks/primitives/segment-group/llm.txt +51 -0
  64. package/content/blocks/primitives/select/llm.txt +130 -0
  65. package/content/blocks/primitives/separator/llm.txt +45 -0
  66. package/content/blocks/primitives/sidebar/llm.txt +79 -0
  67. package/content/blocks/primitives/skeleton/llm.txt +54 -0
  68. package/content/blocks/primitives/slider/llm.txt +82 -0
  69. package/content/blocks/primitives/spinner/llm.txt +46 -0
  70. package/content/blocks/primitives/stepper/llm.txt +60 -0
  71. package/content/blocks/primitives/tab/llm.txt +72 -0
  72. package/content/blocks/primitives/textarea/llm.txt +61 -0
  73. package/content/blocks/primitives/toast/llm.txt +45 -0
  74. package/content/blocks/primitives/toggle/llm.txt +62 -0
  75. package/content/blocks/primitives/toolbar/llm.txt +60 -0
  76. package/content/blocks/primitives/tooltip/llm.txt +54 -0
  77. package/content/component-catalog.json +5010 -0
  78. package/content/design-system/patterns/dashboard.md +55 -0
  79. package/content/design-system/patterns/form-page.md +69 -0
  80. package/content/design-system/patterns/onboarding-guide.md +50 -0
  81. package/content/design-system/patterns/planning-board.md +46 -0
  82. package/content/design-system/patterns/settings-page.md +48 -0
  83. package/content/design-system/patterns/tab-navigation.md +136 -0
  84. package/content/design-system/principles.md +260 -0
  85. package/content/docs/components/api-reference/llm.txt +32 -0
  86. package/content/docs/components/code-example/llm.txt +44 -0
  87. package/content/docs/components/code-panel/llm.txt +26 -0
  88. package/content/docs/components/docs-layout/llm.txt +61 -0
  89. package/content/docs/components/info-card/llm.txt +31 -0
  90. package/content/docs/components/playground-configurator/llm.txt +49 -0
  91. package/content/docs/components/section/llm.txt +46 -0
  92. package/content/docs/components/table-of-contents/llm.txt +48 -0
  93. package/content/docs/components/types-reference/llm.txt +38 -0
  94. package/content/guides/llms-full-template.md +1019 -0
  95. package/content/icons.json +4834 -0
  96. package/content/meta.json +5 -0
  97. package/content/table/table/llm.txt +110 -0
  98. package/content/verbs/adopt.md +33 -0
  99. package/content/verbs/audit.md +29 -0
  100. package/content/verbs/compose.md +38 -0
  101. package/content/verbs/critique.md +27 -0
  102. package/content/verbs/fix.md +29 -0
  103. package/content/verbs/migrate.md +30 -0
  104. package/content/verbs/onboard.md +33 -0
  105. package/content/verbs/polish.md +25 -0
  106. package/content/verbs/redesign.md +29 -0
  107. package/content/verbs/retheme.md +29 -0
  108. package/package.json +45 -0
  109. package/src/content-loader.test.ts +78 -0
  110. package/src/content-loader.ts +97 -0
  111. package/src/index.ts +23 -0
@@ -0,0 +1,260 @@
1
+ # Urbicon UI — Design Principles
2
+
3
+ Design heuristics for building UIs with Urbicon UI. These principles guide the LLM in making design decisions — from individual component choices to full-page composition. They complement the token reference (`get_css_reference`) and component catalog (`find_components`).
4
+
5
+ ## Visual Hierarchy
6
+
7
+ - Max 1 primary CTA per viewport. Additional actions use `intent="neutral"` or `variant="ghost"`.
8
+ - Use the typography scale (text size + weight) for information hierarchy, never color alone.
9
+ - Progressive disclosure: show a summary, let the user expand for detail (Accordion, Collapsible, "Show more").
10
+ - 3 hierarchy levels max per view: heading, subheading, content. Deeper nesting signals a need for navigation.
11
+ - Vary visual weight across Cards — not every Card needs `variant="outlined"` and `padding="lg"`. Mix quiet (no border, bg-surface-quiet) with prominent (outlined, elevated).
12
+ - Text hierarchy: primary for key info, secondary for supporting, tertiary for metadata, quaternary for subtle labels. Never skip more than one level.
13
+ - Use `intent` colors only for semantic meaning (success/danger/warning/info), never for decoration.
14
+
15
+ ## Interaction
16
+
17
+ - Destructive actions always require explicit confirmation via `ConfirmDialog`.
18
+ - Form validation: inline at the field via `FormField` error state, not a global error banner after submit.
19
+ - Loading states belong on the triggering element (`Button` spinner), not a global page spinner.
20
+ - Hover states: use `bg-surface-hover` for interactive surfaces, never raw opacity changes.
21
+ - Focus: always `focus-visible:`, never `focus:` — keyboard-only focus rings.
22
+ - Disabled elements: `bg-surface-disabled` + `text-text-disabled`, with `cursor-not-allowed`. Never hide disabled options — show them so users understand they exist.
23
+ - Optimistic UI where safe (toggles, selections). Confirmation-dependent actions (delete, send) wait for server.
24
+ - Toasts for non-blocking feedback (saved, copied). Alerts for persistent status (offline, quota reached).
25
+
26
+ ## Component Selection
27
+
28
+ These heuristics map common UI needs to the right Urbicon UI component:
29
+
30
+ | Need | Component | Why |
31
+ |---|---|---|
32
+ | 2-3 mutually exclusive options | `RadioGroup` | Visible at a glance |
33
+ | 4-6 mutually exclusive options | `Select` | Compact, scrollable |
34
+ | 7+ options or needs search | `Combobox` | Searchable, filterable |
35
+ | Boolean on/off setting | `Toggle` | Immediate visual feedback |
36
+ | Boolean agreement/consent | `Checkbox` | Conveys "I confirm" semantics |
37
+ | Single action | `Button` | Clear affordance |
38
+ | Multiple related actions | `ButtonGroup` | Visual grouping |
39
+ | Contextual actions (right-click, "more") | `Menu` | Discoverable on demand |
40
+ | Date selection | `DatePicker` | Constrained input with calendar |
41
+ | Free text | `Input` or `Textarea` | Single-line vs. multi-line |
42
+ | Currency amount | `CurrencyInput` | Locale-aware formatting |
43
+ | Navigation between peer sections | `Tab` | Horizontal, same hierarchy |
44
+ | Navigation between hierarchical sections | `Sidebar` | Vertical, nested groups |
45
+ | Quick access to any page/action | `CommandPalette` | Keyboard-first, searchable |
46
+ | Status indicator | `Badge` | Compact, intent-colored |
47
+ | Step-by-step flow | `Stepper` | Shows progress + completion |
48
+ | Blocking user decision | `Dialog` | Modal, focused |
49
+ | Supplementary content panel | `Drawer` | Slide-in, non-blocking |
50
+ | Contextual info on hover/focus | `Tooltip` | Ephemeral, no interaction |
51
+ | Contextual content on click | `Popover` | Persistent, interactive |
52
+ | Empty data state | `EmptyState` | Friendly, actionable |
53
+ | Tabular data | `Table` | Sorting, filtering, selection |
54
+ | Proportional breakdown | `CompositionBar` | Visual percentages |
55
+ | Flow/relationship visualization | `Sankey` | Multi-level flows |
56
+ | File selection | `FileUpload` | Drag-and-drop + browse |
57
+
58
+ ## Layout
59
+
60
+ - Content max-width: 720px for readability. Wider only for data-dense views (tables, dashboards).
61
+ - Use `Sidebar` for settings/admin navigation. Use `Tab` for peer sections within a page.
62
+ - Group related content in `Card`s. Cards represent conceptual units, not individual items.
63
+ - Sticky action bars (`Save`/`Cancel`) when forms exceed the viewport.
64
+ - Empty states: always provide an action. "No results" alone is a dead end.
65
+ - Page spacing rhythm: `gap-8` or `gap-10` between sections, `gap-4` or `gap-6` within sections.
66
+ - Separator for visual breaks within a surface, not between Cards (Cards have their own boundaries).
67
+ - Use `SidebarLayout` for app shells with persistent navigation. Use standalone `Sidebar` for in-page nav.
68
+
69
+ ## Accessibility
70
+
71
+ - Every icon-only `Button` needs `aria-label`.
72
+ - Form fields must be wrapped in `FormField` for automatic label + error + description association.
73
+ - Keyboard navigation: all interactive elements reachable via Tab. Custom widgets implement arrow-key navigation (Menu, Select, Combobox, Table).
74
+ - Color contrast: semantic tokens are pre-tuned for WCAG AA (4.5:1 for text, 3:1 for UI elements). Do not override with lower-contrast alternatives.
75
+ - Motion: all animations respect `prefers-reduced-motion`. Interaction tokens collapse durations to 1ms automatically.
76
+ - Skip links: include for long navigation sections.
77
+ - Announce dynamic content (toast messages, live table updates) via aria-live regions.
78
+
79
+ ## Theming
80
+
81
+ ### The 5-Layer Token Hierarchy
82
+
83
+ Understanding which layer to modify is the key to efficient design changes:
84
+
85
+ | Layer | What it controls | Format | How changes propagate |
86
+ |---|---|---|---|
87
+ | 1. Foundation | Raw OKLCH color palettes, radius scale, z-index | CSS `@theme` | Automatically to all layers above |
88
+ | 2. Semantic | Surface, text, border, intent, shadow tokens | CSS `@theme` with `light-dark()` | Automatically to components |
89
+ | 3. Component | Variant defaults, slot classes, presets | `tv()` + `BlocksProvider` | Automatically to instances |
90
+ | 4. Composition | Page layout, component arrangement, spacing | Markdown patterns (this system) | Via LLM knowledge |
91
+ | 5. Principles | Design heuristics, selection rules | Markdown (this file) | Via LLM knowledge |
92
+
93
+ **Layers 1-3 propagate through code.** Change a foundation token and every semantic token, component, and instance that references it adapts automatically. **Layers 4-5 propagate through knowledge.** Change a principle or pattern and the LLM applies it the next time it generates UI.
94
+
95
+ ### Design Change Decision Tree
96
+
97
+ When asked to modify the design, identify the correct layer:
98
+
99
+ **"Change the color / mood / brand"** → Layer 1 (Foundation)
100
+ - Create a custom theme CSS file overriding `--color-primary-*` and `--color-secondary-*`
101
+ - Use OKLCH: adjust hue (H) for color direction, chroma (C) for vibrancy, lightness (L) curve for contrast
102
+ - Everything else adapts automatically — semantic tokens, components, dark mode
103
+ - Optional: override `--blocks-shadow-tint` for cohesive shadows (warm brand → warm shadows)
104
+
105
+ **"Adjust dark mode appearance"** → Layer 2 (Semantic)
106
+ - Modify the `light-dark()` values in semantic tokens
107
+ - Never use Tailwind `dark:` overrides — they bypass the token system
108
+ - The 4-level surface ladder (quiet → base → elevated → overlay) and text hierarchy auto-resolve
109
+
110
+ **"Make buttons / cards / inputs look different"** → Layer 3 (Component)
111
+ - Use `BlocksProvider` `defaults` for global component overrides
112
+ - Use `presets` for named looks (e.g., `preset="compact"`)
113
+ - Use `slotClasses` on individual instances for one-off overrides
114
+ - Use `unstyled` to strip all defaults and bring your own styling
115
+
116
+ **"Change page layout / navigation structure"** → Layer 4 (Composition)
117
+ - Update the composition pattern file (see `get_pattern()`)
118
+ - LLM applies the updated pattern when generating new pages
119
+ - Existing pages need manual migration
120
+
121
+ **"Change design rules / component selection heuristics"** → Layer 5 (Principles)
122
+ - Update this file
123
+ - LLM applies updated rules going forward
124
+
125
+ ### Creating a Custom Theme
126
+
127
+ A theme file overrides three foundation ramps: the two accents (`--color-primary-*`, `--color-secondary-*`) **and the neutral chassis** (`--color-neutral-*`). All semantic tokens — surfaces, text, borders, intents — inherit automatically. The chassis is the most-missed piece: surfaces/text/borders derive from `--color-neutral-*`, which defaults to a cool Hue 240. Re-tint it to your accent's temperature, or a warm brand color lands on cold grey surfaces (the classic "half-themed" look).
128
+
129
+ ```css
130
+ /* app-theme.css — import AFTER base styles */
131
+ @theme {
132
+ /* Primary palette — shift hue, adjust chroma for vibrancy */
133
+ --color-primary-50: oklch(0.97 0.01 YOUR_HUE);
134
+ --color-primary-100: oklch(0.93 0.03 YOUR_HUE);
135
+ --color-primary-200: oklch(0.85 0.06 YOUR_HUE);
136
+ --color-primary-300: oklch(0.76 0.09 YOUR_HUE);
137
+ --color-primary-400: oklch(0.66 0.12 YOUR_HUE);
138
+ --color-primary-500: oklch(0.55 0.14 YOUR_HUE);
139
+ --color-primary-600: oklch(0.48 0.14 YOUR_HUE);
140
+ --color-primary-700: oklch(0.40 0.12 YOUR_HUE);
141
+ --color-primary-800: oklch(0.32 0.10 YOUR_HUE);
142
+ --color-primary-900: oklch(0.24 0.07 YOUR_HUE);
143
+ --color-primary-950: oklch(0.16 0.04 YOUR_HUE);
144
+
145
+ /* Secondary — complementary or analogous hue */
146
+ --color-secondary-50: oklch(0.97 0.01 SEC_HUE);
147
+ /* ... same 50-950 scale ... */
148
+
149
+ /* Chassis — re-tint the neutral ramp to CHASSIS_HUE (≈ YOUR_HUE).
150
+ Keep lightness + chroma at the foundation values; only shift the hue,
151
+ so WCAG contrast is preserved. Set chroma to 0 for a true grayscale. */
152
+ --color-neutral-25: oklch(0.99 0.002 CHASSIS_HUE);
153
+ --color-neutral-50: oklch(0.98 0.005 CHASSIS_HUE);
154
+ /* ... 100-850 ... */
155
+ --color-neutral-900: oklch(0.15 0.012 CHASSIS_HUE);
156
+ --color-neutral-950: oklch(0.08 0.008 CHASSIS_HUE);
157
+ }
158
+ ```
159
+
160
+ **OKLCH parameter guide:**
161
+ - **Hue (H):** 0-360 color wheel. 0=red, 30=orange, 60=yellow, 140=green, 220=blue, 280=purple, 340=pink
162
+ - **Chroma (C):** 0=gray, 0.05=muted, 0.10=moderate, 0.15=vibrant, 0.20+=vivid. Stay under 0.18 for foundation accent scales; keep the neutral chassis ≤0.017 so it stays near-grey.
163
+ - **Lightness (L):** 0=black, 1=white. The 50-950 scale should span L=0.97 (lightest) to L=0.16 (darkest). 500/600 are the "base" shades used in semantic intent tokens.
164
+
165
+ > If you scope a theme to a class (e.g. a runtime-toggled `.theme-x`) instead of a global `@theme`/`:root` block, you must also re-declare the derived semantic tokens (`--color-primary`, surface/text/border) inside that class — inline/scoped `var()` won't re-substitute against the overridden ramp on its own. Global `@theme` themes don't hit this. See `apps/docs/src/lib/style/editorial.css` for a fully worked scoped example.
166
+
167
+ ### Built-in Themes
168
+
169
+ Five pre-built themes are available, each shifting primary + secondary hues, re-tinting the neutral chassis to match the accent's temperature, re-tuning any intent ramp that would collide with the accent (plus a matching shadow tint), **and** re-tinting the neutral intent (`bg-neutral` / `text-neutral` / borders) via `--neutral-chrome-hue`. Non-colliding intents (success/warning/danger/info) stay at the library defaults; the Neutral theme inherits the cool default chrome.
170
+
171
+ The neutral intent keeps the `--color-warm-neutral-*` ramp's lightness profile (tuned so white-on-fill and neutral-text both stay legible light/dark) and only takes its hue from `--neutral-chrome-hue` (`:root`, default 240). Set it per theme — `:root { --neutral-chrome-hue: 50; }` — to re-tint neutral controls without touching contrast. Don't repoint the neutral intent onto the chassis `--color-neutral-*` ramp; its surface lightness breaks the dual-role (fill vs. text) contrast balance.
172
+
173
+ | Theme | Primary Hue | Secondary Hue | Chassis Hue | Re-tuned intents | Character |
174
+ |---|---|---|---|---|---|
175
+ | Default | 240 (indigo) | 280 (purple) | 240 (cool) | — | Professional, balanced |
176
+ | Ocean | 220 (blue) | 190 (teal) | 220 (cool) | info → 255 (off brand blue) | Cool, trustworthy |
177
+ | Forest | 155 (green) | 90 (lime) | 150 (stone) | success → 172, warning → 60 | Natural, calm |
178
+ | Sunset | 55 (amber) | 25 (orange) | 50 (warm) | warning → 92, danger → 16 | Warm, energetic |
179
+ | Rose | 350 (pink) | 310 (magenta) | 350 (warm) | danger → 34 | Soft, approachable |
180
+ | Neutral | 240/minimal chroma | 240/minimal chroma | grayscale (chroma 0) | — | Content-focused, no brand color |
181
+
182
+ ### Semantic Radius Tiers
183
+
184
+ Three radius tiers map to component families — override these, not individual component radii:
185
+
186
+ | Tier | Token | Default | Components | Brand tuning |
187
+ |---|---|---|---|---|
188
+ | Commit | `--radius-commit` | `9999px` (pill) | Button, Badge, Toggle, SegmentGroup | Lower for less playful (e.g., `--radius-xl`) |
189
+ | Modify | `--radius-modify` | `var(--radius-sm)` (4px) | Input, Textarea, Select, Combobox, Tab | Raise for softer (e.g., `--radius-md`) |
190
+ | Contain | `--radius-contain` | `var(--radius-xs)` (2px) | Card, Dialog, Drawer, Alert, Tooltip | Raise for friendlier (e.g., `--radius-md`) |
191
+
192
+ ### Interaction Tuning
193
+
194
+ Override timing and easing tokens for different personalities:
195
+
196
+ | Token | Default | Subdued | Energetic |
197
+ |---|---|---|---|
198
+ | `--blocks-duration-fast` | 150ms | 200ms | 100ms |
199
+ | `--blocks-duration-normal` | 250ms | 300ms | 180ms |
200
+ | `--blocks-ease-gentle` | ease-out variant | keep | swap for springy |
201
+ | `--blocks-mint-scale-intensity` | 1.04 | 1.02 or remove | 1.06 |
202
+
203
+ ### Mint (Micro-Interactions)
204
+
205
+ Mint classes add playful polish: `blocks-mint-scale` (hover grow), `blocks-mint-glow` (color halo), `blocks-mint-bounce`, `blocks-mint-pulse`. Use sparingly — 1-2 mint effects per view. Glow color auto-adapts to intent (`blocks-intent-success` → green glow).
206
+
207
+ ## Design Paradigms
208
+
209
+ When asked for a wholesale aesthetic shift, map the paradigm to specific changes across all layers:
210
+
211
+ ### Minimal (Default)
212
+ The Urbicon UI baseline. Clean, functional, professional.
213
+ - **Foundation:** moderate chroma (0.12-0.15), hue 240, default radius tiers
214
+ - **Semantic:** neutral surfaces, subtle borders, standard shadows
215
+ - **Interaction:** gentle easing, subtle mint (scale 1.04), standard durations
216
+ - **Composition:** generous whitespace, content-focused, 720px max-width
217
+
218
+ ### Brutalist
219
+ Raw, honest, structural. High contrast, visible grid.
220
+ - **Foundation:** all radii to 0 (`--radius-commit: 0; --radius-modify: 0; --radius-contain: 0`), no shadows
221
+ - **Semantic:** max border contrast (`border-emphasis` everywhere), monochrome surfaces
222
+ - **Interaction:** `--blocks-duration-fast: 0ms` (instant), no mint effects, no easing
223
+ - **Composition:** grid-heavy, high density, visible structural borders, monospace accents
224
+
225
+ ### Organic / Warm
226
+ Friendly, natural, approachable. Warm palette, soft shapes.
227
+ - **Foundation:** warm hue (H: 30-60), high chroma, generous radii (`--radius-contain: var(--radius-md)`), warm shadow tint (`--blocks-shadow-tint: 30 0.01 50`)
228
+ - **Semantic:** warm neutrals for surfaces, soft borders (`border-subtle`), deeper shadows
229
+ - **Interaction:** springy easing, scale + glow mint, slightly longer durations
230
+ - **Composition:** flowing layouts, generous spacing (`gap-10`+), rounded Cards
231
+
232
+ ### Corporate / Enterprise
233
+ Professional, data-dense, efficient. Neutral palette, compact layout.
234
+ - **Foundation:** neutral theme (minimal chroma), tight radii, subtle shadows
235
+ - **Semantic:** high text contrast for data readability, strong borders for tables
236
+ - **Interaction:** confident easing (fast, no overshoot), minimal or no mint
237
+ - **Composition:** dense layouts, prominent Tables, sidebar navigation, compact Cards
238
+
239
+ ### Playful / Friendly
240
+ Fun, engaging, vibrant. Bold colors, bouncy motion.
241
+ - **Foundation:** vivid hue with high chroma (0.16+), commit radii for everything (`--radius-modify: 9999px; --radius-contain: var(--radius-xl)`)
242
+ - **Semantic:** colorful intent-subtle backgrounds, softer borders
243
+ - **Interaction:** bouncy easing, all mint effects, generous durations (300ms+)
244
+ - **Composition:** visual variety, Cards with color accents, generous spacing, illustrations over icons
245
+
246
+ ### Glassmorphism
247
+ Translucent, layered, modern. Blurred backgrounds, glass surfaces.
248
+ - **Foundation:** moderate radii (`--radius-contain: var(--radius-lg)`), prominent shadows
249
+ - **Semantic:** surface tokens use `oklch(... / 0.7)` transparency, heavy backdrop blur (`--blocks-overlay-backdrop-blur: 12px`)
250
+ - **Interaction:** smooth easing, glow mint, standard durations
251
+ - **Composition:** layered Cards, depth via shadow + transparency, minimal borders (use shadow for separation)
252
+
253
+ ## Anti-Patterns
254
+
255
+ - Never use raw Tailwind color classes (`bg-blue-500`). Always use semantic tokens (`bg-primary`, `bg-surface-base`).
256
+ - Never add `dark:` overrides. Dark mode resolves automatically via `light-dark()`.
257
+ - Never override individual component CSS. Use `slotClasses`, `presets`, or `BlocksProvider` `defaults`.
258
+ - Never hardcode z-index values. Use token variables (`z-[var(--z-modal)]`).
259
+ - Never set `border-radius` on individual components. Override the semantic radius tier token.
260
+ - Never mix paradigms within a single app. Pick one and apply it consistently across all layers.
@@ -0,0 +1,32 @@
1
+
2
+ ---
3
+
4
+ ## ApiReference
5
+ Structured API reference table for component documentation.
6
+ Renders props via `@urbicon-ui/table` with per-column cell snippets
7
+ and `Badge` indicators for source/required status.
8
+
9
+ **Import:** `import { ApiReference } from '@urbicon-ui/docs';`
10
+
11
+ ### Examples
12
+ ```svelte
13
+ <ApiReference props={componentData.props} />
14
+ ```
15
+
16
+ ### Api
17
+ | Prop | Type | Required | Default | Description |
18
+ | --- | --- | :---: | --- | --- |
19
+ | props | `ApiProp[]` | yes | | Array of prop definitions to display. |
20
+ | ...ApiReferenceVariantProps | `VariantProps` | no | | Styling variants from ApiReferenceVariantProps |
21
+ | ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
22
+ | class | `string` | no | | Extra classes merged onto the root element. |
23
+ | slotClasses | `Partial<Record<'base' | 'stats' | 'usageNotes', string>>` | no | | Per-slot class overrides for the wrapper elements. |
24
+ | unstyled | `boolean` | no | | Remove all default tv styles from the wrapper and cell content. |
25
+ | usageNotes | `Snippet` | no | | Optional usage notes rendered below the table. |
26
+
27
+ Inherited from:
28
+ - ApiReferenceVariantProps (external)
29
+ - Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
30
+
31
+ ### Slots (slotClasses keys)
32
+ `base`, `stats`, `usageNotes`
@@ -0,0 +1,44 @@
1
+
2
+ ---
3
+
4
+ ## CodeExample
5
+ Code example with optional live preview, syntax highlighting, and copy-to-clipboard.
6
+ Delegates code display to the shared CodePanel primitive.
7
+
8
+ **Import:** `import { CodeExample } from '@urbicon-ui/docs';`
9
+
10
+ ### Examples
11
+ ```svelte
12
+ <CodeExample title="Basic Usage" code={`<Button>Click me</Button>`} language="svelte">
13
+ <Button>Click me</Button>
14
+ </CodeExample>
15
+ ```
16
+
17
+ ### Variants
18
+ - size: lg, md, sm (default: md)
19
+ - hasPreview: false, true (default: true)
20
+
21
+ ### Api
22
+ | Prop | Type | Required | Default | Description |
23
+ | --- | --- | :---: | --- | --- |
24
+ | ...CodeExampleVariantProps | `VariantProps` | no | | Styling variants from CodeExampleVariantProps |
25
+ | children | `Snippet` | no | | Live preview content rendered above the code block. |
26
+ | class | `string` | no | | Extra classes merged onto the root container element. |
27
+ | code | `string` | no | | Source code string to display with syntax highlighting. |
28
+ | defaultExpanded | `boolean` | no | | Override the default expanded state from the global code-visibility context. |
29
+ | description | `string` | no | | Short description shown between title and preview. |
30
+ | isolate | `boolean` | no | | Opt-in for the Vite plugin: children are auto-extracted as `code` at build time. |
31
+ | language | `string` | no | | Language for syntax highlighting (e.g. 'svelte', 'typescript', 'css'). |
32
+ | preview | `boolean` | no | true | Render the live preview section above the code block. |
33
+ | previewClass | `string` | no | | CSS classes for the preview wrapper div when `isolate` is set. |
34
+ | slotClasses | `Partial<Record<'container' | 'title' | 'description' | 'preview' | 'previewContent' | 'toolbar' | 'codeSection' | 'codeToggle' | 'codeChevron' | 'languageTag' | 'copyButton' | 'codeCollapse', string>>` | no | | Per-slot class overrides for internal elements. |
35
+ | title | `string` | no | | Title displayed in the card header. |
36
+ | unstyled | `boolean` | no | | Remove all default tv styles from internal slots. |
37
+ | size | `'lg' | 'md' | 'sm'` | no | md | Controls the dimensions, padding, and text size of the CodeExample. Affects the component's physical footprint. Available options: lg, md, sm. |
38
+ | hasPreview | `'false' | 'true'` | no | true | Controls the hasPreview behavior and appearance of the CodeExample component. Available options: false, true. |
39
+
40
+ Inherited from:
41
+ - CodeExampleVariantProps (external)
42
+
43
+ ### Slots (slotClasses keys)
44
+ `container`, `title`, `description`, `preview`, `previewContent`, `toolbar`, `codeSection`, `codeToggle`, `codeChevron`, `languageTag`, `copyButton`, `codeCollapse`
@@ -0,0 +1,26 @@
1
+
2
+ ---
3
+
4
+ ## CodePanel
5
+ Shared code display primitive with Shiki syntax highlighting, collapsible panel, and copy-to-clipboard.
6
+
7
+ **Import:** `import { CodePanel } from '@urbicon-ui/docs';`
8
+
9
+ ### Variants
10
+ - size: lg, md, sm (default: md)
11
+
12
+ ### Api
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | :---: | --- | --- |
15
+ | code | `string` | yes | | Source code string to display with syntax highlighting. |
16
+ | ...CodePanelVariantProps | `VariantProps` | no | | Styling variants from CodePanelVariantProps |
17
+ | class | `string` | no | | Extra classes merged onto the root element. |
18
+ | expanded | `boolean` | no | | Controlled expanded state. When omitted, the panel manages its own state. |
19
+ | language | `string` | no | 'svelte' | Language for syntax highlighting and the toolbar language tag. |
20
+ | onToggle | `() => void` | no | | Called when the toggle button is clicked. Required when `expanded` is controlled. |
21
+ | slotClasses | `Partial<Record<CodePanelSlotName, string>>` | no | | Per-slot class overrides for internal elements. |
22
+ | unstyled | `boolean` | no | | Remove all default tv styles from internal slots. |
23
+ | size | `'lg' | 'md' | 'sm'` | no | md | Controls the dimensions, padding, and text size of the CodePanel. Affects the component's physical footprint. Available options: lg, md, sm. |
24
+
25
+ Inherited from:
26
+ - CodePanelVariantProps (external)
@@ -0,0 +1,61 @@
1
+
2
+ ---
3
+
4
+ ## DocsLayout
5
+ Standard documentation page layout with optional table of contents.
6
+ Provides a responsive two-column layout with a mobile ToC fallback.
7
+
8
+ When `breadcrumbs` is provided, the layout uses a collapsing-hero pattern:
9
+ a unified sticky bar shows breadcrumbs + code toggle initially, then
10
+ transitions to a compact bar with title + scrollspy when the header
11
+ scrolls out of view.
12
+
13
+ **Import:** `import { DocsLayout } from '@urbicon-ui/docs';`
14
+
15
+ ### Examples
16
+ ```svelte
17
+ <DocsLayout
18
+ title="Badge"
19
+ description="Status and labels"
20
+ breadcrumbs={[
21
+ { label: 'Blocks', href: '/blocks' },
22
+ { label: 'Primitives', href: '/blocks/primitives' }
23
+ ]}
24
+ showToc
25
+ navigation={nav}
26
+ >
27
+ <Section id="examples">...</Section>
28
+ </DocsLayout>
29
+ ```
30
+
31
+ ### Variants
32
+ - centered: true (default: false)
33
+ - maxWidth: 2xl, 7xl, lg, md, sm, xl (default: lg)
34
+ - sidebar: true (default: false)
35
+
36
+ ### Api
37
+ | Prop | Type | Required | Default | Description |
38
+ | --- | --- | :---: | --- | --- |
39
+ | ...DocsLayoutVariantProps | `VariantProps` | no | | Styling variants from DocsLayoutVariantProps |
40
+ | breadcrumbs | `BreadcrumbItem[]` | no | | Structured breadcrumb trail (ancestors only, title is appended automatically). Enables the collapsing-hero sticky bar layout. |
41
+ | children | `Snippet` | no | | Content to render inside the DocsLayout component |
42
+ | class | `string` | no | | Extra classes merged onto the root container. |
43
+ | description | `string` | no | | Short description rendered below the title. |
44
+ | navigation | `Array<{ id: string; title: string; order?: number }>` | no | | Navigation items for the table of contents. |
45
+ | related | `RelatedLink[]` | no | | Optional related-links list — passed through to the TableOfContents as a `// RELATED` block below the page sections. Each entry needs a pre-resolved `href`; the layout does not call `resolve()` on it. |
46
+ | showCodeToggle | `boolean` | no | | Show the global code-visibility toggle for collapsing all code examples. Default: true. |
47
+ | showToc | `boolean` | no | | Show a sticky table of contents sidebar on desktop and a collapsible one on mobile. |
48
+ | slotClasses | `Partial<Record<'container' | 'wrapper' | 'main' | 'header' | 'title' | 'subtitle' | 'content' | 'stickyBar' | 'pageToolbar', string>>` | no | | Per-slot class overrides. |
49
+ | sourceHref | `string` | no | | GitHub blob URL for the component's source file — rendered as a `source ↗` link next to the stability badge when present. |
50
+ | stability | `'experimental' | 'beta' | 'stable' | 'deprecated'` | no | | Editorial stability badge — drives the `[STABLE]` / `[BETA]` / etc. stamp above the page title. When omitted, no badge renders; the default is applied upstream in docs-gen, so component pages receive `'stable'` automatically via `componentData?.stability`. |
51
+ | title | `string` | no | | Page title rendered as an h1 in the header area. |
52
+ | unstyled | `boolean` | no | | Remove all default tv styles. |
53
+ | centered | `'true'` | no | false | Controls the centered behavior and appearance of the DocsLayout component. Available options: true. |
54
+ | maxWidth | `'2xl' | '7xl' | 'lg' | 'md' | 'sm' | 'xl'` | no | lg | Controls the maxWidth behavior and appearance of the DocsLayout component. Available options: 2xl, 7xl, lg, and 3 more. |
55
+ | sidebar | `'true'` | no | false | Controls the sidebar behavior and appearance of the DocsLayout component. Available options: true. |
56
+
57
+ Inherited from:
58
+ - DocsLayoutVariantProps (external)
59
+
60
+ ### Slots (slotClasses keys)
61
+ `container`, `wrapper`, `main`, `header`, `title`, `subtitle`, `content`, `stickyBar`, `pageToolbar`
@@ -0,0 +1,31 @@
1
+
2
+ ---
3
+
4
+ ## InfoCard
5
+ Simple memo-style card for inline callouts or notes within docs content.
6
+
7
+ **Import:** `import { InfoCard } from '@urbicon-ui/docs';`
8
+
9
+ ### Examples
10
+ ```svelte
11
+ <InfoCard title="Tip" icon="lightbulb">Use variants to change tone.</InfoCard>
12
+ ```
13
+
14
+ ### Variants
15
+ - intent: api, danger, example, info, neutral, playground, primary, secondary, success, warning (default: info)
16
+ - size: lg, md, sm (default: md)
17
+
18
+ ### Api
19
+ | Prop | Type | Required | Default | Description |
20
+ | --- | --- | :---: | --- | --- |
21
+ | ...InfoCardVariantProps | `VariantProps` | no | | Styling variants from InfoCardVariantProps |
22
+ | children | `Snippet` | no | | Content to render inside the InfoCard component |
23
+ | class | `string` | no | | Additional CSS classes to apply to the InfoCard component |
24
+ | href | `string` | no | | Render the card as a link to this URL. Falls back to a plain `<div>` when omitted. |
25
+ | icon | `string` | no | | Icon property for the InfoCard component |
26
+ | title | `string` | no | | Title property for the InfoCard component |
27
+ | intent | `'api' | 'danger' | 'example' | 'info' | 'neutral' | 'playground' | 'primary' | 'secondary' | 'success' | 'warning'` | no | info | Controls the color theme and semantic meaning of the InfoCard. Affects the overall appearance and user perception. Available options: api, danger, example, and 7 more. |
28
+ | size | `'lg' | 'md' | 'sm'` | no | md | Controls the dimensions, padding, and text size of the InfoCard. Affects the component's physical footprint. Available options: lg, md, sm. |
29
+
30
+ Inherited from:
31
+ - InfoCardVariantProps (external)
@@ -0,0 +1,49 @@
1
+
2
+ ---
3
+
4
+ ## PlaygroundConfigurator
5
+ Interactive playground configurator for component documentation.
6
+ Renders a live preview, control panel for props, and generated code block.
7
+
8
+ **Import:** `import { PlaygroundConfigurator } from '@urbicon-ui/docs';`
9
+
10
+ ### Examples
11
+ ```svelte
12
+ <PlaygroundConfigurator
13
+ componentName="Button"
14
+ controls={controls}
15
+ values={values}
16
+ >
17
+ {#snippet children(vals)}
18
+ <Button {...vals}>Click me</Button>
19
+ {/snippet}
20
+ </PlaygroundConfigurator>
21
+ ```
22
+
23
+ ### Api
24
+ | Prop | Type | Required | Default | Description |
25
+ | --- | --- | :---: | --- | --- |
26
+ | children | `Snippet<[Record<string, any>]>` | yes | | Render snippet receiving the current values map. The argument is typed loosely (`Record<string, any>`) so consumers can spread it onto child components without type-asserting each variant key — the trade-off is that direct property access inside the snippet is also `any`. Use the `values` prop type for typed access. The `any` here is a pragmatic exception to the project-wide ban: it enables docs-page playgrounds (`<Component {...values} />`) to compile without forcing every consumer to mirror the full prop union locally. |
27
+ | controls | `ControlDefinition[]` | yes | | Control definitions that drive the props panel (dropdown, toggle, text, etc.). |
28
+ | values | `TValues` | yes | | Current control values. Supports `bind:values` for two-way binding. |
29
+ | ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
30
+ | ...PlaygroundConfiguratorVariantProps | `VariantProps` | no | | Styling variants from PlaygroundConfiguratorVariantProps |
31
+ | class | `string` | no | | Extra CSS classes merged onto the root element. |
32
+ | codeGenerator | `(values: TValues) => string` | no | | Custom code generator. Falls back to auto-generated Svelte tag syntax. |
33
+ | componentName | `string` | no | | Component name used in the auto-generated code output. |
34
+ | onValuesChange | `(values: TValues) => void` | no | | Fires after any control value changes with the full values map. |
35
+ | propDocs | `Record<string, string>` | no | | Hand-written prop descriptions (from JSDoc). Shown as tooltip behind an info icon. |
36
+ | showHeader | `boolean` | no | | Show the title/subtitle header above the playground. |
37
+ | size | `'sm' | 'md' | 'lg'` | no | | Controls the density of the playground layout – padding, grid columns, and text size. |
38
+ | slotClasses | `Partial<Record<'root' | 'header' | 'title' | 'subtitle' | 'container' | 'preview' | 'previewContent' | 'controlsPanel' | 'controlsHeader' | 'controlsGrid' | 'controlItem' | 'controlLabel' | 'controlControl' | 'controlControlCompact' | 'controlHint' | 'actionsBar' | 'helpToggle' | 'codePanel' | 'codeToolbar' | 'codeDisplay', string>>` | no | | Per-slot class overrides for internal elements. |
39
+ | subtitle | `string` | no | | Descriptive text below the title. |
40
+ | title | `string` | no | | Heading text above the playground panel. |
41
+ | unstyled | `boolean` | no | | Strip all default tv() styles from internal slots. |
42
+ | variantKeys | `string[]` | no | | Prop names originating from tailwind-variants. Shown with a "V" indicator. |
43
+
44
+ Inherited from:
45
+ - Omit<PlaygroundConfiguratorVariantProps, 'size'> (omit-pattern)
46
+ - Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
47
+
48
+ ### Slots (slotClasses keys)
49
+ `root`, `header`, `title`, `subtitle`, `container`, `preview`, `previewContent`, `controlsPanel`, `controlsHeader`, `controlsGrid`, `controlItem`, `controlLabel`, `controlControl`, `controlControlCompact`, `controlHint`, `actionsBar`, `helpToggle`, `codePanel`, `codeToolbar`, `codeDisplay`
@@ -0,0 +1,46 @@
1
+
2
+ ---
3
+
4
+ ## Section
5
+ Content section with title/subtitle, badges, and semantic footer.
6
+
7
+ **Import:** `import { Section } from '@urbicon-ui/docs';`
8
+
9
+ ### Examples
10
+ ```svelte
11
+ <Section id="usage" title="Usage" subtitle="Quick start">
12
+ <p>Install and import the component.</p>
13
+ </Section>
14
+ ```
15
+
16
+ ### Variants
17
+ - intent: default, hero, primary, secondary (default: default)
18
+ - size: lg, md, sm, xl (default: lg)
19
+ - centered: false, true (default: false)
20
+
21
+ ### Api
22
+ | Prop | Type | Required | Default | Description |
23
+ | --- | --- | :---: | --- | --- |
24
+ | id | `string` | yes | | Section ID for navigation anchors |
25
+ | ...SectionVariantProps | `VariantProps` | no | | Styling variants from SectionVariantProps |
26
+ | badges | `Array<{
27
+ text: string;
28
+ variant?: 'soft' | 'filled';
29
+ intent?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
30
+ }>` | no | | Badges property for the Section component |
31
+ | children | `Snippet` | no | | Main content snippet |
32
+ | class | `string` | no | | Custom CSS class for the section element |
33
+ | footerSnippet | `Snippet` | no | | Optional footer snippet (renders a semantic <footer>) |
34
+ | headingLevel | `1 | 2 | 3 | 4 | 5 | 6` | no | 2 | Heading level for the section title, clamped to 1..6 |
35
+ | marker | `string` | no | | Optional editorial marker before the title (e.g. `"01"` renders as a quieter monospace stamp). |
36
+ | meta | `string` | no | | Optional right-aligned monospace meta information in the title row (e.g. `"20 props"`, `"6 recipes"`). Renders as an editorial counter next to the title with `font-meta`, so the information stays visually subordinate to the section title. Lighter editorial polish (cluster A.3). |
37
+ | subtitle | `string` | no | | Subtitle text (property) |
38
+ | subtitleSnippet | `Snippet` | no | | Custom subtitle snippet (overrides subtitle prop) |
39
+ | title | `string` | no | | Title text (property) |
40
+ | titleSnippet | `Snippet` | no | | Custom title snippet (overrides title prop) |
41
+ | intent | `'default' | 'hero' | 'primary' | 'secondary'` | no | default | Controls the color theme and semantic meaning of the Section. Affects the overall appearance and user perception. Available options: default, hero, primary, secondary. |
42
+ | size | `'lg' | 'md' | 'sm' | 'xl'` | no | lg | Controls the dimensions, padding, and text size of the Section. Affects the component's physical footprint. Available options: lg, md, sm, xl. |
43
+ | centered | `'false' | 'true'` | no | false | Controls the centered behavior and appearance of the Section component. Available options: false, true. |
44
+
45
+ Inherited from:
46
+ - SectionVariantProps (external)
@@ -0,0 +1,48 @@
1
+
2
+ ---
3
+
4
+ ## TableOfContents
5
+ TableOfContents component
6
+
7
+ **Import:** `import { TableOfContents } from '@urbicon-ui/docs';`
8
+
9
+ ### Examples
10
+ ```svelte
11
+ <TableOfContents
12
+ navigation={[
13
+ { id: 'usage', title: 'Usage' },
14
+ { id: 'api', title: 'API', children: [{ id: 'props', title: 'Props' }] }
15
+ ]}
16
+ />
17
+ ```
18
+
19
+ ### Variants
20
+ - position: left, right (default: right)
21
+ - width: lg, md, sm (default: md)
22
+
23
+ ### Api
24
+ | Prop | Type | Required | Default | Description |
25
+ | --- | --- | :---: | --- | --- |
26
+ | navigation | `Array<{
27
+ id: string;
28
+ title: string;
29
+ order?: number;
30
+ href?: string;
31
+ children?: Array<{ id: string; title: string; order?: number; href?: string }>;
32
+ }>` | yes | | Navigation items with optional nested children. |
33
+ | ...TableOfContentsVariantProps | `VariantProps` | no | | Styling variants from TableOfContentsVariantProps |
34
+ | class | `string` | no | | Extra classes merged onto the root aside element. |
35
+ | related | `RelatedLink[]` | no | | Optional Editorial `// RELATED` block rendered below the main nav. Each entry needs a pre-resolved `href` (the TOC does not call `resolve()`, mirroring the existing nav behaviour). When omitted, the related block does not render at all. |
36
+ | showCodeToggle | `boolean` | no | true | Render the Editorial `// CODE` block at the bottom of the TOC, hosting the global show-/hide-all-code toggle. Requires a host page that provided a `CodeVisibilityStore` via context — the block silently skips itself if no store is found, so callers outside of `DocsLayout` don't have to know about it. |
37
+ | slotClasses | `Partial<Record<'aside' | 'title' | 'nav' | 'relatedTitle' | 'relatedNav' | 'relatedLink' | 'codeTitle' | 'codeToggle', string>>` | no | | Per-slot class overrides. |
38
+ | title | `string` | no | | Heading rendered above the nav links. |
39
+ | trackScroll | `boolean` | no | | Enable scroll-based active section tracking. |
40
+ | unstyled | `boolean` | no | | Remove all default tv styles. |
41
+ | position | `'left' | 'right'` | no | right | Controls the position behavior and appearance of the TableOfContents component. Available options: left, right. |
42
+ | width | `'lg' | 'md' | 'sm'` | no | md | Controls the width behavior and appearance of the TableOfContents component. Available options: lg, md, sm. |
43
+
44
+ Inherited from:
45
+ - TableOfContentsVariantProps (external)
46
+
47
+ ### Slots (slotClasses keys)
48
+ `aside`, `title`, `nav`, `relatedTitle`, `relatedNav`, `relatedLink`, `codeTitle`, `codeToggle`
@@ -0,0 +1,38 @@
1
+
2
+ ---
3
+
4
+ ## TypesReference
5
+ Displays expandable type definitions extracted from component source,
6
+ with inline code blocks, literal value badges, and cross-links to the API Reference.
7
+
8
+ **Import:** `import { TypesReference } from '@urbicon-ui/docs';`
9
+
10
+ ### Examples
11
+ ```svelte
12
+ <TypesReference
13
+ types={componentData.types}
14
+ title="Type Definitions"
15
+ description="Local types used by this component."
16
+ />
17
+ ```
18
+
19
+ ### Api
20
+ | Prop | Type | Required | Default | Description |
21
+ | --- | --- | :---: | --- | --- |
22
+ | types | `LocalTypeDef[]` | yes | | Array of type definitions to display. |
23
+ | ...HTMLAttributes<HTMLElement> | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') |
24
+ | ...TypesReferenceVariantProps | `VariantProps` | no | | Styling variants from TypesReferenceVariantProps |
25
+ | class | `string` | no | | Extra CSS classes merged onto the root section element. |
26
+ | description | `string` | no | | Descriptive text below the title. |
27
+ | emptyState | `Snippet` | no | | Optional snippet rendered below the table when no types match the filter. |
28
+ | size | `'sm' | 'md' | 'lg'` | no | | Controls the density – text size, padding, badge size. |
29
+ | slotClasses | `Partial<Record<'root' | 'header' | 'title' | 'description' | 'card' | 'toolbar' | 'codeBlock' | 'literalValues' | 'literalBadge' | 'usedBySection' | 'usedByLink', string>>` | no | | Per-slot class overrides for internal elements. |
30
+ | title | `string` | no | | Section heading text. |
31
+ | unstyled | `boolean` | no | | Strip all default tv() styles from internal slots. |
32
+
33
+ Inherited from:
34
+ - Omit<TypesReferenceVariantProps, 'size'> (omit-pattern)
35
+ - Omit<HTMLAttributes<HTMLElement>, 'children'> (omit-pattern)
36
+
37
+ ### Slots (slotClasses keys)
38
+ `root`, `header`, `title`, `description`, `card`, `toolbar`, `codeBlock`, `literalValues`, `literalBadge`, `usedBySection`, `usedByLink`