@twoux/ui 0.0.0-stage → 0.1.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/LICENSE.md +61 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/NOTICE.md +64 -0
- package/README.md +211 -2
- package/SHADCN-DIFF.md +228 -0
- package/agent/AGENTS.md +358 -0
- package/agent/docs-md/accessibility.md +49 -0
- package/agent/docs-md/action-catalogue.md +81 -0
- package/agent/docs-md/actions.md +74 -0
- package/agent/docs-md/agent-activity-log.md +70 -0
- package/agent/docs-md/agent-permissions.md +82 -0
- package/agent/docs-md/agent-run.md +90 -0
- package/agent/docs-md/agents-on-behalf.md +74 -0
- package/agent/docs-md/ai-column.md +85 -0
- package/agent/docs-md/ai-origin-label.md +70 -0
- package/agent/docs-md/announcing-features.md +73 -0
- package/agent/docs-md/answer-actions.md +81 -0
- package/agent/docs-md/app-shell.md +114 -0
- package/agent/docs-md/artifact-card.md +89 -0
- package/agent/docs-md/ask-on-screen.md +72 -0
- package/agent/docs-md/assistant-page.md +100 -0
- package/agent/docs-md/assistant-panel.md +142 -0
- package/agent/docs-md/avatar.md +82 -0
- package/agent/docs-md/banner.md +106 -0
- package/agent/docs-md/board.md +163 -0
- package/agent/docs-md/breadcrumb.md +89 -0
- package/agent/docs-md/breakdown-table.md +97 -0
- package/agent/docs-md/bulk-action-bar.md +112 -0
- package/agent/docs-md/button.md +293 -0
- package/agent/docs-md/card.md +115 -0
- package/agent/docs-md/change-list.md +99 -0
- package/agent/docs-md/change-request.md +166 -0
- package/agent/docs-md/chart-area.md +87 -0
- package/agent/docs-md/chart-bar.md +100 -0
- package/agent/docs-md/chart-box-plot.md +88 -0
- package/agent/docs-md/chart-bullet.md +89 -0
- package/agent/docs-md/chart-candlestick.md +112 -0
- package/agent/docs-md/chart-card-line.md +120 -0
- package/agent/docs-md/chart-donut.md +90 -0
- package/agent/docs-md/chart-drill-down.md +72 -0
- package/agent/docs-md/chart-funnel.md +71 -0
- package/agent/docs-md/chart-heatmap.md +76 -0
- package/agent/docs-md/chart-histogram.md +81 -0
- package/agent/docs-md/chart-map.md +165 -0
- package/agent/docs-md/chart-mixed.md +88 -0
- package/agent/docs-md/chart-price.md +92 -0
- package/agent/docs-md/chart-radial-bars.md +109 -0
- package/agent/docs-md/chart-radial-lines.md +111 -0
- package/agent/docs-md/chart-sankey.md +104 -0
- package/agent/docs-md/chart-scatter.md +87 -0
- package/agent/docs-md/chart-share-bar.md +89 -0
- package/agent/docs-md/chart-treemap.md +98 -0
- package/agent/docs-md/chart-waterfall.md +93 -0
- package/agent/docs-md/checkbox.md +131 -0
- package/agent/docs-md/choosing-selection-control.md +71 -0
- package/agent/docs-md/citations-sources.md +79 -0
- package/agent/docs-md/citing-sources.md +63 -0
- package/agent/docs-md/clarify-before-acting.md +69 -0
- package/agent/docs-md/clarifying-question.md +92 -0
- package/agent/docs-md/code-block.md +174 -0
- package/agent/docs-md/colours.md +87 -0
- package/agent/docs-md/columns-menu.md +140 -0
- package/agent/docs-md/combobox.md +161 -0
- package/agent/docs-md/command-palette.md +126 -0
- package/agent/docs-md/confidence-note.md +87 -0
- package/agent/docs-md/configurable-dashboard.md +76 -0
- package/agent/docs-md/confirmation-dialog.md +93 -0
- package/agent/docs-md/connected-tools.md +80 -0
- package/agent/docs-md/connector-picker.md +127 -0
- package/agent/docs-md/consistency.md +53 -0
- package/agent/docs-md/content-density.md +61 -0
- package/agent/docs-md/conversation-history.md +78 -0
- package/agent/docs-md/create-record.md +80 -0
- package/agent/docs-md/csv-import.md +88 -0
- package/agent/docs-md/dashboard-items.md +78 -0
- package/agent/docs-md/data-export.md +61 -0
- package/agent/docs-md/data-grid.md +137 -0
- package/agent/docs-md/data-vis-colours.md +76 -0
- package/agent/docs-md/data-visualisation.md +76 -0
- package/agent/docs-md/date-picker.md +178 -0
- package/agent/docs-md/delete-record.md +75 -0
- package/agent/docs-md/dense-table.md +495 -0
- package/agent/docs-md/design-tokens.md +53 -0
- package/agent/docs-md/disabled-read-only.md +75 -0
- package/agent/docs-md/drag-and-drop.md +74 -0
- package/agent/docs-md/dropdown-menu.md +137 -0
- package/agent/docs-md/edit-record.md +73 -0
- package/agent/docs-md/empty-loading-error.md +78 -0
- package/agent/docs-md/empty-state.md +128 -0
- package/agent/docs-md/error-messages.md +75 -0
- package/agent/docs-md/error-state.md +123 -0
- package/agent/docs-md/export-menu.md +86 -0
- package/agent/docs-md/feedback-prompt.md +88 -0
- package/agent/docs-md/field-mapping.md +78 -0
- package/agent/docs-md/file-drop.md +110 -0
- package/agent/docs-md/filter-bar.md +138 -0
- package/agent/docs-md/filter-panel.md +103 -0
- package/agent/docs-md/filtering-search.md +79 -0
- package/agent/docs-md/follow-ups-starters.md +79 -0
- package/agent/docs-md/form-validation.md +95 -0
- package/agent/docs-md/generated-columns.md +65 -0
- package/agent/docs-md/generated-drafts-files.md +71 -0
- package/agent/docs-md/grouped-list.md +89 -0
- package/agent/docs-md/guide-cue.md +170 -0
- package/agent/docs-md/help-panel.md +103 -0
- package/agent/docs-md/help-system.md +74 -0
- package/agent/docs-md/iconography.md +49 -0
- package/agent/docs-md/inbox.md +108 -0
- package/agent/docs-md/inline-editing-validation.md +80 -0
- package/agent/docs-md/inline-input-in-answer.md +70 -0
- package/agent/docs-md/items-palette.md +116 -0
- package/agent/docs-md/keyboard-model.md +47 -0
- package/agent/docs-md/keyboard-navigation.md +68 -0
- package/agent/docs-md/keyboard-shortcut-hint.md +87 -0
- package/agent/docs-md/keyboard-shortcut-sheet.md +90 -0
- package/agent/docs-md/labelling-ai-output.md +66 -0
- package/agent/docs-md/layout.md +47 -0
- package/agent/docs-md/list-table.md +254 -0
- package/agent/docs-md/loading-skeleton.md +91 -0
- package/agent/docs-md/managing-agents.md +71 -0
- package/agent/docs-md/message-composer.md +105 -0
- package/agent/docs-md/migrating.md +49 -0
- package/agent/docs-md/motion.md +93 -0
- package/agent/docs-md/navigation.md +76 -0
- package/agent/docs-md/notification-channels.md +65 -0
- package/agent/docs-md/notifications-decision.md +100 -0
- package/agent/docs-md/onboarding-step.md +114 -0
- package/agent/docs-md/order-book.md +108 -0
- package/agent/docs-md/page-header.md +96 -0
- package/agent/docs-md/pagination.md +88 -0
- package/agent/docs-md/pane-layout.md +105 -0
- package/agent/docs-md/period-comparison.md +66 -0
- package/agent/docs-md/plan-card.md +120 -0
- package/agent/docs-md/popover-rules.md +88 -0
- package/agent/docs-md/prompt-editor.md +90 -0
- package/agent/docs-md/propose-apply.md +65 -0
- package/agent/docs-md/provider-logo.md +97 -0
- package/agent/docs-md/radio.md +83 -0
- package/agent/docs-md/ranked-list.md +102 -0
- package/agent/docs-md/reasoning-progress.md +72 -0
- package/agent/docs-md/record-detail.md +71 -0
- package/agent/docs-md/regenerating-answers.md +70 -0
- package/agent/docs-md/run-status-bar.md +94 -0
- package/agent/docs-md/saved-tasks-schedules.md +63 -0
- package/agent/docs-md/saved-views.md +149 -0
- package/agent/docs-md/saving-views.md +68 -0
- package/agent/docs-md/scheduler.md +258 -0
- package/agent/docs-md/secondary-panels.md +72 -0
- package/agent/docs-md/segmented-control.md +88 -0
- package/agent/docs-md/selection-bulk-actions.md +70 -0
- package/agent/docs-md/separator.md +75 -0
- package/agent/docs-md/setup-checklist.md +92 -0
- package/agent/docs-md/shape-elevation.md +55 -0
- package/agent/docs-md/sheet-grid.md +211 -0
- package/agent/docs-md/side-panel.md +134 -0
- package/agent/docs-md/sign-in.md +114 -0
- package/agent/docs-md/spacing.md +55 -0
- package/agent/docs-md/split-button.md +100 -0
- package/agent/docs-md/stat-compare.md +82 -0
- package/agent/docs-md/static-dashboard.md +75 -0
- package/agent/docs-md/status-badge.md +140 -0
- package/agent/docs-md/step-card.md +75 -0
- package/agent/docs-md/stepper.md +92 -0
- package/agent/docs-md/suggested-changes.md +91 -0
- package/agent/docs-md/switch.md +78 -0
- package/agent/docs-md/table-settings.md +81 -0
- package/agent/docs-md/tabs.md +85 -0
- package/agent/docs-md/tag-input.md +108 -0
- package/agent/docs-md/tag.md +79 -0
- package/agent/docs-md/task-builder.md +87 -0
- package/agent/docs-md/team-instructions.md +72 -0
- package/agent/docs-md/templates-gallery.md +85 -0
- package/agent/docs-md/text-input.md +160 -0
- package/agent/docs-md/thinking-steps.md +89 -0
- package/agent/docs-md/timeline.md +189 -0
- package/agent/docs-md/timestamp.md +84 -0
- package/agent/docs-md/timestamps.md +70 -0
- package/agent/docs-md/toast.md +117 -0
- package/agent/docs-md/tooltip.md +90 -0
- package/agent/docs-md/typography.md +62 -0
- package/agent/docs-md/undo-destructive.md +66 -0
- package/agent/docs-md/unsaved-changes.md +71 -0
- package/agent/docs-md/usage-meter.md +80 -0
- package/agent/docs-md/user-feedback.md +71 -0
- package/agent/docs-md/voice-and-tone.md +60 -0
- package/agent/docs-md/why-choice.md +93 -0
- package/agent/docs-md/workspace-onboarding.md +74 -0
- package/agent/docs-md/writing.md +48 -0
- package/agent/llms-full.txt +18369 -0
- package/agent/llms.txt +198 -0
- package/agent/skills/twoux-audit/SKILL.md +49 -0
- package/agent/skills/twoux-build/SKILL.md +39 -0
- package/agent/skills/twoux-design/SKILL.md +54 -0
- package/agent/skills/twoux-write/SKILL.md +32 -0
- package/bin/check.mjs +123 -0
- package/bin/docs.mjs +24 -0
- package/bin/guard.mjs +27 -0
- package/bin/init.mjs +113 -0
- package/bin/knowledge.mjs +87 -0
- package/bin/mcp.mjs +116 -0
- package/bin/theme.mjs +168 -0
- package/bin/twoux.mjs +25 -0
- package/package.json +80 -3
- package/registry/jobs.json +1028 -0
- package/registry/palette.json +770 -0
- package/registry/rules.json +913 -0
- package/src/components/agent-review.tsx +364 -0
- package/src/components/ai-basics.tsx +212 -0
- package/src/components/ai-work.tsx +304 -0
- package/src/components/ai.tsx +227 -0
- package/src/components/alert-dialog.tsx +203 -0
- package/src/components/alert.tsx +86 -0
- package/src/components/avatar.tsx +114 -0
- package/src/components/badge.tsx +59 -0
- package/src/components/board.tsx +397 -0
- package/src/components/breadcrumb.tsx +114 -0
- package/src/components/button-group.tsx +90 -0
- package/src/components/button.tsx +109 -0
- package/src/components/calendar.tsx +247 -0
- package/src/components/card.tsx +102 -0
- package/src/components/chart-map.tsx +336 -0
- package/src/components/charts-more.tsx +1331 -0
- package/src/components/charts-radial.tsx +328 -0
- package/src/components/charts.tsx +390 -0
- package/src/components/checkbox.tsx +40 -0
- package/src/components/code.tsx +139 -0
- package/src/components/collapsible.tsx +37 -0
- package/src/components/combobox.tsx +339 -0
- package/src/components/command-extras.tsx +11 -0
- package/src/components/command.tsx +196 -0
- package/src/components/data-grid.tsx +213 -0
- package/src/components/data-table.tsx +334 -0
- package/src/components/data-views.tsx +740 -0
- package/src/components/date-picker.tsx +686 -0
- package/src/components/dense-table.tsx +207 -0
- package/src/components/dialog.tsx +162 -0
- package/src/components/dropdown-menu.tsx +264 -0
- package/src/components/empty.tsx +114 -0
- package/src/components/feedback-prompt.tsx +80 -0
- package/src/components/field.tsx +254 -0
- package/src/components/fields.tsx +112 -0
- package/src/components/flow.tsx +840 -0
- package/src/components/guide-cue.tsx +273 -0
- package/src/components/inbox.tsx +113 -0
- package/src/components/input-group.tsx +176 -0
- package/src/components/input.tsx +26 -0
- package/src/components/kbd.tsx +34 -0
- package/src/components/label.tsx +27 -0
- package/src/components/labels.tsx +176 -0
- package/src/components/motion.tsx +136 -0
- package/src/components/onboarding.tsx +454 -0
- package/src/components/order-book.tsx +185 -0
- package/src/components/pane-layout.tsx +417 -0
- package/src/components/popover.tsx +96 -0
- package/src/components/provider-logos.data.ts +49 -0
- package/src/components/radio-group.tsx +52 -0
- package/src/components/scheduler.tsx +997 -0
- package/src/components/segmented-control.tsx +28 -0
- package/src/components/select.tsx +195 -0
- package/src/components/separator.tsx +31 -0
- package/src/components/sheet.tsx +148 -0
- package/src/components/shell.tsx +426 -0
- package/src/components/shortcut-sheet.tsx +83 -0
- package/src/components/skeleton.tsx +18 -0
- package/src/components/sonner.tsx +107 -0
- package/src/components/spinner.tsx +13 -0
- package/src/components/split-button.tsx +58 -0
- package/src/components/stepper.tsx +78 -0
- package/src/components/switch.tsx +43 -0
- package/src/components/table.tsx +126 -0
- package/src/components/tabs.tsx +118 -0
- package/src/components/tag-input.tsx +253 -0
- package/src/components/textarea.tsx +21 -0
- package/src/components/theme.tsx +80 -0
- package/src/components/timeline.tsx +408 -0
- package/src/components/toggle-group.tsx +87 -0
- package/src/components/toggle.tsx +54 -0
- package/src/components/tooltip.tsx +65 -0
- package/src/components/workspace-actions.tsx +294 -0
- package/src/components/workspace-import.tsx +465 -0
- package/src/components/workspace.tsx +1884 -0
- package/src/index.ts +80 -0
- package/src/lib/active-indicator.tsx +53 -0
- package/src/lib/chart-kit.tsx +72 -0
- package/src/lib/cn.ts +6 -0
- package/src/lib/shortcuts.tsx +61 -0
- package/src/lib/workspace.tsx +10 -0
- package/src/shadcn/alert-dialog.tsx +196 -0
- package/src/shadcn/alert.tsx +65 -0
- package/src/shadcn/avatar.tsx +108 -0
- package/src/shadcn/badge.tsx +47 -0
- package/src/shadcn/breadcrumb.tsx +108 -0
- package/src/shadcn/button-group.tsx +83 -0
- package/src/shadcn/button.tsx +63 -0
- package/src/shadcn/calendar.tsx +220 -0
- package/src/shadcn/card.tsx +91 -0
- package/src/shadcn/checkbox.tsx +31 -0
- package/src/shadcn/collapsible.tsx +33 -0
- package/src/shadcn/command.tsx +184 -0
- package/src/shadcn/dialog.tsx +158 -0
- package/src/shadcn/dropdown-menu.tsx +256 -0
- package/src/shadcn/empty.tsx +103 -0
- package/src/shadcn/field.tsx +248 -0
- package/src/shadcn/input-group.tsx +170 -0
- package/src/shadcn/input.tsx +20 -0
- package/src/shadcn/kbd.tsx +28 -0
- package/src/shadcn/label.tsx +23 -0
- package/src/shadcn/popover.tsx +88 -0
- package/src/shadcn/radio-group.tsx +44 -0
- package/src/shadcn/select.tsx +189 -0
- package/src/shadcn/separator.tsx +27 -0
- package/src/shadcn/sheet.tsx +142 -0
- package/src/shadcn/skeleton.tsx +13 -0
- package/src/shadcn/sonner.tsx +40 -0
- package/src/shadcn/switch.tsx +34 -0
- package/src/shadcn/table.tsx +115 -0
- package/src/shadcn/tabs.tsx +90 -0
- package/src/shadcn/textarea.tsx +17 -0
- package/src/shadcn/toggle-group.tsx +83 -0
- package/src/shadcn/toggle.tsx +46 -0
- package/src/shadcn/tooltip.tsx +56 -0
- package/src/styles/palette.css +127 -0
- package/src/styles/theme.css +35 -0
- package/src/styles/twoux.css +236 -0
- package/theme.json +14 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# TwoUX Licence 1.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Giulia Pizzignacco. All rights reserved, except as granted below.
|
|
4
|
+
|
|
5
|
+
TwoUX is free to use. You may build and ship your own products with it, including commercial products and client work. You may not sell it, give it away or offer it as your own design system, UI kit or component library.
|
|
6
|
+
|
|
7
|
+
## 1. Definitions
|
|
8
|
+
|
|
9
|
+
"TwoUX" means everything in this repository and published from it: the component source code, styles, tokens and themes, the documentation, the examples and example apps, and the knowledge files written for people and coding agents (including AGENTS.md, CLAUDE.md, llms.txt, llms-full.txt, docs-md, the rules, the job table and the skills).
|
|
10
|
+
|
|
11
|
+
"Product" means a website, application, internal tool, service or other software that you, your employer or your client build and offer, whose main value comes from its own features and content rather than from TwoUX.
|
|
12
|
+
|
|
13
|
+
"You" means the person or organisation using TwoUX under this licence.
|
|
14
|
+
|
|
15
|
+
## 2. What you may do
|
|
16
|
+
|
|
17
|
+
Free of charge, worldwide and for as long as you follow this licence, you may:
|
|
18
|
+
|
|
19
|
+
1. Use, copy and modify TwoUX to design, build and run any number of Products, commercial or not.
|
|
20
|
+
2. Build Products for clients, and hand those Products, including the parts of TwoUX inside them, to the client, who may then use them under this licence.
|
|
21
|
+
3. Distribute TwoUX as part of a Product, in source or compiled form, as long as it is not offered as a separate kit or library (see section 3) and this licence travels with the TwoUX files.
|
|
22
|
+
4. Let your coding agents and tools read TwoUX, including its knowledge files, to write code for your Products.
|
|
23
|
+
5. Fork the public repository to suggest changes back, or to keep a modified copy for your own Products.
|
|
24
|
+
|
|
25
|
+
## 3. What you may not do
|
|
26
|
+
|
|
27
|
+
You may not, whether you charge for it or not:
|
|
28
|
+
|
|
29
|
+
1. Sell, sublicense, rent or lease TwoUX, or any part of it, on its own.
|
|
30
|
+
2. Redistribute or publish TwoUX, a modified version of it, or a substantial part of it, as or inside a design system, UI kit, component library, template, theme, starter kit, code generator, design file or any other product whose main value is TwoUX itself.
|
|
31
|
+
3. Offer a service that lets other people generate, download or copy TwoUX components or knowledge files for their own use.
|
|
32
|
+
4. Use TwoUX, its documentation or its knowledge files to train, fine-tune or evaluate a machine learning model, or to build a dataset for that purpose. Agents reading the files to write code for your Products, as in section 2.4, is allowed.
|
|
33
|
+
5. Remove or change the copyright notice, this licence or the third-party notices.
|
|
34
|
+
|
|
35
|
+
## 4. Third-party software
|
|
36
|
+
|
|
37
|
+
TwoUX includes and is built on open-source software, such as shadcn/ui and Radix UI, under their own licences. Those parts stay under their own licences, listed in NOTICE.md. Nothing in this licence limits the rights those licences give you.
|
|
38
|
+
|
|
39
|
+
## 5. Name and logo
|
|
40
|
+
|
|
41
|
+
This licence does not give you any right to use the name TwoUX or its logo, except to say truthfully that your Product is built with TwoUX.
|
|
42
|
+
|
|
43
|
+
## 6. Ending the licence
|
|
44
|
+
|
|
45
|
+
If you break this licence, your rights under it end automatically. If you fix the breach within 30 days of first learning about it, your rights come back.
|
|
46
|
+
|
|
47
|
+
## 7. No warranty
|
|
48
|
+
|
|
49
|
+
To the extent the applicable law allows, TwoUX is provided "as is", without warranty of any kind, express or implied, including the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with TwoUX or its use.
|
|
50
|
+
|
|
51
|
+
## 8. Contributions
|
|
52
|
+
|
|
53
|
+
If you send a change, suggestion or other contribution to TwoUX, for example a pull request or an issue, you confirm that you have the right to send it, and you grant Giulia Pizzignacco a perpetual, worldwide, royalty-free and irrevocable licence to use, modify, sublicense and distribute it as part of TwoUX, under this licence or any other.
|
|
54
|
+
|
|
55
|
+
## 9. Governing law
|
|
56
|
+
|
|
57
|
+
This licence is governed by the laws of Portugal. The courts of Portugal have jurisdiction over any dispute arising from it or from the use of TwoUX. This does not remove any right the law of your country gives you to bring proceedings where you live.
|
|
58
|
+
|
|
59
|
+
## 10. Questions
|
|
60
|
+
|
|
61
|
+
If you are unsure whether your use is allowed, email hi@axdexpert.ai before you ship it.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
TwoUX is copyright (c) 2026 Giulia Pizzignacco and licensed under the TwoUX Licence (LICENSE.md). It includes, adapts or is generated from the open-source work below. Each keeps its own licence, and nothing in the TwoUX Licence limits the rights those licences give you.
|
|
4
|
+
|
|
5
|
+
## Included or adapted in TwoUX's own files
|
|
6
|
+
|
|
7
|
+
| Work | Licence | Used for |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| shadcn/ui, copyright (c) 2023 shadcn | MIT | Component source that TwoUX components are generated from and modify (see packages/ui/SHADCN-DIFF.md) |
|
|
10
|
+
| Impeccable, copyright 2025 Paul Bakaus | Apache 2.0 | Craft checks in the twoux-design skill, adapted and rewritten by Giulia Pizzignacco |
|
|
11
|
+
| board-components (Cloudscape), copyright Amazon.com, Inc. or its affiliates | Apache 2.0 | Board layout behaviour that the board component follows |
|
|
12
|
+
| SVG Logos by Gil Barbara, via Iconify | CC0 1.0 | Most service marks in provider-logos.data.ts |
|
|
13
|
+
| vscode-icons, copyright the vscode-icons contributors, via Iconify | MIT | Microsoft Excel, Word and Outlook marks |
|
|
14
|
+
| theSVG, copyright (c) 2025 thesvg.org, via Iconify | MIT | Google Sheets and Google Docs marks |
|
|
15
|
+
|
|
16
|
+
The source of every mark is recorded next to it in packages/ui/src/components/provider-logos.data.ts.
|
|
17
|
+
|
|
18
|
+
## Installed from npm as dependencies
|
|
19
|
+
|
|
20
|
+
Radix UI Primitives (MIT), Lucide (ISC), cmdk (MIT), Sonner (MIT), tw-animate-css (MIT), React Flow (MIT), react-day-picker (MIT), date-fns (MIT), d3-geo (ISC) and topojson-client (ISC). These are not copied into TwoUX; each package carries its own licence.
|
|
21
|
+
|
|
22
|
+
## Fonts
|
|
23
|
+
|
|
24
|
+
The docs site loads Geist and Geist Mono (SIL Open Font License 1.1) from Google Fonts. TwoUX does not include the font files.
|
|
25
|
+
|
|
26
|
+
## Trademarks
|
|
27
|
+
|
|
28
|
+
Third-party product names and marks belong to their owners. TwoUX shows them only to identify those products and services, unaltered. Their inclusion does not mean the owners endorse TwoUX.
|
|
29
|
+
|
|
30
|
+
## Licence texts
|
|
31
|
+
|
|
32
|
+
### Apache License 2.0
|
|
33
|
+
|
|
34
|
+
Impeccable and board-components: the full text is in LICENSES/Apache-2.0.txt.
|
|
35
|
+
|
|
36
|
+
### MIT License: shadcn/ui
|
|
37
|
+
|
|
38
|
+
Copyright (c) 2023 shadcn
|
|
39
|
+
|
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
41
|
+
|
|
42
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
43
|
+
|
|
44
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
45
|
+
|
|
46
|
+
### MIT License: vscode-icons
|
|
47
|
+
|
|
48
|
+
Copyright (c) The vscode-icons Contributors
|
|
49
|
+
|
|
50
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
55
|
+
|
|
56
|
+
### MIT License: theSVG
|
|
57
|
+
|
|
58
|
+
Copyright (c) 2025 thesvg.org
|
|
59
|
+
|
|
60
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
61
|
+
|
|
62
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
63
|
+
|
|
64
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,212 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://raw.githubusercontent.com/axdexpert/twoux/main/.github/assets/banner.png?v=2" alt="The TwoUX wordmark surrounded by TwoUX components: keyboard settings, a stat card, a twoux find command, status badges, a list table with two rows selected, the assistant composer and a suggested-changes proposal" width="100%">
|
|
4
|
+
|
|
5
|
+
# TwoUX
|
|
6
|
+
|
|
7
|
+
TwoUX is an engineering-first design system for complex apps that makes UI and UX decisions explicit<br>
|
|
8
|
+
for engineers and AI agents, and enforces quality before inconsistent experiences reach production.
|
|
9
|
+
|
|
10
|
+
**Currently in Beta** · Built on [shadcn/ui](https://ui.shadcn.com) and [Radix](https://www.radix-ui.com), for [React 19+](https://react.dev) and [Tailwind CSS v4](https://tailwindcss.com)
|
|
11
|
+
|
|
12
|
+
<a href="https://www.npmjs.com/package/@twoux/ui"><img alt="npm version" src="https://img.shields.io/npm/v/@twoux/ui?label=npm&color=5753E0&logo=npm"></a>
|
|
13
|
+
<a href="https://github.com/axdexpert/twoux/blob/main/LICENSE.md"><img alt="Licence: free to use" src="https://img.shields.io/badge/licence-free_to_use-5753E0"></a>
|
|
14
|
+
<a href="#contributing"><img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen"></a>
|
|
15
|
+
|
|
16
|
+
<img alt="121 components" src="https://img.shields.io/badge/components-121-5753E0">
|
|
17
|
+
<img alt="46 patterns" src="https://img.shields.io/badge/patterns-46-5753E0">
|
|
18
|
+
<img alt="WCAG 2.2 AA" src="https://img.shields.io/badge/WCAG-2.2_AA-00704A">
|
|
19
|
+
<a href="#connect-over-mcp"><img alt="MCP server included" src="https://img.shields.io/badge/MCP-server_included-17171F"></a>
|
|
20
|
+
|
|
21
|
+
**[Quick start](#quick-start-with-your-agent)** · **[Rules for agents](https://github.com/axdexpert/twoux/blob/main/AGENTS.md)** · **[Every page](https://github.com/axdexpert/twoux/blob/main/llms.txt)** · **[Why TwoUX](#why-twoux)** · **[Contributing](#contributing)** · **[Licence](https://github.com/axdexpert/twoux/blob/main/LICENSE.md)**
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
Engineers now build UI through coding agents, often with no designer in the loop and no Figma file to check against. Design systems ship components, not decisions, so the agent picks the nearest piece and fills every gap with a guess. TwoUX writes those decisions down: which component fits which job, how a flow behaves, when to confirm and when to offer Undo, each grounded in published usability research, WCAG, WAI-ARIA and the design systems of major SaaS products.
|
|
28
|
+
|
|
29
|
+
It ships 121 compact, keyboard-first components for dense B2B apps, 122 jobs, 46 patterns, light and dark themes, a theme generator that checks contrast, a lint, an MCP server and agent skills as one system. People and AI agents read the same rules and get the same answers.
|
|
30
|
+
|
|
31
|
+
**What makes TwoUX different:**
|
|
32
|
+
|
|
33
|
+
- **Agent Experience on both sides.** The coding agent that builds the UI gets rules it can read and follow: `AGENTS.md`, `llms.txt`, a Markdown page per component and skills to build, audit and propose. The people who supervise agents inside the product get components for plans, approvals, run timelines and permissions.
|
|
34
|
+
- **A knowledge base, not a component list.** 122 jobs, each mapped to one component with what to use instead, and 46 patterns that walk through whole flows step by step. Every rule carries its reason and its numbered sources.
|
|
35
|
+
- **Complex, never complicated.** Dense tables, spreadsheet grids, charts and AI agent interfaces, compact and keyboard-first, in light and dark, with the right interactions, states and motion built in. WCAG 2.2 AA.
|
|
36
|
+
- **Guardrails over guidelines.** A lint for raw values and local copies, a Claude Code hook that blocks edits to the system, a browser audit for contrast, focus and spacing, and a theme file that refuses colours that fail WCAG.
|
|
37
|
+
|
|
38
|
+
## Quick start with your agent
|
|
39
|
+
|
|
40
|
+
Paste this into Claude Code, Cursor, Codex or Copilot:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Set up the TwoUX design system in this project.
|
|
44
|
+
1. Install @twoux/ui with this repo's package manager.
|
|
45
|
+
2. Run `npx twoux init`, then read node_modules/@twoux/ui/agent/AGENTS.md.
|
|
46
|
+
3. For every UI job, find the component with `npx twoux find "<job>"` (or the twoux MCP server's find_component tool) and read its page before writing code.
|
|
47
|
+
4. Before you finish, run `npx twoux check` and fix every error.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then give it your brand:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
Give this app our brand with TwoUX.
|
|
54
|
+
1. Set primary, radius and font in twoux.theme.json to match our brand.
|
|
55
|
+
2. Run `npx twoux theme`.
|
|
56
|
+
3. Import ./twoux-theme.css after @twoux/ui/styles.css.
|
|
57
|
+
If the generator refuses a colour for contrast, use the closest colour it accepts and tell me which.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Getting started
|
|
61
|
+
|
|
62
|
+
Requires React 19 and Tailwind CSS v4.
|
|
63
|
+
|
|
64
|
+
**1. Install**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install @twoux/ui
|
|
68
|
+
# or
|
|
69
|
+
pnpm add @twoux/ui
|
|
70
|
+
# or
|
|
71
|
+
yarn add @twoux/ui
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**2. Set up your agents**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx twoux init
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This adds the TwoUX rules to `AGENTS.md` and `CLAUDE.md`, connects the MCP server, and adds the TwoUX skills, a guard hook and `twoux.theme.json`. It never overwrites a file; it adds to what is there.
|
|
81
|
+
|
|
82
|
+
**3. Import the styles and use a component**
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
import '@twoux/ui/styles.css';
|
|
86
|
+
import { Button, Toaster, toast } from '@twoux/ui';
|
|
87
|
+
|
|
88
|
+
export function App() {
|
|
89
|
+
return (
|
|
90
|
+
<>
|
|
91
|
+
<Button shortcut="C" onClick={() => toast.success('Listing created')}>
|
|
92
|
+
New listing
|
|
93
|
+
</Button>
|
|
94
|
+
<Toaster />
|
|
95
|
+
</>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**4. Check before you merge**
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx twoux check
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Connect over MCP
|
|
107
|
+
|
|
108
|
+
`npx twoux init` connects it for you. To add it by hand:
|
|
109
|
+
|
|
110
|
+
| Tool | Command or file |
|
|
111
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| Claude Code | `claude mcp add twoux -- npx -y @twoux/ui mcp` |
|
|
113
|
+
| Codex | `codex mcp add twoux -- npx -y @twoux/ui mcp` |
|
|
114
|
+
| Cursor | `.cursor/mcp.json`: `{ "mcpServers": { "twoux": { "command": "npx", "args": ["-y", "@twoux/ui", "mcp"] } } }` |
|
|
115
|
+
| VS Code | `.vscode/mcp.json`: `{ "servers": { "twoux": { "type": "stdio", "command": "npx", "args": ["-y", "@twoux/ui", "mcp"] } } }` |
|
|
116
|
+
|
|
117
|
+
The server runs on your machine and reads only the installed package. Its tools: `find_component`, `get_doc`, `list_docs`, `get_rules` and `check`.
|
|
118
|
+
|
|
119
|
+
## The twoux command
|
|
120
|
+
|
|
121
|
+
| Command | What it does |
|
|
122
|
+
| ------------------------ | --------------------------------------------------------------------------------- |
|
|
123
|
+
| `npx twoux init` | Sets up the project for AI agents. `--principles` for an app not built with TwoUX |
|
|
124
|
+
| `npx twoux find "<job>"` | Names the component or pattern for a job, how to use it and what not to use |
|
|
125
|
+
| `npx twoux docs [id]` | Lists every page, or prints one. `docs rules` prints every rule |
|
|
126
|
+
| `npx twoux check` | Lints app code against TwoUX's rules. Exits 1 on errors |
|
|
127
|
+
| `npx twoux theme` | Builds `twoux-theme.css` from `twoux.theme.json`, checking contrast |
|
|
128
|
+
| `npx twoux mcp` | Runs the MCP server |
|
|
129
|
+
|
|
130
|
+
## Packages
|
|
131
|
+
|
|
132
|
+
| Package | Description |
|
|
133
|
+
| -------------------------- | ------------------------------------------------------------------------------- |
|
|
134
|
+
| [`@twoux/ui`](https://github.com/axdexpert/twoux/tree/main/packages/ui) | Components, tokens, styles, agent files, the `twoux` command and the MCP server |
|
|
135
|
+
| [`twoux`](https://github.com/axdexpert/twoux/tree/main/packages/twoux) | Runs `npx twoux` with the `@twoux/ui` installed in your project |
|
|
136
|
+
|
|
137
|
+
## Why TwoUX
|
|
138
|
+
|
|
139
|
+
### Building got faster and cheaper. So did inconsistency.
|
|
140
|
+
|
|
141
|
+
Building and shipping UI has never been faster or cheaper. Consistency didn't come with it. AI doesn't fix the mess, it scales it. Engineers build through coding agents, often with no designer in the loop and no Figma file to check against. But design systems ship components, not decisions. A button doesn't say when not to use it. So the agent picks the nearest piece and fills every gap with a guess.
|
|
142
|
+
|
|
143
|
+
Each guess looks fine on its own: a modal for record detail, a disabled submit, an error in a toast, a delete with no Undo. Together they turn one product into five. That debt shows up later as duplicated components, accessibility fixes and screens that each behave differently.
|
|
144
|
+
|
|
145
|
+
| | |
|
|
146
|
+
| ------ | ----------------------------------------------------------------------------- |
|
|
147
|
+
| **13** | engineers per designer in AI-company job postings¹ |
|
|
148
|
+
| **4×** | more cloned code since AI coding assistants² |
|
|
149
|
+
| **0** | rules on when not to use a dialog in the docs of popular component libraries³ |
|
|
150
|
+
|
|
151
|
+
<sub>¹ Applied Methods, analysis of 9,281 open roles at AI companies, 2026. ² GitClear, AI Copilot Code Quality 2025: 211M changed lines, 2020 to 2024. ³ Dialog pages of shadcn/ui and Radix, checked November 2026: API and examples, no guidance on when to use or avoid it.</sub>
|
|
152
|
+
|
|
153
|
+
The design systems out there weren't built for this. Most give you components, often basic ones, and stop there:
|
|
154
|
+
|
|
155
|
+
- **No Agent Experience.** Written for people browsing docs, not for an AI agent that needs rules it can read and follow.
|
|
156
|
+
- **Not built for complex B2B.** Buttons and cards, but not the dense tables, spreadsheet grids, dashboards and AI interfaces B2B products run on.
|
|
157
|
+
- **No logic, no UX.** What a component looks like, but not which job it's for, how the flow behaves, or when to confirm and when to offer Undo.
|
|
158
|
+
- **No guardrails.** Nothing stops an agent from inventing a grey, rebuilding a dropdown or shipping AI slop.
|
|
159
|
+
|
|
160
|
+
### Nobody needs more components
|
|
161
|
+
|
|
162
|
+
Engineers and product teams don't need more components. They need what the best UX designers and the design systems of market-leading products already know, written down where every agent can read it and every check can enforce it.
|
|
163
|
+
|
|
164
|
+
TwoUX is a research-backed knowledge base built on UX expertise. It decides the UX, not only the look: which component fits which job, how a flow behaves, when to confirm and when to offer Undo. None of it is an LLM's opinion. Every decision is grounded in published usability research, WCAG, WAI-ARIA and the design systems of major SaaS products, and every component page explains its decisions with numbered sources.
|
|
165
|
+
|
|
166
|
+
## Tested on real agents
|
|
167
|
+
|
|
168
|
+
Claude Opus, Sonnet and Haiku, given realistic developer requests in a TwoUX project and never told the rules, November 2026:
|
|
169
|
+
|
|
170
|
+
| Result | What it means |
|
|
171
|
+
| ------------ | --------------------------------------------------------------------------- |
|
|
172
|
+
| **0 of 14** | runs changed the design system without being asked |
|
|
173
|
+
| **10 of 10** | planted UX problems found by every model, including the 4 no linter can see |
|
|
174
|
+
| **3 of 3** | rebrands went through the theme file, not page-by-page overrides |
|
|
175
|
+
|
|
176
|
+
The four problems only the rules caught are the judgement calls a designer makes: a modal for record detail, a disabled submit, an error in a toast and a delete without Undo. When a developer insisted on editing a component directly, two of three models did, and `twoux check` caught both. Every failure became a new check.
|
|
177
|
+
|
|
178
|
+
## Built by a UX engineer, for engineers and their agents
|
|
179
|
+
|
|
180
|
+
TwoUX stands on the shoulders of the brilliant minds behind every source it cites. I started from a decade of UX decisions I kept explaining in reviews, and the mistakes I kept fixing in agent-written UI, then researched how standards and mature SaaS design systems solve each one. Each answer became a rule, a job or a pattern step, with its source (611 links, all checked).
|
|
181
|
+
|
|
182
|
+
Components are generated from shadcn's untouched source by a script, so the API stays familiar to engineers and agents. The docs site and the agent files come from the same content, so people and agents get the same answer.
|
|
183
|
+
|
|
184
|
+
Giulia Pizzignacco, founder and UX engineer
|
|
185
|
+
|
|
186
|
+
## Project structure
|
|
187
|
+
|
|
188
|
+
| Directory | Purpose |
|
|
189
|
+
| ----------------- | ------------------------------------------------------------------- |
|
|
190
|
+
| `apps/docs` | The docs site, with live examples and example apps |
|
|
191
|
+
| `apps/playground` | A sandbox app built only from TwoUX |
|
|
192
|
+
| `packages/ui` | The `@twoux/ui` package |
|
|
193
|
+
| `packages/twoux` | The `twoux` command package |
|
|
194
|
+
| `docs-md/` | One Markdown page per foundation, component and pattern, for agents |
|
|
195
|
+
| `scripts/` | Generators for the agent files, theme, palette and checks |
|
|
196
|
+
|
|
197
|
+
## Contributing
|
|
198
|
+
|
|
199
|
+
Issues and pull requests are welcome. By sending one, you agree to the contribution terms in section 8 of the licence.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
corepack enable
|
|
203
|
+
pnpm install
|
|
204
|
+
pnpm dev # docs site on http://localhost:3100
|
|
205
|
+
pnpm verify # type check, interaction, responsive and design checks
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
To report a security problem, follow [SECURITY.md](https://github.com/axdexpert/twoux/blob/main/SECURITY.md).
|
|
209
|
+
|
|
210
|
+
## Licence
|
|
211
|
+
|
|
212
|
+
Free to use under the [TwoUX Licence](https://github.com/axdexpert/twoux/blob/main/LICENSE.md): build and ship any number of your own products with it, including commercial products and client work. Don't sell or republish TwoUX, or a modified copy, as a design system, UI kit, template or component library, and don't train models on it. Third-party notices are in [NOTICE.md](https://github.com/axdexpert/twoux/blob/main/NOTICE.md).
|