@nexub/mcp 0.0.0-stage → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +40 -2
  2. package/dist/skill/SKILL.md +97 -0
  3. package/dist/skill/references/components/accordion.md +77 -0
  4. package/dist/skill/references/components/activity-feed.md +33 -0
  5. package/dist/skill/references/components/alert-dialog.md +48 -0
  6. package/dist/skill/references/components/alert.md +54 -0
  7. package/dist/skill/references/components/amount.md +34 -0
  8. package/dist/skill/references/components/auth-card.md +33 -0
  9. package/dist/skill/references/components/autocomplete.md +54 -0
  10. package/dist/skill/references/components/avatar-group.md +26 -0
  11. package/dist/skill/references/components/avatar.md +48 -0
  12. package/dist/skill/references/components/badge.md +71 -0
  13. package/dist/skill/references/components/banner.md +32 -0
  14. package/dist/skill/references/components/bento-grid.md +42 -0
  15. package/dist/skill/references/components/box.md +35 -0
  16. package/dist/skill/references/components/breadcrumb.md +61 -0
  17. package/dist/skill/references/components/button-group.md +43 -0
  18. package/dist/skill/references/components/button.md +118 -0
  19. package/dist/skill/references/components/callout.md +27 -0
  20. package/dist/skill/references/components/card.md +74 -0
  21. package/dist/skill/references/components/checkbox-card.md +49 -0
  22. package/dist/skill/references/components/checkbox.md +51 -0
  23. package/dist/skill/references/components/chip.md +35 -0
  24. package/dist/skill/references/components/citation.md +61 -0
  25. package/dist/skill/references/components/code-inline.md +25 -0
  26. package/dist/skill/references/components/collapsible.md +71 -0
  27. package/dist/skill/references/components/combobox.md +40 -0
  28. package/dist/skill/references/components/conversation.md +100 -0
  29. package/dist/skill/references/components/data-table.md +69 -0
  30. package/dist/skill/references/components/date-picker.md +56 -0
  31. package/dist/skill/references/components/date-range-picker.md +48 -0
  32. package/dist/skill/references/components/dialog.md +57 -0
  33. package/dist/skill/references/components/drawer.md +79 -0
  34. package/dist/skill/references/components/empty-state.md +77 -0
  35. package/dist/skill/references/components/error-state.md +37 -0
  36. package/dist/skill/references/components/error-summary.md +71 -0
  37. package/dist/skill/references/components/eyebrow-chip.md +28 -0
  38. package/dist/skill/references/components/filter-bar.md +36 -0
  39. package/dist/skill/references/components/filter-chip.md +26 -0
  40. package/dist/skill/references/components/flex.md +47 -0
  41. package/dist/skill/references/components/form-field.md +26 -0
  42. package/dist/skill/references/components/gradient-divider.md +13 -0
  43. package/dist/skill/references/components/grid.md +39 -0
  44. package/dist/skill/references/components/heading.md +46 -0
  45. package/dist/skill/references/components/helper-text.md +31 -0
  46. package/dist/skill/references/components/hover-card.md +34 -0
  47. package/dist/skill/references/components/icon-button.md +44 -0
  48. package/dist/skill/references/components/info-list.md +25 -0
  49. package/dist/skill/references/components/input.md +78 -0
  50. package/dist/skill/references/components/kbd.md +42 -0
  51. package/dist/skill/references/components/label.md +37 -0
  52. package/dist/skill/references/components/link.md +38 -0
  53. package/dist/skill/references/components/list-detail.md +27 -0
  54. package/dist/skill/references/components/media-card.md +61 -0
  55. package/dist/skill/references/components/message-bubble.md +68 -0
  56. package/dist/skill/references/components/money-input.md +30 -0
  57. package/dist/skill/references/components/motion-collapse.md +57 -0
  58. package/dist/skill/references/components/motion-fade.md +64 -0
  59. package/dist/skill/references/components/motion-scale.md +54 -0
  60. package/dist/skill/references/components/motion-slide.md +60 -0
  61. package/dist/skill/references/components/navigation-rail.md +29 -0
  62. package/dist/skill/references/components/notification-item.md +29 -0
  63. package/dist/skill/references/components/number-input.md +30 -0
  64. package/dist/skill/references/components/number-ticker.md +44 -0
  65. package/dist/skill/references/components/pagination.md +52 -0
  66. package/dist/skill/references/components/password-input.md +28 -0
  67. package/dist/skill/references/components/plan-card.md +34 -0
  68. package/dist/skill/references/components/popover.md +53 -0
  69. package/dist/skill/references/components/progress.md +39 -0
  70. package/dist/skill/references/components/prompt-input.md +95 -0
  71. package/dist/skill/references/components/radio-card.md +83 -0
  72. package/dist/skill/references/components/radio-group.md +57 -0
  73. package/dist/skill/references/components/rating.md +39 -0
  74. package/dist/skill/references/components/scroll-area.md +57 -0
  75. package/dist/skill/references/components/search-input.md +22 -0
  76. package/dist/skill/references/components/segmented-control.md +44 -0
  77. package/dist/skill/references/components/select.md +43 -0
  78. package/dist/skill/references/components/separator.md +30 -0
  79. package/dist/skill/references/components/settings-section.md +31 -0
  80. package/dist/skill/references/components/sheet.md +51 -0
  81. package/dist/skill/references/components/skeleton.md +38 -0
  82. package/dist/skill/references/components/slider.md +31 -0
  83. package/dist/skill/references/components/spinner.md +32 -0
  84. package/dist/skill/references/components/split-button.md +43 -0
  85. package/dist/skill/references/components/stack.md +35 -0
  86. package/dist/skill/references/components/stat-card.md +49 -0
  87. package/dist/skill/references/components/status-pill.md +37 -0
  88. package/dist/skill/references/components/step-indicator.md +29 -0
  89. package/dist/skill/references/components/streaming-text.md +53 -0
  90. package/dist/skill/references/components/switch.md +36 -0
  91. package/dist/skill/references/components/table.md +89 -0
  92. package/dist/skill/references/components/tabs.md +51 -0
  93. package/dist/skill/references/components/tag.md +25 -0
  94. package/dist/skill/references/components/text-gradient.md +30 -0
  95. package/dist/skill/references/components/text.md +45 -0
  96. package/dist/skill/references/components/textarea.md +40 -0
  97. package/dist/skill/references/components/thinking-indicator.md +50 -0
  98. package/dist/skill/references/components/toast.md +141 -0
  99. package/dist/skill/references/components/toggle-group.md +35 -0
  100. package/dist/skill/references/components/toggle.md +32 -0
  101. package/dist/skill/references/components/tooltip.md +34 -0
  102. package/dist/skill/references/components/user-card.md +27 -0
  103. package/dist/skill/references/components.md +192 -0
  104. package/dist/skill/references/tokens.md +234 -0
  105. package/package.json +41 -3
  106. package/src/cli.js +9 -0
  107. package/src/server.js +98 -0
package/README.md CHANGED
@@ -1,3 +1,41 @@
1
- # Temporary Holding Version
1
+ # @nexub/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ MCP server for the [Nexub Design System](https://nexub-ds-docs.pages.dev). It gives your AI coding tool the components, patterns, tokens and design rules of the release you install, so it builds UI with Nexub instead of generic Tailwind.
4
+
5
+ ## Setup
6
+
7
+ Claude Code:
8
+
9
+ ```bash
10
+ claude mcp add nexub-ds -- npx -y @nexub/mcp
11
+ ```
12
+
13
+ Cursor, Windsurf, VS Code or any client that takes an `mcpServers` config:
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "nexub-ds": { "command": "npx", "args": ["-y", "@nexub/mcp"] }
19
+ }
20
+ }
21
+ ```
22
+
23
+ Using Claude Code? The `nexub-ds` plugin ships the same content as a skill:
24
+
25
+ ```bash
26
+ claude plugin marketplace add Nexub-AI/nexub-ds
27
+ claude plugin install nexub-ds@nexub
28
+ ```
29
+
30
+ ## Tools
31
+
32
+ | Tool | Returns |
33
+ | --- | --- |
34
+ | `get_guidelines` | Setup, how to build a screen, Calm Depth principles, Liquid Glass and copy rules, review checklist |
35
+ | `list_components` | Every component and pattern, optionally filtered (`query: "table"`) |
36
+ | `get_component` | Props, import, examples, when to use and accessibility for one component (`name: "DatePicker"`) |
37
+ | `get_tokens` | Color roles, typography, spacing, shape, elevation, motion, with Tailwind utilities (`section: "Motion"`) |
38
+
39
+ ## Staying current
40
+
41
+ The server reports the reference of the version it was published with, and it is versioned with `@nexub/react`. `npx -y @nexub/mcp` always fetches the latest release. Pin `@nexub/mcp@<version>` to match an older install.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: nexub-ds
3
+ description: Build SaaS UI with the Nexub Design System (@nexub/react, @nexub/patterns, @nexub/tokens, @nexub/themes, @nexub/icons). Use when building or restyling any React screen, page, dashboard, form, settings page, auth flow, pricing page or component in a project that uses Nexub DS, or when the user asks for Nexub, Calm Depth or Liquid Glass UI.
4
+ license: MIT
5
+ ---
6
+
7
+ # Nexub Design System
8
+
9
+ Nexub DS is a token-driven React design system for SaaS products. The visual language is **Calm Depth**: tonal surfaces, one accent per view, spring motion, honest numbers. **Liquid Glass** is an optional material for the floating control layer.
10
+
11
+ Reference files (read only what the task needs):
12
+
13
+ - [references/components.md](references/components.md): every component and pattern, grouped by category. Start here.
14
+ - `references/components/<slug>.md`: props, examples, when to use and accessibility for one component. Read it before using a component you have not used yet in this session.
15
+ - [references/tokens.md](references/tokens.md): color roles, type roles, spacing, shape, elevation, motion, z-index.
16
+
17
+ ## 1. Check the setup first
18
+
19
+ Look for `@nexub/react` in `package.json`. If it is missing, set it up:
20
+
21
+ ```bash
22
+ npm install @nexub/react @nexub/patterns @nexub/themes @nexub/tokens @nexub/icons
23
+ ```
24
+
25
+ ```ts
26
+ // app entry or global CSS, once
27
+ import '@nexub/themes/base'; // resets + token CSS variables
28
+ import '@nexub/themes/light';
29
+ import '@nexub/themes/glass'; // only if you use Liquid Glass
30
+ ```
31
+
32
+ ```ts
33
+ // tailwind.config.ts (Tailwind v3)
34
+ import nexub from '@nexub/tokens/tailwind';
35
+ export default {
36
+ presets: [nexub],
37
+ content: [
38
+ './src/**/*.{ts,tsx}',
39
+ './node_modules/@nexub/react/dist/**/*.js',
40
+ './node_modules/@nexub/patterns/dist/**/*.js',
41
+ ],
42
+ };
43
+ ```
44
+
45
+ Wrap the app in `<ThemeProvider defaultTheme="system" storageKey="app-theme">` from `@nexub/react`. In server-rendered apps (Next.js), put `<ThemeScript storageKey="app-theme" />` in `<head>` and add `suppressHydrationWarning` to `<html>`. Product brands: set `data-product="leap" | "bookub" | "payub" | "founderub"` on the root. This remaps the `tertiary` role.
46
+
47
+ ## 2. How to build a screen
48
+
49
+ 1. **Start from a pattern.** Check the Patterns sections of `references/components.md` before you compose anything by hand.
50
+ 2. **Then use components.** Use `@nexub/react` for every control, overlay, layout primitive and piece of typography. Never hand-roll a button, input, dialog, menu or table that the library already has.
51
+ 3. **Then use tokens, only for the glue.** Use Tailwind utilities from the preset (`bg-surface-container-low`, `text-on-surface-variant`, `p-4`, `gap-6`, `rounded-shape-container`, `text-title-md`) or `var(--…)`.
52
+ 4. **Never hardcode design values.** That means no hex or rgb colors, no Tailwind palette colors (`bg-blue-500`, `text-gray-600`), no arbitrary px values (`p-[13px]`), no ad-hoc shadows or gradients.
53
+
54
+ Starting points for typical SaaS screens:
55
+
56
+ | Screen | Build with |
57
+ | --- | --- |
58
+ | App frame | `AppShell` (`AppShell.Root/Header/Body/Sidebar/Main`) + `Sidebar` or `NavigationRail` + `AppHeader` or `TopNav` |
59
+ | Dashboard | `PageHeader` + a `Grid` of `StatCard` + `DataTable` or `Table` + `ActivityFeed` |
60
+ | List / detail | `ListDetail` + `FilterBar` + `EmptyState` |
61
+ | Settings | `SettingsLayout` / `SettingsRow` + `SettingsSection` + `FormField` |
62
+ | Sign in / sign up | `AuthCard` + `FormField` + `PasswordInput` |
63
+ | Pricing / billing | `PlanCard` + `SegmentedControl` (monthly / yearly) + `Amount` |
64
+ | Onboarding | `StepIndicator` + `CheckList` |
65
+ | Search / commands | `CommandPalette` + `KeyboardShortcut` |
66
+ | Empty, loading, error | `EmptyState`, `Skeleton`, `ErrorState`, `Toast` |
67
+
68
+ Money: use `Amount` and `MoneyInput`. They use tabular figures, the currency's own minor unit and a true minus sign. Icons: import from `@nexub/icons`, not `lucide-react` directly.
69
+
70
+ ## 3. Calm Depth principles
71
+
72
+ 1. **Content leads, chrome recedes.** Navigation is quieter than content. Remove a divider before you add one; let spacing and tone separate regions. Do: a tonal sidebar with no border, where the active item is a soft pill. Don't: a saturated brand-blue sidebar item, or a hard line around every region.
73
+ 2. **Hierarchy through tone and layout, not decoration.** Surfaces step `surface` → `surface-container-*` → `surface-elevated`. Shadows are only for things that float. Product UI has no gradients, no colored icon tiles and no gradient eyebrow chips.
74
+ 3. **One accent, spent deliberately.** Each view gets one filled (primary) button. Everything else is `tonal`, `outlined` or `text`. Never put two filled buttons side by side.
75
+ 4. **Physical, interruptible motion.** Use the spring tokens (`ease-spatial-default duration-spatial-default`), not raw durations. Exits are faster than entrances. Honor `prefers-reduced-motion`.
76
+ 5. **Honest numbers and states.** Use tabular figures in data. Hover, pressed, selected and disabled are explicit component states. Never fake a state with opacity.
77
+ 6. **Accessible by construction.** Every role pair meets WCAG 2.2 AA in light, dark and high contrast, as long as you pair a role with its `on-` role. Keep visible focus, labelled controls (`FormField` + `Label`) and keyboard support. Use `VisuallyHidden` for icon-only labels.
78
+
79
+ ## 4. Liquid Glass rules
80
+
81
+ - Glass is for the floating control layer only: top bars, floating toolbars, popovers, menus, sheets, dialogs. Card glass is only for surfaces over imagery or media.
82
+ - Turn it on through props: `<TopNav.Root surface="glass" scrollEdge="soft">`, `<Dialog.Content surface="glass">`, `<Button variant="glass">`.
83
+ - Never put glass on glass. Show at most three glass layers at a time. Tint only the one primary action (`data-glass-tint="primary"`).
84
+ - Never put white text on glass over an unknown background.
85
+
86
+ ## 5. UI copy
87
+
88
+ Copy is clear, direct, human and confident. Use sentence case, active voice, contractions and specific verbs ("Save changes", not "Submit"). Errors say what happened and what to do: "Your session expired. Sign in again." No "Oops", no emoji in errors, no "Please be advised".
89
+
90
+ ## 6. Before you finish
91
+
92
+ - [ ] Every control comes from `@nexub/react` or `@nexub/patterns`. No deprecated component (see the index).
93
+ - [ ] There are no hex or rgb colors, Tailwind palette colors, arbitrary px values or custom shadows. Everything is a token utility or `var(--…)`.
94
+ - [ ] Every background role is paired with its `on-` role. Secondary text uses `on-surface-variant` or `on-surface-muted`.
95
+ - [ ] Each view has at most one filled button.
96
+ - [ ] The screen works in light and dark (`data-theme`) and at `data-contrast="high"`.
97
+ - [ ] Every input has a label. Icon-only buttons have an `aria-label`. Keyboard paths work.
@@ -0,0 +1,77 @@
1
+ # Accordion
2
+
3
+ Vertically stacked list of collapsible sections.
4
+
5
+ - Package: `@nexub/react` · Category: Disclosure · Status: stable
6
+ - Import: `import { Accordion } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/accordion
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `Accordion.Root type` | `'single' \| 'multiple'` | `'single'` | Whether one or multiple items can be open at the same time. |
14
+ | `Accordion.Root collapsible` | `boolean` | `false` | When type is "single", allows the open item to be collapsed by clicking it again. |
15
+ | `Accordion.Root defaultValue` | `string \| string[]` | | The item(s) open by default (uncontrolled). |
16
+ | `Accordion.Root value` | `string \| string[]` | | Controlled open item(s). |
17
+ | `Accordion.Root onValueChange` | `(value: string \| string[]) => void` | | Callback fired when the open state changes. |
18
+ | `Accordion.Root disabled` | `boolean` | `false` | Disables all items in the accordion. |
19
+ | `Accordion.Item value` (required) | `string` | | Unique identifier for the item. |
20
+ | `Accordion.Item disabled` | `boolean` | `false` | Disables this specific item. |
21
+ | `Accordion.Trigger asChild` | `boolean` | `false` | Merges props onto the immediate child element. |
22
+ | `Accordion.Content forceMount` | `boolean` | `false` | Keeps content in the DOM even when collapsed. |
23
+
24
+ ## Example: Default
25
+
26
+ ```tsx
27
+ <Accordion.Root type="single" collapsible defaultValue="item-1">
28
+ <Accordion.Item value="item-1">
29
+ <Accordion.Trigger>What is Nexub DS?</Accordion.Trigger>
30
+ <Accordion.Content>
31
+ Nexub DS is a design system providing accessible, themeable React components
32
+ built on Radix UI primitives.
33
+ </Accordion.Content>
34
+ </Accordion.Item>
35
+ <Accordion.Item value="item-2">
36
+ <Accordion.Trigger>Is it accessible?</Accordion.Trigger>
37
+ <Accordion.Content>
38
+ Yes. All components follow WAI-ARIA patterns and are keyboard-navigable
39
+ out of the box.
40
+ </Accordion.Content>
41
+ </Accordion.Item>
42
+ <Accordion.Item value="item-3">
43
+ <Accordion.Trigger>Can I customise the styles?</Accordion.Trigger>
44
+ <Accordion.Content>
45
+ Absolutely. Components expose design tokens via CSS custom properties,
46
+ and every element accepts a className prop.
47
+ </Accordion.Content>
48
+ </Accordion.Item>
49
+ </Accordion.Root>
50
+ ```
51
+
52
+ ## Example: Multiple
53
+
54
+ ```tsx
55
+ <Accordion.Root type="multiple" defaultValue={['item-1', 'item-2']}>
56
+ <Accordion.Item value="item-1">
57
+ <Accordion.Trigger>First section</Accordion.Trigger>
58
+ <Accordion.Content>
59
+ This section is open by default. Multiple items can be expanded
60
+ simultaneously when type is set to "multiple".
61
+ </Accordion.Content>
62
+ </Accordion.Item>
63
+ <Accordion.Item value="item-2">
64
+ <Accordion.Trigger>Second section</Accordion.Trigger>
65
+ <Accordion.Content>
66
+ Also open by default. Click any trigger to collapse individual sections
67
+ independently.
68
+ </Accordion.Content>
69
+ </Accordion.Item>
70
+ <Accordion.Item value="item-3">
71
+ <Accordion.Trigger>Third section</Accordion.Trigger>
72
+ <Accordion.Content>
73
+ Closed by default. Expanding this does not close the others.
74
+ </Accordion.Content>
75
+ </Accordion.Item>
76
+ </Accordion.Root>
77
+ ```
@@ -0,0 +1,33 @@
1
+ # ActivityFeed
2
+
3
+ Chronological list of activity events with avatar, description, and timestamp.
4
+
5
+ - Package: `@nexub/patterns` · Category: Data · Status: stable
6
+ - Import: `import { ActivityFeed } from '@nexub/patterns';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/patterns/activity-feed
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `title` (required) | `React.ReactNode` | | Activity event title. |
14
+ | `description` | `React.ReactNode` | | Supporting description. |
15
+ | `timestamp` | `string` | | Time string (e.g. "2 hours ago"). |
16
+ | `avatar` | `React.ReactNode` | | Avatar element for the actor. |
17
+
18
+ ## Example: Default
19
+
20
+ ```tsx
21
+ <ActivityFeed.Root>
22
+ <ActivityFeed.Item
23
+ title="Alex created a new project"
24
+ description="Project 'Nexub DS v2' was created"
25
+ timestamp="2 hours ago"
26
+ />
27
+ <ActivityFeed.Item
28
+ title="Sam invited 3 members"
29
+ description="Jordan, Riley, and Taylor joined"
30
+ timestamp="Yesterday"
31
+ />
32
+ </ActivityFeed.Root>
33
+ ```
@@ -0,0 +1,48 @@
1
+ # Alert Dialog
2
+
3
+ Confirmation dialog that requires an explicit user action before proceeding.
4
+
5
+ - Package: `@nexub/react` · Category: Overlays · Status: stable
6
+ - Import: `import { AlertDialog } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/alert-dialog
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `AlertDialog.Root` | `compound` | | Root provider component that manages open state. |
14
+ | `AlertDialog.Trigger` | `compound` | | Element that opens the dialog on interaction. |
15
+ | `AlertDialog.Portal` | `compound` | | Portals the overlay and content into the document body. |
16
+ | `AlertDialog.Overlay` | `compound` | | Dimmed backdrop rendered behind the content. |
17
+ | `AlertDialog.Content` | `compound` | | The dialog panel containing title, description, and actions. |
18
+ | `AlertDialog.Title` | `compound` | | Accessible title announced to screen readers. |
19
+ | `AlertDialog.Description` | `compound` | | Supporting description text for the dialog. |
20
+ | `AlertDialog.Action` | `compound` | | Confirms the destructive or affirmative action and closes the dialog. |
21
+ | `AlertDialog.Cancel` | `compound` | | Cancels the action and closes the dialog. |
22
+
23
+ ## Example: Default
24
+
25
+ ```tsx
26
+ <AlertDialog.Root>
27
+ <AlertDialog.Trigger asChild>
28
+ <Button variant="destructive">Delete account</Button>
29
+ </AlertDialog.Trigger>
30
+ <AlertDialog.Portal>
31
+ <AlertDialog.Overlay />
32
+ <AlertDialog.Content>
33
+ <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
34
+ <AlertDialog.Description>
35
+ This action cannot be undone. This will permanently delete your account and remove all associated data.
36
+ </AlertDialog.Description>
37
+ <div style={{ display: 'flex', justifyContent: 'flex-end', gap: '8px', marginTop: '16px' }}>
38
+ <AlertDialog.Cancel asChild>
39
+ <Button variant="outline">Cancel</Button>
40
+ </AlertDialog.Cancel>
41
+ <AlertDialog.Action asChild>
42
+ <Button variant="destructive">Confirm delete</Button>
43
+ </AlertDialog.Action>
44
+ </div>
45
+ </AlertDialog.Content>
46
+ </AlertDialog.Portal>
47
+ </AlertDialog.Root>
48
+ ```
@@ -0,0 +1,54 @@
1
+ # Alert
2
+
3
+ Inline contextual message with optional title, icon, and dismiss action.
4
+
5
+ - Package: `@nexub/react` · Category: Feedback · Status: stable
6
+ - Import: `import { Alert } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/alert
8
+
9
+ ## When to use
10
+
11
+ - Communicating system status, errors, or success after an action
12
+ - Showing inline validation feedback inside a form
13
+ - Warning the user about a potentially risky operation
14
+ - Providing contextual information relevant to the current page
15
+
16
+ ## When not to use
17
+
18
+ - Transient messages — use Toast for ephemeral notifications
19
+ - Blocking the user for a required decision — use AlertDialog
20
+ - Marketing or promotional messaging
21
+ - Replacing empty states — use EmptyState instead
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `tone` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | `'neutral'` | Semantic colour tone of the alert. |
28
+ | `title` | `string` | | Bold title rendered at the top of the alert. |
29
+ | `icon` | `ReactNode` | | Custom icon rendered to the left of the content. |
30
+ | `action` | `ReactNode` | | Action element (e.g. a button) rendered beside the content. |
31
+ | `onClose` | `() => void` | | When provided, renders a close button that calls this handler. |
32
+
33
+ ## Example: Default
34
+
35
+ ```tsx
36
+ <Alert tone="info" title="Heads up">Your trial expires in 3 days.</Alert>
37
+ ```
38
+
39
+ ## Example: Tones
40
+
41
+ ```tsx
42
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
43
+ <Alert tone="info" title="Information">This is an informational message.</Alert>
44
+ <Alert tone="success" title="Success">Your changes have been saved.</Alert>
45
+ <Alert tone="warning" title="Warning">Please review before proceeding.</Alert>
46
+ <Alert tone="danger" title="Error">Something went wrong. Please try again.</Alert>
47
+ </div>
48
+ ```
49
+
50
+ ## Example: Dismissible
51
+
52
+ ```tsx
53
+ <Alert tone="success" title="Saved" onClose={() => {}}>Your changes have been saved.</Alert>
54
+ ```
@@ -0,0 +1,34 @@
1
+ # Amount
2
+
3
+ Honest money: Intl formatting, tabular numerals, the currency’s minor unit and a true minus sign.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Amount } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/amount
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `value` (required) | `number` | | The amount. |
14
+ | `currency` (required) | `string` | | ISO 4217 code, e.g. "USD". |
15
+ | `locale` | `string` | | BCP 47 locale. Defaults to the user's. |
16
+ | `size` | `'sm' \| 'md' \| 'lg' \| 'display'` | `'md'` | `display` is a hero figure with a quieter symbol and minor units. |
17
+ | `tone` | `'neutral' \| 'auto'` | `'neutral'` | `auto` colours gains success and losses error. |
18
+ | `signDisplay` | `Intl signDisplay` | | e.g. 'exceptZero' to show + on gains. |
19
+ | `animate` | `boolean` | `false` | Roll the digits to new values (NumberTicker). The first render never animates. |
20
+
21
+ ## Example: Display
22
+
23
+ ```tsx
24
+ <Amount value={128450.75} currency="USD" size="display" />
25
+ ```
26
+
27
+ ## Example: Gains and losses
28
+
29
+ ```tsx
30
+ <Amount value={312.4} currency="USD" tone="auto" signDisplay="exceptZero" />
31
+ <Amount value={-89.99} currency="USD" tone="auto" />
32
+ ```
33
+
34
+ Related: [money-input](money-input.md), [number-ticker](number-ticker.md)
@@ -0,0 +1,33 @@
1
+ # AuthCard
2
+
3
+ Authentication layout pattern. Wraps sign-in, sign-up, and reset flows in a centered card.
4
+
5
+ - Package: `@nexub/patterns` · Category: Auth · Status: stable
6
+ - Import: `import { AuthCard } from '@nexub/patterns';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/patterns/auth-card
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `title` (required) | `string` | | Card heading (e.g. "Sign in to Nexub"). |
14
+ | `description` | `string` | | Subheading text. |
15
+ | `logo` | `React.ReactNode` | | Logo or brand mark above the title. |
16
+ | `footer` | `React.ReactNode` | | Footer content (e.g. "Don't have an account?"). |
17
+ | `children` (required) | `React.ReactNode` | | Form content. |
18
+
19
+ ## Example: Sign in
20
+
21
+ ```tsx
22
+ <AuthCard
23
+ title="Sign in to Nexub"
24
+ description="Enter your credentials below"
25
+ footer={<Text size="sm">Don't have an account? <Link href="/signup">Sign up</Link></Text>}
26
+ >
27
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
28
+ <Input type="email" placeholder="Email" />
29
+ <Input type="password" placeholder="Password" />
30
+ <Button>Sign in</Button>
31
+ </div>
32
+ </AuthCard>
33
+ ```
@@ -0,0 +1,54 @@
1
+ # Autocomplete
2
+
3
+ Type-to-search input with matching options dropdown.
4
+
5
+ - Package: `@nexub/react` · Category: Form Controls · Status: stable
6
+ - Import: `import { Autocomplete } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/autocomplete
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `options` (required) | `{ value: string; label: string }[]` | | Array of options available for selection. |
14
+ | `value` | `string` | | The controlled selected value. |
15
+ | `onValueChange` | `(value: string) => void` | | Callback fired when the selected value changes. |
16
+ | `placeholder` | `string` | | Placeholder text shown in the input when empty. |
17
+ | `emptyText` | `string` | | Text shown when no options match the current search query. |
18
+ | `loading` | `boolean` | | Shows a loading indicator while options are being fetched. |
19
+
20
+ ## Example: Default
21
+
22
+ ```tsx
23
+ <Autocomplete
24
+ options={[
25
+ { value: 'react', label: 'React' },
26
+ { value: 'vue', label: 'Vue' },
27
+ { value: 'angular', label: 'Angular' },
28
+ ]}
29
+ placeholder="Search framework…"
30
+ />
31
+ ```
32
+
33
+ ## Example: With loading state
34
+
35
+ ```tsx
36
+ <Autocomplete
37
+ options={[]}
38
+ loading
39
+ placeholder="Loading options…"
40
+ />
41
+ ```
42
+
43
+ ## Example: Custom empty text
44
+
45
+ ```tsx
46
+ <Autocomplete
47
+ options={[
48
+ { value: 'nexub', label: 'Nexub' },
49
+ { value: 'acme', label: 'Acme Corp' },
50
+ ]}
51
+ placeholder="Search company…"
52
+ emptyText="No companies found. Try a different search."
53
+ />
54
+ ```
@@ -0,0 +1,26 @@
1
+ # Avatar Group
2
+
3
+ Stacked group of avatars with overflow count.
4
+
5
+ - Package: `@nexub/react` · Category: Avatar · Status: stable
6
+ - Import: `import { AvatarGroup } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/avatar-group
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `max` | `number` | `4` | Maximum number of avatars shown before an overflow count is rendered. |
14
+ | `size` | `'xs' \| 'sm' \| 'md' \| 'lg'` | | Controls avatar dimensions for all children. |
15
+ | `spacing` | `'tight' \| 'normal'` | `'normal'` | Controls the overlap amount between stacked avatars. |
16
+
17
+ ## Example: Default
18
+
19
+ ```tsx
20
+ <AvatarGroup max={3}>
21
+ <Avatar name="Alice" />
22
+ <Avatar name="Bob" />
23
+ <Avatar name="Carol" />
24
+ <Avatar name="Dave" />
25
+ </AvatarGroup>
26
+ ```
@@ -0,0 +1,48 @@
1
+ # Avatar
2
+
3
+ Displays a user's profile picture with initials fallback.
4
+
5
+ - Package: `@nexub/react` · Category: Avatar · Status: stable
6
+ - Import: `import { Avatar } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/avatar
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `src` | `string` | | URL of the profile image. |
14
+ | `name` | `string` | | Full name used to generate initials when no image is provided. |
15
+ | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Controls avatar dimensions. |
16
+ | `badge` | `boolean` | | Shows a status badge on the avatar. |
17
+ | `badgeColor` | `string` | | Colour of the status badge. |
18
+ | `fallback` | `ReactNode` | | Custom fallback rendered when the image fails to load and no name is provided. |
19
+
20
+ ## Example: Default
21
+
22
+ ```tsx
23
+ <Avatar name="Alex Johnson" />
24
+ ```
25
+
26
+ ## Example: Sizes
27
+
28
+ ```tsx
29
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
30
+ <Avatar size="xs" name="Alex Johnson" />
31
+ <Avatar size="sm" name="Alex Johnson" />
32
+ <Avatar size="md" name="Alex Johnson" />
33
+ <Avatar size="lg" name="Alex Johnson" />
34
+ <Avatar size="xl" name="Alex Johnson" />
35
+ </div>
36
+ ```
37
+
38
+ ## Example: With image
39
+
40
+ ```tsx
41
+ <Avatar src="https://i.pravatar.cc/150?img=1" name="Alex Johnson" />
42
+ ```
43
+
44
+ ## Example: With badge
45
+
46
+ ```tsx
47
+ <Avatar name="Online User" badge badgeColor="green" />
48
+ ```
@@ -0,0 +1,71 @@
1
+ # Badge
2
+
3
+ Small status indicator or label. Communicates state, category, or count.
4
+
5
+ - Package: `@nexub/react` · Category: Labels & Badges · Status: stable
6
+ - Import: `import { Badge } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/badge
8
+
9
+ ## When to use
10
+
11
+ - Labelling a status, category, or tag on an item
12
+ - Showing a count or numeric indicator alongside an element
13
+ - Highlighting new, featured, or updated content
14
+ - Communicating a stage in a workflow (draft, published, archived)
15
+
16
+ ## When not to use
17
+
18
+ - Interactive filtering — use FilterChip or Chip instead
19
+ - Long text labels that exceed 2–3 words
20
+ - Critical alerts requiring user action — use Alert or Toast
21
+ - Replacing a button — badges are non-interactive by design
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `variant` | `'solid' \| 'soft' \| 'outline'` | `'solid'` | Visual fill style. |
28
+ | `tone` | `'success' \| 'danger' \| 'warning' \| 'info' \| 'neutral'` | `'neutral'` | Semantic color tone. |
29
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Badge size. |
30
+ | `leadingIcon` | `React.ReactNode` | | Icon or dot rendered before the label. |
31
+
32
+ ## Example: Tones
33
+
34
+ ```tsx
35
+ <div style={{ display: 'flex', gap: '8px' }}>
36
+ <Badge tone="success">Active</Badge>
37
+ <Badge tone="danger">Error</Badge>
38
+ <Badge tone="warning">Warning</Badge>
39
+ <Badge tone="info">Info</Badge>
40
+ <Badge tone="neutral">Draft</Badge>
41
+ </div>
42
+ ```
43
+
44
+ ## Example: Variants
45
+
46
+ ```tsx
47
+ <div style={{ display: 'flex', gap: '8px' }}>
48
+ <Badge variant="solid" tone="success">Solid</Badge>
49
+ <Badge variant="soft" tone="info">Soft</Badge>
50
+ <Badge variant="outline" tone="warning">Outline</Badge>
51
+ </div>
52
+ ```
53
+
54
+ ## Example: With leading dot
55
+
56
+ ```tsx
57
+ <div style={{ display: 'flex', gap: '8px' }}>
58
+ <Badge tone="success" leadingIcon={<span style={{ width: 6, height: 6, borderRadius: '50%', background: 'currentColor' }} />}>Online</Badge>
59
+ <Badge tone="danger" leadingIcon={<span style={{ width: 6, height: 6, borderRadius: '50%', background: 'currentColor' }} />}>Offline</Badge>
60
+ </div>
61
+ ```
62
+
63
+ ## Accessibility
64
+
65
+ - Roles: status (when conveying live state)
66
+ - `—`: Badges are non-interactive and have no keyboard handlers.
67
+ - Skipped in tab order. Decorative — never trap focus on a Badge.
68
+ - Reads as inline text. For live status changes, wrap in an element with `role="status"` and `aria-live="polite"`.
69
+ - For interactive equivalents (filtering, dismissing) reach for `Chip` or `FilterChip`.
70
+
71
+ Related: [chip](chip.md), [tag](tag.md), [status-pill](status-pill.md)
@@ -0,0 +1,32 @@
1
+ # Banner
2
+
3
+ > **Deprecated.** Do not use in new code. Deprecated — use Alert. Full-width announcement banner, typically used at the top of a page.
4
+
5
+ - Package: `@nexub/react` · Category: Feedback · Status: deprecated
6
+ - Import: `import { Banner } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/banner
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `tone` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | | Semantic colour tone of the banner. |
14
+ | `action` | `ReactNode` | | Action element (e.g. a button or link) rendered to the right of the content. |
15
+ | `onClose` | `() => void` | | When provided, renders a close button that dismisses the banner. |
16
+
17
+ ## Example: Default
18
+
19
+ ```tsx
20
+ <Banner tone="info">New features available — <strong>see what's new</strong></Banner>
21
+ ```
22
+
23
+ ## Example: With action
24
+
25
+ ```tsx
26
+ <Banner
27
+ tone="warning"
28
+ action={<Button size="sm" variant="outline">View details</Button>}
29
+ >
30
+ Your subscription renews in 5 days.
31
+ </Banner>
32
+ ```