@achmadalimin/ui-kit-mcp 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -4
- package/data/components.json +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @achmadalimin/ui-kit-mcp
|
|
2
2
|
|
|
3
3
|
Make the [@achmadalimin/ui-kit](https://achmadalimin.com/design-system) design
|
|
4
|
-
system AI-native. This MCP server gives Claude, Cursor, and Windsurf the
|
|
5
|
-
component markup and design tokens — so when you ask your AI to build UI
|
|
6
|
-
Achmad's design system," it uses the actual `ui-kit` components instead of
|
|
4
|
+
system AI-native. This MCP server gives Claude, Codex, Cursor, and Windsurf the
|
|
5
|
+
**real** component markup and design tokens — so when you ask your AI to build UI
|
|
6
|
+
"using Achmad's design system," it uses the actual `ui-kit` components instead of
|
|
7
7
|
inventing generic markup.
|
|
8
8
|
|
|
9
9
|
Free and open. No license key, no account, no network calls — the component
|
|
@@ -21,7 +21,7 @@ catalog ships inside the package.
|
|
|
21
21
|
## Requirements
|
|
22
22
|
|
|
23
23
|
- Node.js 18+
|
|
24
|
-
- Claude Desktop, Cursor, or Windsurf
|
|
24
|
+
- Claude Desktop, Codex, Cursor, or Windsurf
|
|
25
25
|
|
|
26
26
|
## Setup
|
|
27
27
|
|
|
@@ -43,6 +43,19 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
|
|
|
43
43
|
|
|
44
44
|
Restart Claude Desktop.
|
|
45
45
|
|
|
46
|
+
### Codex
|
|
47
|
+
|
|
48
|
+
Codex uses TOML (not JSON). Edit `~/.codex/config.toml` (shared by the Codex app,
|
|
49
|
+
CLI, and IDE extension):
|
|
50
|
+
|
|
51
|
+
```toml
|
|
52
|
+
[mcp_servers.achmad-ui-kit]
|
|
53
|
+
command = "npx"
|
|
54
|
+
args = ["@achmadalimin/ui-kit-mcp"]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or run `codex mcp add achmad-ui-kit -- npx @achmadalimin/ui-kit-mcp`, then restart Codex.
|
|
58
|
+
|
|
46
59
|
### Cursor
|
|
47
60
|
|
|
48
61
|
Edit `~/.cursor/mcp.json`:
|
package/data/components.json
CHANGED
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
"classes": ["ui-modal-overlay", "ui-modal-overlay.open", "ui-modal", "ui-modal-title", "ui-modal-body", "ui-modal-actions", "ui-modal-btn", "ui-modal-btn--cancel", "ui-modal-btn--confirm"],
|
|
60
60
|
"html": "<!-- Trigger -->\n<button class=\"ui-btn ui-btn--primary\" onclick=\"document.getElementById('myModal').classList.add('open')\">\n Open modal\n</button>\n\n<!-- Modal -->\n<div class=\"ui-modal-overlay\" id=\"myModal\">\n <div class=\"ui-modal\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"ui-modal-title\">Modal title</p>\n <p class=\"ui-modal-body\">Modal content goes here.</p>\n <div class=\"ui-modal-actions\">\n <button class=\"ui-modal-btn ui-modal-btn--cancel\" onclick=\"document.getElementById('myModal').classList.remove('open')\">Cancel</button>\n <button class=\"ui-modal-btn ui-modal-btn--confirm\">Confirm</button>\n </div>\n </div>\n</div>"
|
|
61
61
|
},
|
|
62
|
+
{
|
|
63
|
+
"name": "pager",
|
|
64
|
+
"title": "Pager",
|
|
65
|
+
"description": "Compact previous / next control with a center divider, for stepping through paged content like carousels or empty-state demos. Add the disabled attribute to an arrow at the ends of the range. CSS-only — wire your own click handlers.",
|
|
66
|
+
"classes": ["ui-pager", "ui-pager-btn", "ui-pager-divider"],
|
|
67
|
+
"html": "<div class=\"ui-pager\" role=\"group\" aria-label=\"Pages\">\n <button class=\"ui-pager-btn\" type=\"button\" aria-label=\"Previous\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M15 6l-6 6 6 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </button>\n <span class=\"ui-pager-divider\" aria-hidden=\"true\"></span>\n <button class=\"ui-pager-btn\" type=\"button\" aria-label=\"Next\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M9 6l6 6-6 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </button>\n</div>\n\n<!-- Disable an arrow at the end of the range -->\n<button class=\"ui-pager-btn\" type=\"button\" aria-label=\"Previous\" disabled>...</button>"
|
|
68
|
+
},
|
|
62
69
|
{
|
|
63
70
|
"name": "tabs",
|
|
64
71
|
"title": "Tabs",
|
|
@@ -67,6 +74,13 @@
|
|
|
67
74
|
"html": "<div class=\"ui-tabs\">\n <div class=\"ui-tabs-list\" role=\"tablist\">\n <div class=\"ui-tabs-slider\"></div>\n <button class=\"ui-tab-trigger active\" aria-selected=\"true\" role=\"tab\">Overview</button>\n <button class=\"ui-tab-trigger\" aria-selected=\"false\" role=\"tab\">Details</button>\n <button class=\"ui-tab-trigger\" aria-selected=\"false\" role=\"tab\">Settings</button>\n </div>\n <div class=\"ui-tab-panel active\">Overview content</div>\n <div class=\"ui-tab-panel\">Details content</div>\n <div class=\"ui-tab-panel\">Settings content</div>\n</div>",
|
|
68
75
|
"script": "document.querySelectorAll(\".ui-tabs\").forEach(tabs => {\n const list = tabs.querySelector(\".ui-tabs-list\");\n const slider = list.querySelector(\".ui-tabs-slider\");\n const triggers = list.querySelectorAll(\".ui-tab-trigger\");\n const panels = tabs.querySelectorAll(\".ui-tab-panel\");\n function moveSlider(btn) {\n slider.style.width = btn.offsetWidth + \"px\";\n slider.style.transform = \"translateX(\" + (btn.offsetLeft - 2) + \"px)\";\n }\n slider.style.transition = \"none\";\n const initial = list.querySelector(\".ui-tab-trigger.active\");\n if (initial) requestAnimationFrame(() => { moveSlider(initial); requestAnimationFrame(() => { slider.style.transition = \"\"; }); });\n triggers.forEach((t, i) => t.addEventListener(\"click\", () => {\n triggers.forEach(x => { x.classList.remove(\"active\"); x.setAttribute(\"aria-selected\", \"false\"); });\n panels.forEach(p => p.classList.remove(\"active\"));\n t.classList.add(\"active\"); t.setAttribute(\"aria-selected\", \"true\");\n panels[i].classList.add(\"active\");\n moveSlider(t);\n }));\n});"
|
|
69
76
|
},
|
|
77
|
+
{
|
|
78
|
+
"name": "toggle",
|
|
79
|
+
"title": "Toggle",
|
|
80
|
+
"description": "On / off switch built from a visually-hidden checkbox, so it stays keyboard-accessible and form-friendly. Wrap it in a <label> so the text toggles the switch too. Add checked for on, disabled for the disabled state. CSS-only — no script needed.",
|
|
81
|
+
"classes": ["ui-toggle", "ui-toggle-switch", "ui-toggle-label"],
|
|
82
|
+
"html": "<label class=\"ui-toggle\">\n <input type=\"checkbox\" />\n <span class=\"ui-toggle-switch\" aria-hidden=\"true\"></span>\n <span class=\"ui-toggle-label\">Show the empty state</span>\n</label>\n\n<!-- On by default -->\n<label class=\"ui-toggle\">\n <input type=\"checkbox\" checked />\n <span class=\"ui-toggle-switch\" aria-hidden=\"true\"></span>\n <span class=\"ui-toggle-label\">On by default</span>\n</label>\n\n<!-- Disabled -->\n<label class=\"ui-toggle\">\n <input type=\"checkbox\" disabled />\n <span class=\"ui-toggle-switch\" aria-hidden=\"true\"></span>\n <span class=\"ui-toggle-label\">Disabled</span>\n</label>"
|
|
83
|
+
},
|
|
70
84
|
{
|
|
71
85
|
"name": "tooltip",
|
|
72
86
|
"title": "Tooltip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@achmadalimin/ui-kit-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Make Achmad Alimin's design system (@achmadalimin/ui-kit) AI-native. Gives Claude, Cursor, and Windsurf the real component markup and tokens via the Model Context Protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|