@create-ui/cli 0.5.9 → 0.6.1
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.
- package/dist/chunk-KFQXWKJJ.js +19 -0
- package/dist/chunk-KFQXWKJJ.js.map +1 -0
- package/dist/{chunk-2ELKDGGM.js → chunk-OGAWGP7T.js} +3 -3
- package/dist/{chunk-2ELKDGGM.js.map → chunk-OGAWGP7T.js.map} +1 -1
- package/dist/chunk-OITQ46YK.js +99 -0
- package/dist/chunk-OITQ46YK.js.map +1 -0
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/registry/index.d.ts +3 -1
- package/dist/registry/index.js +1 -1
- package/dist/skills/createui/SKILL.md +81 -54
- package/dist/skills/createui/cli.md +1 -1
- package/dist/skills/createui/customization.md +14 -12
- package/dist/skills/createui/evals/evals.json +77 -0
- package/dist/skills/createui/mcp.md +12 -26
- package/dist/skills/createui/rules/a11y.md +148 -0
- package/dist/skills/createui/rules/composition.md +64 -26
- package/dist/skills/createui/rules/forms.md +2 -2
- package/dist/skills/createui/rules/icons.md +1 -1
- package/dist/skills/createui/rules/styling.md +2 -2
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-643QI2I2.js +0 -102
- package/dist/chunk-643QI2I2.js.map +0 -1
- package/dist/chunk-KQTXDVKV.js +0 -19
- package/dist/chunk-KQTXDVKV.js.map +0 -1
- package/dist/skills/createui/reference/accordion.md +0 -127
- package/dist/skills/createui/reference/app-store-badge.md +0 -88
- package/dist/skills/createui/reference/aspect-ratio.md +0 -52
- package/dist/skills/createui/reference/avatar.md +0 -230
- package/dist/skills/createui/reference/badge.md +0 -110
- package/dist/skills/createui/reference/breadcrumb.md +0 -153
- package/dist/skills/createui/reference/button-group.md +0 -116
- package/dist/skills/createui/reference/button.md +0 -104
- package/dist/skills/createui/reference/checkbox-group.md +0 -118
- package/dist/skills/createui/reference/checkbox.md +0 -79
- package/dist/skills/createui/reference/chip.md +0 -115
- package/dist/skills/createui/reference/close-button.md +0 -83
- package/dist/skills/createui/reference/command.md +0 -69
- package/dist/skills/createui/reference/country-flag.md +0 -109
- package/dist/skills/createui/reference/credit-card-input.md +0 -76
- package/dist/skills/createui/reference/date-input.md +0 -71
- package/dist/skills/createui/reference/dropdown-menu.md +0 -164
- package/dist/skills/createui/reference/field.md +0 -186
- package/dist/skills/createui/reference/info-tooltip.md +0 -110
- package/dist/skills/createui/reference/inline-alert.md +0 -146
- package/dist/skills/createui/reference/input-group.md +0 -171
- package/dist/skills/createui/reference/input-otp.md +0 -130
- package/dist/skills/createui/reference/input-stepper.md +0 -120
- package/dist/skills/createui/reference/input.md +0 -118
- package/dist/skills/createui/reference/label.md +0 -121
- package/dist/skills/createui/reference/pagination.md +0 -157
- package/dist/skills/createui/reference/password-strength.md +0 -70
- package/dist/skills/createui/reference/phone-input.md +0 -77
- package/dist/skills/createui/reference/progress.md +0 -158
- package/dist/skills/createui/reference/radio-group.md +0 -133
- package/dist/skills/createui/reference/radio.md +0 -79
- package/dist/skills/createui/reference/scroll-area.md +0 -212
- package/dist/skills/createui/reference/segmented-control.md +0 -146
- package/dist/skills/createui/reference/select.md +0 -204
- package/dist/skills/createui/reference/separator.md +0 -99
- package/dist/skills/createui/reference/social-login-button.md +0 -130
- package/dist/skills/createui/reference/spinner.md +0 -68
- package/dist/skills/createui/reference/status-badge.md +0 -89
- package/dist/skills/createui/reference/switch-group.md +0 -122
- package/dist/skills/createui/reference/switch.md +0 -75
- package/dist/skills/createui/reference/tab-menu.md +0 -165
- package/dist/skills/createui/reference/text-link.md +0 -84
- package/dist/skills/createui/reference/textarea.md +0 -50
- package/dist/skills/createui/reference/toast.md +0 -162
- package/dist/skills/createui/reference/tooltip.md +0 -63
package/dist/mcp/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{b as server}from'../chunk-
|
|
1
|
+
export{b as server}from'../chunk-OITQ46YK.js';import'../chunk-OGAWGP7T.js';import'../chunk-KFQXWKJJ.js';import'../chunk-Y7WZRQWW.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ declare function searchRegistries(registries: string[], options?: {
|
|
|
25
25
|
};
|
|
26
26
|
}>;
|
|
27
27
|
|
|
28
|
+
declare function fetchReference(query: string): Promise<string>;
|
|
29
|
+
|
|
28
30
|
declare const RegistryErrorCode: {
|
|
29
31
|
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
30
32
|
readonly NOT_FOUND: "NOT_FOUND";
|
|
@@ -92,4 +94,4 @@ declare class RegistryParseError extends RegistryError {
|
|
|
92
94
|
constructor(item: string, parseError: unknown);
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
export { RegistryError, RegistryFetchError, RegistryForbiddenError, RegistryLocalFileError, RegistryNotFoundError, RegistryParseError, RegistryUnauthorizedError, searchRegistries };
|
|
97
|
+
export { RegistryError, RegistryFetchError, RegistryForbiddenError, RegistryLocalFileError, RegistryNotFoundError, RegistryParseError, RegistryUnauthorizedError, fetchReference, searchRegistries };
|
package/dist/registry/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as searchRegistries}from'../chunk-
|
|
1
|
+
export{a as searchRegistries}from'../chunk-OGAWGP7T.js';export{G as RegistryError,K as RegistryFetchError,J as RegistryForbiddenError,L as RegistryLocalFileError,H as RegistryNotFoundError,M as RegistryParseError,I as RegistryUnauthorizedError,S as fetchReference,V as getRegistry,W as getRegistryItems,X as resolveRegistryItems}from'../chunk-KFQXWKJJ.js';import'../chunk-Y7WZRQWW.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: createui
|
|
3
|
-
description: Create UI component library and design system. Use whenever writing or editing ANY React/JSX UI - pages, views, components, layouts, styling - in a project that uses Create UI (has a components.json, the @createui registry, or @create-ui/* packages), and for createui CLI or MCP operations (init/add/create/diff/view/search/migrate/mcp). Provides per-component API references (
|
|
3
|
+
description: Create UI component library and design system. Use whenever writing or editing ANY React/JSX UI - pages, views, components, layouts, styling - in a project that uses Create UI (has a components.json, the @createui registry, or @create-ui/* packages), and for createui CLI or MCP operations (init/add/create/diff/view/search/migrate/mcp). Provides per-component API references (via the MCP `get_component_reference` tool), composition rules, semantic tokens, and design recipes.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Bash(npx @create-ui/cli *), Bash(pnpm dlx @create-ui/cli *)
|
|
6
6
|
---
|
|
@@ -13,16 +13,16 @@ Create UI is a design code system: **one unified styling system + many themes**.
|
|
|
13
13
|
|
|
14
14
|
1. **Get project context** - `npx @create-ui/cli info` (prints components.json: aliases, `rsc`, `tailwind.css` path, `iconLibrary`). Use the real aliases in imports.
|
|
15
15
|
2. **Check installed components** - list the `ui` alias directory (e.g. `components/ui/`). Never import a component that hasn't been added; never re-add installed ones.
|
|
16
|
-
3. **Before the FIRST use of any component,
|
|
16
|
+
3. **Before the FIRST use of any component, fetch its API authority** - call MCP `get_component_reference('<component>')` (props, variants, defaults, icon usage, a canonical example, and gotchas; auth-aware - free or pro). A keyword works too (`'tabs'`, `'removable tag'`), and an empty query lists every component. Offline fallback: `npx @create-ui/cli view <name>` or MCP `get_item_examples_from_registries` with `"<name>-demo"`.
|
|
17
17
|
4. **Add what's missing** - `npx @create-ui/cli add <name>`.
|
|
18
18
|
5. **Compose per the invariants below.** Never hand-roll a pattern listed in "Never hand-roll".
|
|
19
19
|
6. **Exercise the component API - never ship bare defaults.** Pick `variant` / `appearance` / `size` / `state` / `orientation` to fit each element's role on every build (see "Use the full component API" below). For marketing / landing / showcase, also read [`rules/design.md`](./rules/design.md) first (section recipes, spacing rhythm, anti-patterns); for any other rich UI, skim its richness checklist + anti-patterns. Build to the user's brand and request; never clone the Create UI site.
|
|
20
20
|
|
|
21
21
|
## Component inventory
|
|
22
22
|
|
|
23
|
-
Every item
|
|
23
|
+
Every **free** item ships below. At no tier is there a **card, table, tabs-with-panels, sheet, drawer, skeleton, sidebar, or alert-banner component** - build those from semantic-token markup and these primitives (see the table/card recipe in [`rules/composition.md`](./rules/composition.md)), never invent lookalikes. **`modal` and `popover` exist only as Pro components** (a developer seat is required; `add modal` returns 401 without one) - inspect them with `get_component_reference('modal')` / `('popover')`. The only free modal surface is `CommandDialog` (part of `command`).
|
|
24
24
|
|
|
25
|
-
<!-- MAINTENANCE:
|
|
25
|
+
<!-- MAINTENANCE: the free inventory is generated below. modal/popover are Pro (listed in __pro-manifest__ gated); alert-banner/dialog/sheet/drawer/table/card do not exist at any tier. Keep these negations in sync here, in rules/composition.md, and in the notes files - the generator does not maintain hand-written prose. -->
|
|
26
26
|
|
|
27
27
|
<!-- BEGIN GENERATED:INVENTORY -->
|
|
28
28
|
|
|
@@ -40,7 +40,6 @@ Every item below ships in `@createui` - and nothing else does. There is **no car
|
|
|
40
40
|
| checkbox-group | CheckboxGroup | variant: primary*\|danger · size: xs\|sm\|md* · placement: left*\|right |
|
|
41
41
|
| chip | Chip | variant: neutral*\|info\|danger\|success · appearance: outline*\|soft · size: xs\|sm\|md\|lg*\|xl · shape: pill\|rounded* · selected · disabled · dragging · closable |
|
|
42
42
|
| close-button | CloseButton | variant: neutral*\|inverse · appearance: solid\|outline\|ghost*\|soft · size: xs\|sm\|md*\|lg\|xl\|2xl · shape: rounded*\|pill\|square |
|
|
43
|
-
| command | Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, +13 more | CommandDialog: showCloseButton |
|
|
44
43
|
| country-flag | CountryFlag, CurrencyFlag, FlagFallback | code (required) |
|
|
45
44
|
| credit-card-input | CreditCardInput | size: xs\|sm\|md · leadingIcon · invalid · disabled · loading · showLeadingIcon · showBadge · showValidationIcon |
|
|
46
45
|
| date-input | DateInput | size: xs\|sm\|md · leadingIcon · invalid · disabled · loading · showLeadingIcon |
|
|
@@ -54,7 +53,6 @@ Every item below ships in `@createui` - and nothing else does. There is **no car
|
|
|
54
53
|
| input-stepper | InputStepper | variant: connected\|separated · size: xs\|sm\|md · value/onValueChange · defaultValue · min · max · step · invalid · disabled |
|
|
55
54
|
| label | Label, LabelBlock, LabelMain, LabelIcon, LabelRequired, LabelOptional, +4 more | size: xs\|sm\|md |
|
|
56
55
|
| pagination | Pagination, PaginationContent, PaginationLink, PaginationFirst, PaginationPrevious, PaginationNext, +2 more | variant: compact\|compact-grouped* · shape: rounded*\|pill |
|
|
57
|
-
| password-strength | PasswordStrength | size: xs\|sm\|md* |
|
|
58
56
|
| phone-input | PhoneInput | size: xs\|sm\|md · invalid · disabled · loading · showHelperIcon |
|
|
59
57
|
| progress | Progress | variant: primary*\|info\|success\|warning\|danger\|away\|neutral\|neutral-static\|neutral-soft\|inverse\|inverse-static\|inverse-soft · appearance: solid*\|gradient · size: xs\|sm\|md*\|lg · shape: sharp\|pill* · type: line*\|circle · value · max · duration |
|
|
60
58
|
| radio | Radio | variant: primary*\|neutral\|danger\|success\|inverse · size: xs\|sm\|md* |
|
|
@@ -68,7 +66,7 @@ Every item below ships in `@createui` - and nothing else does. There is **no car
|
|
|
68
66
|
| status-badge | StatusBadge | variant: primary*\|danger\|success\|warning\|info\|highlighted\|away\|verified\|cyan\|lime\|neutral\|white · size: xs\|sm\|md* |
|
|
69
67
|
| switch | Switch | variant: primary*\|info\|neutral\|inverse\|semantic · size: md*\|sm\|xs · shape: pill*\|rounded · thumbType: short*\|long · ioTrigger · thumbIcon |
|
|
70
68
|
| switch-group | SwitchGroup | size: xs\|sm\|md* · ioTrigger · placement: left*\|right |
|
|
71
|
-
| tab-menu | TabMenu, TabMenuItem | variant:
|
|
69
|
+
| tab-menu | TabMenu, TabMenuItem | variant: horizontal-line* · size: sm\|md*\|lg · value/onValueChange · indicator: bottom* · **Pro** adds variant: vertical-button\|vertical-line\|horizontal-button · indicator: left\|top |
|
|
72
70
|
| text-link | TextLink | variant: primary*\|neutral\|inverse\|danger\|success\|info · size: xs\|sm\|md*\|lg · leadingIcon/trailingIcon · visited · disabled · underline |
|
|
73
71
|
| textarea | Textarea | size: xs\|sm*\|md · resizable: x\|y\|both · loading |
|
|
74
72
|
| toast | Toast, ToastBody, ToastIcon, ToastContent, ToastTitle, ToastDescription, +3 more | variant: primary*\|neutral\|danger\|success\|warning\|info\|away · appearance: solid*\|soft\|outline\|default |
|
|
@@ -115,37 +113,97 @@ Components NOT in this table take no leadingIcon/trailingIcon props:
|
|
|
115
113
|
|
|
116
114
|
<!-- END GENERATED:ICON-MATRIX -->
|
|
117
115
|
|
|
116
|
+
## Design tokens
|
|
117
|
+
|
|
118
|
+
The styling vocabulary - semantic colors, spacing, radius, typography, shadow, and the project themes. These back the "semantic tokens only" invariant below. For the on-demand version (or from an MCP client), call `get_component_reference('tokens')` (or `'colors'` / `'spacing'` / `'typography'`).
|
|
119
|
+
|
|
120
|
+
<!-- BEGIN GENERATED:DESIGN-TOKENS -->
|
|
121
|
+
|
|
122
|
+
Use semantic tokens, never the raw palette (`bg-blue-500`) or hex. Token values differ between light and dark - reference the token, never hardcode a color.
|
|
123
|
+
|
|
124
|
+
### Colors -> `bg-`/`text-`/`border-`/`outline-<token>`
|
|
125
|
+
|
|
126
|
+
- **Surfaces & text** (low -> high contrast): `static`, `weakest`, `weak`, `light`, `medium`, `heavy`, `strong`, `strongest`, `body`, `placeholder`, `disabled`.
|
|
127
|
+
- **Intent** (each x `weakest|weak|base|strong|strongest`): `primary`, `error`, `success`, `warning`, `info`, `away`, `verified`, `feature`, `highlighted`, `stable` - e.g. `bg-primary-base`, `text-error-strong`, `border-success-weak`.
|
|
128
|
+
- **Interaction & overlay**: `hover`, `active`, `hover-inverted`, `active-inverted`, `scrim`, `scrim-strong`.
|
|
129
|
+
- **Static (non-theming, fixed light/dark)**: `static-white`, `static-black`, `static-{white,black}-alpha-{0,8,16,24,32,48,64,80}`.
|
|
130
|
+
|
|
131
|
+
Gotchas: `variant="danger"` but the color token family is **`error-*`** (there is no `danger-*`); the neutral intent color is **`stable-*`**; `neutral-*` exists only as a component `variant`, not a color token. Never `bg-blue-500`, never hex.
|
|
132
|
+
|
|
133
|
+
### Spacing -> `gap-`/`p-`/`m-`/`px-`/`py-<token>`
|
|
134
|
+
|
|
135
|
+
`component-lg`, `component-md`, `component-none`, `component-sm`, `component-xl`, `component-xs`, `layout-lg`, `layout-md`, `layout-none`, `layout-sm`, `layout-xl`, `layout-xs`, `section-lg`, `section-md`, `section-none`, `section-sm`, `section-xl`, `section-xs`.
|
|
136
|
+
|
|
137
|
+
`component-*` = tight component-internal padding/gaps · `layout-*` = section padding/gaps · `section-*` = page-section rhythm. **Only use a semantic spacing class when a Figma design references that token**; for a plain value use standard Tailwind (`gap-4`, `p-6`).
|
|
138
|
+
|
|
139
|
+
### Radius -> `rounded-<token>`
|
|
140
|
+
|
|
141
|
+
`2xl`, `3xl`, `4xl`, `5xl`, `component-2xl`, `component-3xl`, `component-4xl`, `component-5xl`, `component-full`, `component-lg`, `component-md`, `component-none`, `component-sm`, `component-xl`, `full`, `lg`, `md`, `none`, `sm`, `xl`, `xs`.
|
|
142
|
+
|
|
143
|
+
`component-*` radii rescale responsively (prefer them on new components); the bare scale (`sm`, `lg`, `xl`, ...) stays static.
|
|
144
|
+
|
|
145
|
+
### Typography -> `text-<token>` (the class IS the token)
|
|
146
|
+
|
|
147
|
+
- **heading**: `heading-h1`, `heading-h2`, `heading-h3`, `heading-h4`, `heading-h5`, `heading-h6`.
|
|
148
|
+
- **display**: `display-lg`, `display-xl`.
|
|
149
|
+
- **paragraph**: `paragraph-lg`, `paragraph-md`, `paragraph-sm`, `paragraph-xl`, `paragraph-xs`.
|
|
150
|
+
- **body**: `body-lg`, `body-md`, `body-sm`, `body-xl`, `body-xs`.
|
|
151
|
+
- **ui-control**: `ui-control-lg`, `ui-control-md`, `ui-control-sm`, `ui-control-xl`, `ui-control-xs`.
|
|
152
|
+
- **ui-caption**: `ui-caption-md`, `ui-caption-xs`.
|
|
153
|
+
- **ui-overline**: `ui-overline-md`, `ui-overline-sm`, `ui-overline-xs`.
|
|
154
|
+
- **code**: `code-lg`, `code-md`, `code-sm`, `code-xs`.
|
|
155
|
+
- **numeric**: `numeric-lg`, `numeric-md`, `numeric-sm`, `numeric-xl`, `numeric-xs`.
|
|
156
|
+
- **Fonts**: `font-body`, `font-display`, `font-numeric`.
|
|
157
|
+
|
|
158
|
+
### Shadow -> `shadow-<token>`
|
|
159
|
+
|
|
160
|
+
`component-error-default`, `component-error-focused`, `component-error-hover`, `component-icon-wrapper`, `component-info-default`, `component-info-focused`, `component-info-hover`, `component-inverted-default`, `component-inverted-focused`, `component-inverted-hover`, `component-neutral-default`, `component-neutral-focused`, `component-neutral-hover`, `component-primary-default`, `component-primary-focused`, `component-primary-hover`, `component-success-default`, `component-success-focused`, `component-success-hover`, `neutral-2xl`, `neutral-2xs`, `neutral-3xl`, `neutral-lg`, `neutral-md`, `neutral-sm`, `neutral-xl`, `neutral-xs`.
|
|
161
|
+
|
|
162
|
+
### Themes (chosen at `init` - never ask or re-pick)
|
|
163
|
+
|
|
164
|
+
- **Primary** (accent; use `primary-*` color tokens, do not invent a color): `indigo*`, `lime`, `green`, `red`, `orange`, `yellow`, `cyan`, `blue`.
|
|
165
|
+
- **Neutral**: `gray*`, `slate`, `zinc`, `base`, `stone`.
|
|
166
|
+
|
|
167
|
+
(`*` = default.) Switch the whole project only via `npx @create-ui/cli init --theme <name>` / `--neutral <name>`, and only when the user explicitly asks.
|
|
168
|
+
|
|
169
|
+
<!-- END GENERATED:DESIGN-TOKENS -->
|
|
170
|
+
|
|
118
171
|
## Cross-cutting invariants
|
|
119
172
|
|
|
120
173
|
- **Prop taxonomy**: `variant` = color intent (`primary`, `danger`, `success`, `neutral-*`, ...) · `appearance` = fill weight (`solid` / `outline` / `soft` / `ghost`) · `size` · `shape`. **There is no `variant="outline"`, `variant="secondary"`, or `variant="destructive"`** - an outline style is `appearance="outline"`, a destructive action is `variant="danger"`.
|
|
121
174
|
- **`Field` owns size; children inherit it.** Set `size` (`xs` | `sm` | `md`) once on `Field`; `Input`, `Select`, `Textarea`, labels and helpers read it via context. Never re-set or downgrade size on a child.
|
|
175
|
+
- **Adjacent components don't share a size scale** - `Avatar md` ≠ `Button md` in height. Harmonize a row by optical height: prefer a size-owning container (`Field` / `InputGroup` / `Chip`) when one exists, otherwise anchor on the text scale and move the whole cluster's sizes together, aligned with `flex items-center` + a gap. Never match size prop names across different components (see rules/composition.md "Sizing across adjacent components").
|
|
122
176
|
- **Validation**: `data-invalid` on `Field`, `aria-invalid` on the control. Disabled: `data-disabled` on `Field`, `disabled` on the control.
|
|
123
177
|
- **`Button` has a real `loading` prop** - `<Button loading>Saving...</Button>`. Don't compose spinners into buttons.
|
|
124
178
|
- **Use `asChild` for custom triggers/links** - `<Button asChild><Link href="/x">Docs</Link></Button>`.
|
|
125
179
|
- **Items live inside their Group**: `SelectItem` → `SelectGroup` and `CommandItem` → `CommandGroup` are structural (always wrap); `DropdownMenuGroup` is semantic grouping - a lone `DropdownMenuItem` may sit directly in `DropdownMenuContent`.
|
|
126
|
-
- **Semantic tokens only, never raw
|
|
127
|
-
- **The theme is already chosen -
|
|
180
|
+
- **Semantic tokens only, never raw palette or hex** - use the surface / text / border / intent tokens from the Design tokens block above (`bg-static`, `text-strongest`, `border-light`, `bg-primary-base`, `{error,success,…}-{base,weak}`). Never `bg-blue-500`, never hex.
|
|
181
|
+
- **The theme is already chosen** - primary + neutral were picked at `init` and live as tokens. Use `bg-primary-base` / `text-primary-base` / `border-primary-*` for any accent; never ask for a color, invent one, or hand-edit the theme token hex. Re-theming is `init --theme <name>` / `--neutral <name>`, only on explicit request (see [customization.md](./customization.md)).
|
|
128
182
|
- **Focus is `outline-*`, never `ring-*`.**
|
|
129
183
|
- **Spacing**: vertical stacks are `flex flex-col gap-*` (never `space-y-*`); `size-10` not `w-10 h-10`; semantic spacing classes (`gap-component-sm`) only when a Figma design references a token - otherwise standard Tailwind (`gap-4`).
|
|
130
184
|
- **`className` is for layout, not restyling** - don't override a component's colors or typography; reach for `variant`/`appearance` first.
|
|
131
185
|
|
|
132
186
|
## Use the full component API
|
|
133
187
|
|
|
134
|
-
|
|
188
|
+
Props encode an element's *role*; a default is right only when it happens to match that role. **This holds for all UI - app screens as much as marketing** - and one size + one variant everywhere reads as a wireframe. Fetch the prop table with `get_component_reference('<component>')` and set the axes deliberately: `variant` = intent, `appearance` = hierarchy (one `solid` primary per group, the rest `soft` / `outline` / `ghost`), `size` = density, plus state props (`loading` / `invalid` + `aria-invalid` / `disabled` / `selected`) and any component-specific axis (`shape`, `orientation`, `layout`, `placement`). Map role → props (Button/Badge, the highest-traffic axes):
|
|
135
189
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
190
|
+
| Element's role | Props |
|
|
191
|
+
| --- | --- |
|
|
192
|
+
| The one primary action in a view / form / section | `variant="primary" appearance="solid"` |
|
|
193
|
+
| A secondary action beside it | `appearance="outline"` / `"soft"` (often `variant="neutral-light"`) |
|
|
194
|
+
| Tertiary / dismiss / toolbar action | `appearance="ghost"` |
|
|
195
|
+
| Destructive / positive action | `variant="danger"` / `variant="success"` |
|
|
196
|
+
| Any action on a dark / colored panel | `variant="inverse-solid"` |
|
|
197
|
+
| Status / tag (Badge) | `soft` workhorse · `outline` quiet eyebrow/version · `solid` high-priority count · `variant` = meaning |
|
|
198
|
+
| `size` by context | dense / toolbar `xs`–`sm` · standard `md` · primary CTA / hero `lg`–`xl` |
|
|
141
199
|
|
|
142
|
-
Each
|
|
200
|
+
**Default monoculture is a bug**: if every Button/Badge shares one default size+variant, the primary action isn't standing out - you skipped this. Each component's `get_component_reference` example already spans its axes; mirror that range. `rules/design.md` has the per-component richness checklist and anti-patterns.
|
|
143
201
|
|
|
144
202
|
## Never hand-roll
|
|
145
203
|
|
|
146
204
|
| You need | Use (never raw markup) |
|
|
147
205
|
| --- | --- |
|
|
148
|
-
| Tabs | `TabMenu` + `TabMenuItem` + your own value-keyed panels (
|
|
206
|
+
| Tabs | `TabMenu` + `TabMenuItem` + your own value-keyed panels (TabMenu renders only the bar) |
|
|
149
207
|
| Toggle between 2-7 options | `SegmentedControl` + `SegmentedControlItem` (`value`/`onValueChange`) - never a row of `Button`s with manual active state |
|
|
150
208
|
| Tag / label | `Badge` (icons via `leadingIcon`/`trailingIcon`) |
|
|
151
209
|
| Removable / interactive tag | `Chip` (icon or `Avatar` as FIRST CHILD, `closable`/`onClose`) |
|
|
@@ -160,43 +218,11 @@ Each `reference/<component>.md` canonical example already spans its component's
|
|
|
160
218
|
|
|
161
219
|
## Recipes
|
|
162
220
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```tsx
|
|
166
|
-
const [tab, setTab] = React.useState("overview")
|
|
167
|
-
|
|
168
|
-
<TabMenu variant="horizontal-line" indicator="bottom" value={tab} onValueChange={setTab}>
|
|
169
|
-
<TabMenuItem value="overview" label="Overview" />
|
|
170
|
-
<TabMenuItem value="billing" label="Billing" leadingIcon={<RiBankCardLine />} />
|
|
171
|
-
</TabMenu>
|
|
172
|
-
{tab === "overview" && <OverviewPanel />}
|
|
173
|
-
{tab === "billing" && <BillingPanel />}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
**Billing / pricing toggle** - the active pill slides between items in both appearances; `appearance="grouped"` adds the padded `bg-weak` container (the classic pricing-toggle look):
|
|
177
|
-
|
|
178
|
-
```tsx
|
|
179
|
-
const [billing, setBilling] = React.useState("monthly")
|
|
180
|
-
|
|
181
|
-
<SegmentedControl appearance="grouped" variant="neutral" value={billing} onValueChange={setBilling}>
|
|
182
|
-
<SegmentedControlItem value="monthly">Monthly</SegmentedControlItem>
|
|
183
|
-
<SegmentedControlItem value="yearly">Yearly</SegmentedControlItem>
|
|
184
|
-
</SegmentedControl>
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**Showcase-quality switch** - bare `<Switch />` is for dense forms; showcases should exercise the richer API (see `reference/switch.md`). Labelled apply-immediately rows use `SwitchGroup`; the `Field` composition below is for submit-to-save forms:
|
|
188
|
-
|
|
189
|
-
```tsx
|
|
190
|
-
<Field size="md" orientation="horizontal">
|
|
191
|
-
<FieldContent>
|
|
192
|
-
<FieldLabel htmlFor="2fa">Enforce two-factor auth</FieldLabel>
|
|
193
|
-
</FieldContent>
|
|
194
|
-
<Switch id="2fa" thumbIcon defaultChecked />
|
|
195
|
-
</Field>
|
|
196
|
-
<Switch variant="semantic" thumbType="long" ioTrigger aria-label="Accept" />
|
|
197
|
-
```
|
|
221
|
+
Copy-ready patterns live in the on-demand rules - fetch the one you need instead of inlining:
|
|
198
222
|
|
|
199
|
-
(`
|
|
223
|
+
- **Tabs with panels** (`TabMenu` is the bar only; render panels keyed by value) and **table / card / empty state** (no such primitives - build from semantic markup) → [composition.md](./rules/composition.md).
|
|
224
|
+
- **Forms, billing/pricing toggle (grouped `SegmentedControl`), showcase-quality `Switch`** → [forms.md](./rules/forms.md).
|
|
225
|
+
- **Hero / dark CTA / footer / pricing section, spacing rhythm, richness checklist** → [design.md](./rules/design.md).
|
|
200
226
|
|
|
201
227
|
## components.json keys
|
|
202
228
|
|
|
@@ -222,12 +248,13 @@ npx @create-ui/cli mcp init --client claude # set up the MCP server
|
|
|
222
248
|
|
|
223
249
|
## Detailed references
|
|
224
250
|
|
|
225
|
-
-
|
|
251
|
+
- **Per-component API / gotchas**: MCP `get_component_reference('<name>')` - generated from source, auth-aware (free or pro). Empty query lists every component; offline fallback `npx @create-ui/cli view <name>`.
|
|
226
252
|
- [rules/design.md](./rules/design.md) - design taste: hero/CTA/footer/pricing recipes, richness checklist, anti-patterns.
|
|
227
253
|
- [rules/icons.md](./rules/icons.md) - icon props per component, sizing, assets packages.
|
|
228
254
|
- [rules/composition.md](./rules/composition.md) - groups, overlays, TabMenu, Avatar, InlineAlert, Toast.
|
|
229
255
|
- [rules/forms.md](./rules/forms.md) - FieldGroup/Field, size cascade, InputGroup, SegmentedControl, validation.
|
|
230
256
|
- [rules/styling.md](./rules/styling.md) - semantic tokens, className scope, spacing, focus.
|
|
257
|
+
- [rules/a11y.md](./rules/a11y.md) - accessible names, labelling, validation/state wiring, overlay a11y, reduced motion.
|
|
231
258
|
- [cli.md](./cli.md) - every command and flag. [mcp.md](./mcp.md) - MCP tools and workflow. [customization.md](./customization.md) - theming and tokens.
|
|
232
259
|
|
|
233
260
|
## Resources
|
|
@@ -117,7 +117,7 @@ With no argument, lists the components that have updates available. With a compo
|
|
|
117
117
|
npx @create-ui/cli view <items...> [options]
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Prints item metadata plus file contents (as JSON). Items are bare names or URLs, e.g. `button`. Examples are registry items too - `view badge-demo` prints a component's canonical usage; check it (or
|
|
120
|
+
Prints item metadata plus file contents (as JSON). Items are bare names or URLs, e.g. `button`. Examples are registry items too - `view badge-demo` prints a component's canonical usage; check it (or MCP `get_component_reference('<name>')`) before the first use of a component.
|
|
121
121
|
|
|
122
122
|
| Flag | Short | Description | Default |
|
|
123
123
|
| ------------- | ----- | ----------------- | ------- |
|
|
@@ -51,7 +51,7 @@ Create UI uses **semantic** token names. Backgrounds, borders, and text share a
|
|
|
51
51
|
|
|
52
52
|
### Primary scale
|
|
53
53
|
|
|
54
|
-
`
|
|
54
|
+
The **semantic primary tokens swap with the theme** like everything else - `primary-weakest` / `weak` / `base` / `strong` / `strongest` (`bg-primary-base`, `text-primary-base`, `border-primary-strong`). Use these: each resolves to a *different* ramp step in dark vs light (`primary-base` = `primary-500` in light but `primary-400` in dark), so it stays legible in both modes. The raw numeric ramp `primary-50` … `primary-950` is the **fixed brand palette** those tokens point at - it does not swap, so don't apply it directly (`bg-primary-500` is a raw color, like `bg-blue-500`). For tints prefer the swapping `primary-weakest` / `weak` over raw `primary-alpha-*`; `outline-primary-500/700` focus is a fixed-ramp helper primitives already wire up.
|
|
55
55
|
|
|
56
56
|
### Status families
|
|
57
57
|
|
|
@@ -87,13 +87,13 @@ If you are porting markup written against common component-library token names,
|
|
|
87
87
|
| `bg-card` | `bg-static` (or `bg-weakest` for subtle surfaces) |
|
|
88
88
|
| `text-foreground` | `text-body` |
|
|
89
89
|
| `text-muted-foreground` | `text-placeholder` |
|
|
90
|
-
| `bg-primary` | `bg-primary-base` (
|
|
90
|
+
| `bg-primary` | `bg-primary-base` (swaps; not `bg-primary-500`, which is fixed) |
|
|
91
91
|
| `text-primary-foreground` | `text-white` (on solid primary) |
|
|
92
92
|
| `border-border` / `border-input` | `border-light` or `border-medium` |
|
|
93
93
|
| `bg-muted` | `bg-weak` |
|
|
94
94
|
| `bg-destructive` | `bg-error-base` |
|
|
95
95
|
| `text-destructive` | `text-error-base` |
|
|
96
|
-
| `bg-accent` | `bg-primary-alpha-16` |
|
|
96
|
+
| `bg-accent` | `bg-primary-weakest` (swaps; the raw `primary-alpha-16` does not) |
|
|
97
97
|
| `ring-ring` (focus) | `outline-primary-700` (primary) / `outline-strong` (neutral) |
|
|
98
98
|
|
|
99
99
|
---
|
|
@@ -162,29 +162,31 @@ Because every color is a token that already has a `.dark` override, **never writ
|
|
|
162
162
|
|
|
163
163
|
Edit the project's global CSS file - the `tailwind.css` path reported by `createui info` (typically `app/globals.css`). **Never create a new CSS file** for this.
|
|
164
164
|
|
|
165
|
-
Define the
|
|
165
|
+
Match how the system works: **a color is a semantic token with both a light and a dark value**, so it swaps with the theme like every built-in token. Define the pair in `:root` and `.dark`, then use the semantic name - not a raw step that only exists in one mode:
|
|
166
166
|
|
|
167
167
|
```css
|
|
168
168
|
/* app/globals.css */
|
|
169
169
|
:root {
|
|
170
|
-
--color-brand-
|
|
171
|
-
--color-brand-
|
|
172
|
-
--
|
|
173
|
-
--radius-lg: 0.75rem; /* override radius */
|
|
170
|
+
--color-brand-base: #2f7bff; /* light */
|
|
171
|
+
--color-brand-weak: #eef6ff;
|
|
172
|
+
--radius-lg: 0.75rem; /* radius is a single value - no theme swap needed */
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
.dark {
|
|
177
|
-
--color-brand-
|
|
176
|
+
--color-brand-base: #5a96ff; /* dark - keeps contrast */
|
|
177
|
+
--color-brand-weak: #16243a;
|
|
178
178
|
}
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
Tailwind v4 auto-generates
|
|
181
|
+
Tailwind v4 auto-generates `bg-brand-base`, `text-brand-base`, `bg-brand-weak`, … and they swap under `.dark` automatically:
|
|
182
182
|
|
|
183
183
|
```tsx
|
|
184
|
-
<div className="bg-brand-
|
|
184
|
+
<div className="bg-brand-weak text-brand-base">Brand surface</div>
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
A single `:root` scale with no `.dark` pair is only for a color that must stay fixed across themes (e.g. a logo color) - it will NOT dark-adapt, so never use it for surfaces or text that appear in both modes.
|
|
188
|
+
|
|
189
|
+
To restyle existing components, prefer **overriding the semantic token families** - redefine the light *and* dark values of `primary-*` or a status family - over adding new colors; every component already references them. (No build step - editing the CSS is the whole change.)
|
|
188
190
|
|
|
189
191
|
---
|
|
190
192
|
|
|
@@ -106,6 +106,83 @@
|
|
|
106
106
|
"Spacing uses flex/grid + gap-*, never space-y-*",
|
|
107
107
|
"Column titles use text-strongest with body links in text-body/text-placeholder"
|
|
108
108
|
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": 9,
|
|
112
|
+
"prompt": "Build a 'plan limits' summary block: a row that says the account is over its seat limit (an error), a row showing storage is healthy (success), and a neutral row for the current region. Use Create UI semantic tokens.",
|
|
113
|
+
"expected_output": "Status communicated with semantic status tokens and/or StatusBadge plus text labels - error family is error-*, neutral is stable-*, no raw palette or danger-* color tokens.",
|
|
114
|
+
"files": [],
|
|
115
|
+
"expectations": [
|
|
116
|
+
"Error/negative state uses the error-* token family (e.g. text-error-base, bg-error-weak) - never a danger-* color token (there is no danger-* color; danger is only a component variant) and never bg-red-500/hex",
|
|
117
|
+
"Positive state uses success-* tokens (e.g. text-success-base) and informational/neutral uses stable-* or neutral surface tokens - not raw emerald/green/gray palette classes",
|
|
118
|
+
"Status is not conveyed by color alone: each row pairs the color with a text label (or a StatusBadge dot plus an adjacent label)",
|
|
119
|
+
"Surfaces and text use semantic tokens (bg-static/bg-weak, text-body/text-placeholder/text-strongest), never foreign tokens or hex"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": 10,
|
|
124
|
+
"prompt": "Create a checkout details form with: cardholder name, card number, card expiry, a one-time verification code field, the customer's phone number, and their date of birth. Using Create UI.",
|
|
125
|
+
"expected_output": "Each field uses the purpose-built control - CreditCardInput, InputOTP, PhoneInput, DateInput - inside FieldGroup/Field, never a plain Input with hand-rolled masking.",
|
|
126
|
+
"files": [],
|
|
127
|
+
"expectations": [
|
|
128
|
+
"Card number uses CreditCardInput (not a raw Input with manual formatting)",
|
|
129
|
+
"The verification code uses InputOTP",
|
|
130
|
+
"Phone number uses PhoneInput and date of birth uses DateInput - not plain Inputs",
|
|
131
|
+
"Fields are laid out with FieldGroup + Field (size/state cascade from Field), with FieldLabel wired via htmlFor",
|
|
132
|
+
"No invented or shadcn-style components (no DatePicker, no PhoneNumberInput) - only the registry's actual control names"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": 11,
|
|
137
|
+
"prompt": "Create a billing page with a table of recent invoices (date, amount, status, and a row action menu), an empty state for when there are no invoices, and a 'Cancel subscription' action that asks the user to confirm before proceeding. Using Create UI.",
|
|
138
|
+
"expected_output": "A semantic <table> (no Table primitive) with Badge status cells and a DropdownMenu row action, a semantic empty-state surface, and a confirmation handled inline or via CommandDialog - not an invented Dialog/Card/Table component.",
|
|
139
|
+
"files": [],
|
|
140
|
+
"expectations": [
|
|
141
|
+
"The table is built from semantic markup (a real <table> with bg-weak header, border-light row separators) - there is no Table/DataTable component; cell content uses primitives (Badge for status, DropdownMenu or an iconOnly Button for the row action) rather than styled spans",
|
|
142
|
+
"No Card primitive is used or imported - surfaces are bg-static/bg-weakest panels with border-light and an elevation shadow",
|
|
143
|
+
"At the free tier there is no Dialog/Modal primitive: the cancel confirmation is surfaced inline (expanding section, dedicated step, or InlineAlert), via CommandDialog, or the answer notes Modal is Pro - it does not invent a Dialog/AlertDialog component",
|
|
144
|
+
"The empty state reuses the same surface with text-placeholder copy and a primary Button, not a bare 'No data' string or a fixed-height box with only a Spinner",
|
|
145
|
+
"Spacing uses gap-*/padding utilities, not space-y-*, and status colors use semantic tokens"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": 12,
|
|
150
|
+
"prompt": "Create a compact toolbar: an icon-only search button, an icon-only filter button, an icon-only overflow menu, and a view toggle between Grid and List shown as two icons. Make it accessible. Using Create UI.",
|
|
151
|
+
"expected_output": "Icon-only Buttons each with an aria-label, the overflow opening a DropdownMenu, and the view toggle a SegmentedControl with iconOnly items that each carry an aria-label - icons from @create-ui/assets/icons, no sizing classes.",
|
|
152
|
+
"files": [],
|
|
153
|
+
"expectations": [
|
|
154
|
+
"Every icon-only control has an aria-label (icon-only Buttons and iconOnly SegmentedControlItems) so it has an accessible name",
|
|
155
|
+
"Icon-only buttons pass the icon as the child with iconOnly set (leadingIcon is ignored in iconOnly mode), never as a leadingIcon",
|
|
156
|
+
"The Grid/List toggle is a SegmentedControl with value/onValueChange (or defaultValue), not two manually-toggled Buttons",
|
|
157
|
+
"The overflow menu uses DropdownMenu with DropdownMenuTrigger asChild around the icon button",
|
|
158
|
+
"Icons come from @create-ui/assets/icons (Ri*), with no size-4/w-4/h-4 sizing classes on icons inside components"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": 13,
|
|
163
|
+
"prompt": "Build a profile photo row for a settings page: the user's avatar on the left, and to its right a 'Profile photo' label with a 'Change' link under it. Make the avatar and the text/link sizes feel balanced and aligned. Using Create UI.",
|
|
164
|
+
"expected_output": "An items-center flex row with an Avatar (AvatarImage + AvatarText) as the visual anchor and a stacked label + TextLink whose sizes track one coherent scale (e.g. Avatar lg with text-body-sm + TextLink size=\"sm\"), spaced with gap-*.",
|
|
165
|
+
"files": [],
|
|
166
|
+
"expectations": [
|
|
167
|
+
"The row uses flex items-center so the avatar aligns to the optical center of the text block, with a gap-* between them (not margins)",
|
|
168
|
+
"The avatar is the Avatar component with AvatarText for initials (not AvatarFallback) and is the visual anchor of the cluster",
|
|
169
|
+
"The label text token and the TextLink size sit on one coherent scale (e.g. text-body-sm paired with TextLink size=\"sm\"), rather than mismatched sizes - and the answer does not assume Avatar and TextLink share the same size name to align",
|
|
170
|
+
"The change affordance is a TextLink (with a variant/size), not a styled <a> or a Button",
|
|
171
|
+
"Sizes are harmonized by optical height, not by blindly matching size prop names across the Avatar and TextLink"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": 14,
|
|
176
|
+
"prompt": "Create the action bar for an account settings form (a plain app screen, not a marketing page): a 'Save changes' button, a 'Cancel' button, and a 'Delete account' button. Using Create UI.",
|
|
177
|
+
"expected_output": "Buttons whose props reflect their distinct roles - one solid primary Save, a non-solid secondary Cancel, and a danger Delete - not three identical default buttons.",
|
|
178
|
+
"files": [],
|
|
179
|
+
"expectations": [
|
|
180
|
+
"Save is the single primary action: variant=\"primary\" appearance=\"solid\" - and it is the only solid button in the bar",
|
|
181
|
+
"Cancel is visually secondary (appearance=\"outline\" / \"soft\" / \"ghost\"), never a second solid button",
|
|
182
|
+
"Delete account uses variant=\"danger\" (not a default neutral button, and not variant=\"destructive\" which does not exist)",
|
|
183
|
+
"The three buttons are NOT all left at the same default size+variant - their props differ to express primary vs secondary vs destructive roles, even though this is plain app UI rather than a showcase",
|
|
184
|
+
"Sizes are deliberate and consistent for the cluster (not a mix of unrelated sizes), and any icons go through leadingIcon/trailingIcon"
|
|
185
|
+
]
|
|
109
186
|
}
|
|
110
187
|
]
|
|
111
188
|
}
|
|
@@ -48,34 +48,27 @@ The generated config always runs `npx @create-ui/cli mcp` (the package is `@crea
|
|
|
48
48
|
|
|
49
49
|
## Recommended workflow for writing UI
|
|
50
50
|
|
|
51
|
-
1. `
|
|
52
|
-
2. `
|
|
53
|
-
3.
|
|
54
|
-
4. `
|
|
55
|
-
5. `
|
|
51
|
+
1. **`get_component_reference` BEFORE writing code for any component whose Create UI API you haven't already confirmed this session** - pass a name or keyword (`"tab-menu"`, `"tabs"`, `"removable tag"`). Call it with an **empty query** first to get the catalog of every component and whether the current user can use each one (free / pro / locked). Create UI APIs differ from shadcn; do not guess. Offline fallback when the MCP is unavailable: `npx @create-ui/cli view <name>`.
|
|
52
|
+
2. `get_item_examples_from_registries` for full working demos of an item you haven't used - query `"<name>-demo"` (canonical usage), `"<name>-example"` (full gallery), or facet names like `"switch-thumb-icon"`, `"segmented-control-appearance"`. The reference is the concise API + gotchas; examples are the full galleries - they complement.
|
|
53
|
+
3. `view_items_in_registries` when you need the raw component source.
|
|
54
|
+
4. `search_items_in_registries` for a broader or cross-registry search.
|
|
55
|
+
5. Install with `npx @create-ui/cli add <items>` - never import a component that hasn't been added.
|
|
56
|
+
6. `get_audit_checklist` after generating code and fix anything it flags.
|
|
56
57
|
|
|
57
58
|
## Available Tools
|
|
58
59
|
|
|
59
|
-
The MCP server exposes
|
|
60
|
+
The MCP server exposes five tools. **`@createui` is the only registry** - it is built in and needs no configuration, and there are no other registries to add. Wherever a tool takes a `registries` array, pass `["@createui"]`.
|
|
60
61
|
|
|
61
|
-
###
|
|
62
|
+
### get_component_reference
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
**Inputs:** none
|
|
66
|
-
|
|
67
|
-
### list_items_in_registries
|
|
68
|
-
|
|
69
|
-
Lists all items available in the specified registries.
|
|
64
|
+
Fetches the auth-aware usage reference for a component: props/variants, 1-2 canonical snippets, when-to-use, and gotchas. Call it before writing code with any component whose API you have not confirmed this session. Accepts a name **or** a keyword; an **empty query returns the catalog** of every component with its tier and whether the current user can use it (free / pro / locked). This is the concise API; `get_item_examples_from_registries` is the full gallery. Auth-aware: a logged-in seat holder gets the richer pro reference, everyone else gets the free tier (or a locked upsell for pro-only components).
|
|
70
65
|
|
|
71
66
|
**Inputs:**
|
|
72
|
-
- `
|
|
73
|
-
- `limit` (number, optional)
|
|
74
|
-
- `offset` (number, optional)
|
|
67
|
+
- `query` (string, optional) - component name or keyword; empty string returns the catalog
|
|
75
68
|
|
|
76
69
|
### search_items_in_registries
|
|
77
70
|
|
|
78
|
-
Searches for items across registries by query string.
|
|
71
|
+
Searches for items across registries by query string (fuzzy match over names and descriptions). Use for a broad or cross-registry search; for a single component's usage prefer `get_component_reference`.
|
|
79
72
|
|
|
80
73
|
**Inputs:**
|
|
81
74
|
- `registries` (string[])
|
|
@@ -85,7 +78,7 @@ Searches for items across registries by query string.
|
|
|
85
78
|
|
|
86
79
|
### view_items_in_registries
|
|
87
80
|
|
|
88
|
-
Returns detailed information about specific items, including file contents.
|
|
81
|
+
Returns detailed information about specific items, including file contents (the raw source). For *usage* (props, composition, icon props) use `get_component_reference` instead - source alone does not show canonical usage.
|
|
89
82
|
|
|
90
83
|
**Inputs:**
|
|
91
84
|
- `items` (string[]) - bare item names, e.g. `button` (the MCP server also accepts a `@createui/` prefix and strips it)
|
|
@@ -98,13 +91,6 @@ Finds example and demo code for items with full source. Call it before the first
|
|
|
98
91
|
- `registries` (string[])
|
|
99
92
|
- `query` (string)
|
|
100
93
|
|
|
101
|
-
### get_add_command_for_items
|
|
102
|
-
|
|
103
|
-
Returns the `add` command for the specified items.
|
|
104
|
-
|
|
105
|
-
**Inputs:**
|
|
106
|
-
- `items` (string[])
|
|
107
|
-
|
|
108
94
|
### get_audit_checklist
|
|
109
95
|
|
|
110
96
|
Returns a checklist to verify after adding components.
|