@nexub/mcp 0.0.0-stage → 1.8.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 +70 -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 +50 -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
@@ -0,0 +1,71 @@
1
+ # Error Summary
2
+
3
+ Lists a form’s errors after a failed submit, with a link to each field. useFormErrors wires the fields to their messages.
4
+
5
+ - Package: `@nexub/patterns` · Category: Forms · Status: beta
6
+ - Import: `import { ErrorSummary } from '@nexub/patterns';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/patterns/error-summary
8
+
9
+ ## When to use
10
+
11
+ - Forms validated on submit, especially long ones where some errors are off screen.
12
+ - Alongside inline messages, never instead of them.
13
+
14
+ ## When not to use
15
+
16
+ - Live validation while typing: pass a new array per submit, not per keystroke, or the summary steals focus.
17
+ - A single field: the inline message is enough.
18
+
19
+ ## Props
20
+
21
+ | Prop | Type | Default | Description |
22
+ | --- | --- | --- | --- |
23
+ | `errors` (required) | `{ id: string; message: string }[]` | | One entry per invalid field; `id` is the field’s DOM id. Renders nothing when empty. |
24
+ | `title` | `ReactNode` | `'There is a problem'` | Heading; it also labels the summary. |
25
+ | `onFocusField` | `(id: string) => void` | | Called after a link moves focus to its field. |
26
+ | `useFormErrors(map)` (required) | `Record<string, string \| null \| undefined \| false>` | | Takes `{ fieldId: message }`. Falsy messages are skipped. |
27
+ | `→ errors` | `ErrorSummaryItem[]` | | The list for `ErrorSummary`. Stable for the same map object. |
28
+ | `→ fieldProps(id)` | `function` | | Spread on the input: `id`, plus `aria-invalid` and `aria-describedby="${id}-error"` when it has an error. |
29
+ | `→ errorProps(id)` | `function` | | Spread on the inline message: `id="${id}-error"`, the same id FormField.Error uses. |
30
+
31
+ ## Example: Validate on submit
32
+
33
+ Submit empty to see the summary. A new map per submit moves focus to the summary; links jump to each field.
34
+
35
+ ```tsx
36
+ function SignUp() {
37
+ const [submitted, setSubmitted] = React.useState<FormErrorMap>({});
38
+ const { errors, fieldProps, errorProps } = useFormErrors(submitted);
39
+
40
+ function submit(e: React.FormEvent<HTMLFormElement>) {
41
+ e.preventDefault();
42
+ const data = new FormData(e.currentTarget);
43
+ setSubmitted({
44
+ name: String(data.get('name')).trim() ? undefined : 'Enter your name',
45
+ email: /^\S+@\S+\.\S+$/.test(String(data.get('email'))) ? undefined : 'Enter an email address, like name@example.com',
46
+ });
47
+ }
48
+
49
+ return (
50
+ <form noValidate onSubmit={submit}>
51
+ <ErrorSummary errors={errors} />
52
+ <Label htmlFor="name">Name</Label>
53
+ <Input name="name" {...fieldProps('name')} invalid={Boolean(submitted.name)} />
54
+ {submitted.name && <FormError {...errorProps('name')}>{submitted.name}</FormError>}
55
+ <Label htmlFor="email">Email</Label>
56
+ <Input name="email" type="email" {...fieldProps('email')} invalid={Boolean(submitted.email)} />
57
+ {submitted.email && <FormError {...errorProps('email')}>{submitted.email}</FormError>}
58
+ <Button type="submit">Create account</Button>
59
+ </form>
60
+ );
61
+ }
62
+ ```
63
+
64
+ ## Accessibility
65
+
66
+ - Roles: alert
67
+ - Takes focus whenever it receives a new, non-empty `errors` array, so screen readers read it and keyboard users start from it.
68
+ - Each link scrolls its field into view and focuses it.
69
+ - An `alert` labelled by its heading. Fields get `aria-invalid` and `aria-describedby` pointing at their inline message.
70
+
71
+ Related: [form-field](form-field.md), [input](input.md), [alert](alert.md)
@@ -0,0 +1,28 @@
1
+ # Eyebrow Chip
2
+
3
+ A compact eyebrow label, typically used above headings.
4
+
5
+ - Package: `@nexub/react` · Category: Labels & Badges · Status: stable
6
+ - Import: `import { EyebrowChip } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/eyebrow-chip
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `size` | `'sm' \| 'md'` | | Controls chip size. |
14
+
15
+ ## Example: Default
16
+
17
+ ```tsx
18
+ <EyebrowChip>New release</EyebrowChip>
19
+ ```
20
+
21
+ ## Example: Usage
22
+
23
+ ```tsx
24
+ <div>
25
+ <EyebrowChip>Now available</EyebrowChip>
26
+ <h2 style={{ marginTop: '8px', fontSize: '1.5rem', fontWeight: 700 }}>Version 2.0</h2>
27
+ </div>
28
+ ```
@@ -0,0 +1,36 @@
1
+ # FilterBar
2
+
3
+ Search + filter toolbar pattern for data-heavy list or table views.
4
+
5
+ - Package: `@nexub/patterns` · Category: Data · Status: stable
6
+ - Import: `import { FilterBar } from '@nexub/patterns';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/patterns/filter-bar
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `searchPlaceholder` | `string` | `'Search…'` | Placeholder text for the search input. |
14
+ | `searchValue` | `string` | | Controlled search value. |
15
+ | `onSearch` | `(value: string) => void` | | Callback when search value changes. |
16
+ | `filters` | `React.ReactNode` | | Filter controls rendered to the right of search. |
17
+ | `actions` | `React.ReactNode` | | Action buttons (e.g. "Export") rendered on the far right. |
18
+
19
+ ## Example: Default
20
+
21
+ ```tsx
22
+ <FilterBar
23
+ searchPlaceholder="Search users…"
24
+ onSearch={(v) => {}}
25
+ filters={
26
+ <Select.Root>
27
+ <Select.Trigger><Select.Value placeholder="Status" /></Select.Trigger>
28
+ <Select.Content>
29
+ <Select.Item value="active">Active</Select.Item>
30
+ <Select.Item value="inactive">Inactive</Select.Item>
31
+ </Select.Content>
32
+ </Select.Root>
33
+ }
34
+ actions={<Button variant="outline" size="sm">Export</Button>}
35
+ />
36
+ ```
@@ -0,0 +1,26 @@
1
+ # Filter Chip
2
+
3
+ Interactive chip for filtering, supports selected/unselected state.
4
+
5
+ - Package: `@nexub/react` · Category: Labels & Badges · Status: stable
6
+ - Import: `import { FilterChip } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/filter-chip
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `selected` | `boolean` | | Controlled selected state of the chip. |
14
+ | `onSelectedChange` | `(selected: boolean) => void` | | Called when the selected state changes. |
15
+ | `disabled` | `boolean` | | Disables the chip. |
16
+ | `size` | `'sm' \| 'md'` | | Controls chip size. |
17
+
18
+ ## Example: Default
19
+
20
+ ```tsx
21
+ <div style={{ display: 'flex', gap: '8px' }}>
22
+ <FilterChip>All</FilterChip>
23
+ <FilterChip defaultSelected>Active</FilterChip>
24
+ <FilterChip>Archived</FilterChip>
25
+ </div>
26
+ ```
@@ -0,0 +1,47 @@
1
+ # Flex
2
+
3
+ Flexbox layout primitive.
4
+
5
+ - Package: `@nexub/react` · Category: Layout · Status: stable
6
+ - Import: `import { Flex } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/flex
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `direction` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | | Sets the flex-direction CSS property. |
14
+ | `align` | `'start' \| 'center' \| 'end' \| 'stretch'` | | Sets the align-items CSS property. |
15
+ | `justify` | `'start' \| 'center' \| 'end' \| 'between' \| 'around'` | | Sets the justify-content CSS property. |
16
+ | `gap` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | | Spacing between children using design tokens. |
17
+ | `wrap` | `boolean` | | Allows children to wrap onto multiple lines. |
18
+
19
+ ## Example: Default
20
+
21
+ ```tsx
22
+ <Flex gap="md" align="center">
23
+ <Button variant="primary">Action</Button>
24
+ <Button variant="outline">Cancel</Button>
25
+ </Flex>
26
+ ```
27
+
28
+ ## Example: Space between
29
+
30
+ ```tsx
31
+ <Flex justify="between">
32
+ <Badge tone="success">Active</Badge>
33
+ <Badge tone="neutral">Draft</Badge>
34
+ </Flex>
35
+ ```
36
+
37
+ ## Example: Wrap
38
+
39
+ ```tsx
40
+ <Flex gap="sm" wrap>
41
+ <Badge tone="info">React</Badge>
42
+ <Badge tone="info">TypeScript</Badge>
43
+ <Badge tone="info">Tailwind</Badge>
44
+ <Badge tone="info">Radix UI</Badge>
45
+ <Badge tone="info">Storybook</Badge>
46
+ </Flex>
47
+ ```
@@ -0,0 +1,26 @@
1
+ # Form Field
2
+
3
+ Wraps Label, Input, HelperText and FormError into a single accessible group.
4
+
5
+ - Package: `@nexub/react` · Category: Form & Input · Status: stable
6
+ - Import: `import { FormField } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/form-field
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `name` (required) | `string` | | Name attribute forwarded to the underlying input. |
14
+ | `id` | `string` | | Explicit id for the input; defaults to the name value. |
15
+ | `error` | `string` | | Validation error message shown below the input. |
16
+ | `required` | `boolean` | | Marks the field as required and renders a required indicator on the label. |
17
+
18
+ ## Example: Default
19
+
20
+ ```tsx
21
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px', width: '280px' }}>
22
+ <Label htmlFor="field-name" required>Full name</Label>
23
+ <Input id="field-name" placeholder="Jane Smith" />
24
+ <HelperText>Enter your legal name.</HelperText>
25
+ </div>
26
+ ```
@@ -0,0 +1,13 @@
1
+ # Gradient Divider
2
+
3
+ A decorative gradient-faded horizontal rule.
4
+
5
+ - Package: `@nexub/react` · Category: Dividers · Status: stable
6
+ - Import: `import { GradientDivider } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/gradient-divider
8
+
9
+ ## Example: Default
10
+
11
+ ```tsx
12
+ <GradientDivider />
13
+ ```
@@ -0,0 +1,39 @@
1
+ # Grid
2
+
3
+ CSS Grid layout primitive.
4
+
5
+ - Package: `@nexub/react` · Category: Layout · Status: stable
6
+ - Import: `import { Grid } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/grid
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `cols` | `number \| string` | | Number of columns or a custom grid-template-columns value. |
14
+ | `gap` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | | Gap between grid cells using design tokens. |
15
+ | `align` | `'start' \| 'center' \| 'end' \| 'stretch'` | | Sets the align-items CSS property for all grid cells. |
16
+
17
+ ## Example: 2-column
18
+
19
+ ```tsx
20
+ <Grid cols={2} gap="md">
21
+ <Card><Card.Body><Text>Card one</Text></Card.Body></Card>
22
+ <Card><Card.Body><Text>Card two</Text></Card.Body></Card>
23
+ <Card><Card.Body><Text>Card three</Text></Card.Body></Card>
24
+ <Card><Card.Body><Text>Card four</Text></Card.Body></Card>
25
+ </Grid>
26
+ ```
27
+
28
+ ## Example: 3-column
29
+
30
+ ```tsx
31
+ <Grid cols={3} gap="md">
32
+ <Card><Card.Body><Text>Card one</Text></Card.Body></Card>
33
+ <Card><Card.Body><Text>Card two</Text></Card.Body></Card>
34
+ <Card><Card.Body><Text>Card three</Text></Card.Body></Card>
35
+ <Card><Card.Body><Text>Card four</Text></Card.Body></Card>
36
+ <Card><Card.Body><Text>Card five</Text></Card.Body></Card>
37
+ <Card><Card.Body><Text>Card six</Text></Card.Body></Card>
38
+ </Grid>
39
+ ```
@@ -0,0 +1,46 @@
1
+ # Heading
2
+
3
+ Semantic heading component with size, weight, and tone control.
4
+
5
+ - Package: `@nexub/react` · Category: Typography · Status: stable
6
+ - Import: `import { Heading } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/heading
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | The semantic HTML heading level rendered. |
14
+ | `size` | `'display' \| 'h1' \| 'h2' \| 'h3' \| 'h4' \| 'h5' \| 'h6'` | | Visual size of the heading, independent of the semantic level. |
15
+ | `tone` | `'default' \| 'muted' \| 'info' \| 'success' \| 'warning' \| 'danger'` | | Color tone applied to the heading text. |
16
+ | `weight` | `'regular' \| 'medium' \| 'semibold' \| 'bold' \| 'extrabold'` | | Font weight of the heading. |
17
+ | `asChild` | `boolean` | | Merges props onto the immediate child element (Radix Slot). |
18
+
19
+ ## Example: Default
20
+
21
+ ```tsx
22
+ <Heading>The quick brown fox</Heading>
23
+ ```
24
+
25
+ ## Example: Scale
26
+
27
+ ```tsx
28
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
29
+ <Heading size="h1">Heading H1</Heading>
30
+ <Heading size="h2">Heading H2</Heading>
31
+ <Heading size="h3">Heading H3</Heading>
32
+ <Heading size="h4">Heading H4</Heading>
33
+ <Heading size="h5">Heading H5</Heading>
34
+ </div>
35
+ ```
36
+
37
+ ## Example: Tones
38
+
39
+ ```tsx
40
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
41
+ <Heading tone="info">Info heading</Heading>
42
+ <Heading tone="success">Success heading</Heading>
43
+ <Heading tone="warning">Warning heading</Heading>
44
+ <Heading tone="danger">Danger heading</Heading>
45
+ </div>
46
+ ```
@@ -0,0 +1,31 @@
1
+ # Helper Text
2
+
3
+ Small supporting text placed beneath a form field to provide hints or validation feedback.
4
+
5
+ - Package: `@nexub/react` · Category: Form & Input · Status: stable
6
+ - Import: `import { HelperText } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/helper-text
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `tone` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | `'neutral'` | Semantic colour tone of the helper text. |
14
+ | `disabled` | `boolean` | | Applies muted disabled styling. |
15
+
16
+ ## Example: Default
17
+
18
+ ```tsx
19
+ <HelperText>We will never share your email with anyone else.</HelperText>
20
+ ```
21
+
22
+ ## Example: Tones
23
+
24
+ ```tsx
25
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
26
+ <HelperText tone="info">Your password must be at least 8 characters.</HelperText>
27
+ <HelperText tone="success">Username is available.</HelperText>
28
+ <HelperText tone="warning">This action may affect other records.</HelperText>
29
+ <HelperText tone="danger">This field is required.</HelperText>
30
+ </div>
31
+ ```
@@ -0,0 +1,34 @@
1
+ # Hover Card
2
+
3
+ Rich tooltip card revealed on hover.
4
+
5
+ - Package: `@nexub/react` · Category: Overlays · Status: stable
6
+ - Import: `import { HoverCard } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/hover-card
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `HoverCard.Root` | `compound` | | Root provider that manages open/close state. |
14
+ | `HoverCard.Trigger` | `compound` | | Element that triggers the card on hover. |
15
+ | `HoverCard.Content` | `compound` | | The floating card panel shown on hover. |
16
+ | `openDelay` | `number` | | Delay in milliseconds before the card opens. |
17
+ | `closeDelay` | `number` | | Delay in milliseconds before the card closes. |
18
+
19
+ ## Example: Default
20
+
21
+ ```tsx
22
+ <HoverCard.Root openDelay={200} closeDelay={100}>
23
+ <HoverCard.Trigger asChild>
24
+ <Link href="#">@sasidharan</Link>
25
+ </HoverCard.Trigger>
26
+ <HoverCard.Content side="bottom" align="start" sideOffset={8}>
27
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px', width: '240px' }}>
28
+ <Text weight="semibold">Sasidharan</Text>
29
+ <Text size="body-sm" tone="secondary">Full-stack engineer building design systems.</Text>
30
+ <Text size="caption" tone="muted">Joined April 2024</Text>
31
+ </div>
32
+ </HoverCard.Content>
33
+ </HoverCard.Root>
34
+ ```
@@ -0,0 +1,44 @@
1
+ # Icon Button
2
+
3
+ A square button designed to hold a single icon, with an accessible label.
4
+
5
+ - Package: `@nexub/react` · Category: Actions · Status: stable
6
+ - Import: `import { IconButton } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/icon-button
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `variant` | `'ghost' \| 'solid' \| 'outline' \| 'subtle'` | `'ghost'` | Visual style of the icon button. |
14
+ | `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Controls button dimensions. |
15
+ | `disabled` | `boolean` | | Disables the button. |
16
+ | `loading` | `boolean` | | Shows a spinner and disables interaction. |
17
+ | `asChild` | `boolean` | | Merges props onto the immediate child element (Radix Slot). |
18
+
19
+ ## Example: Default
20
+
21
+ ```tsx
22
+ <IconButton variant="ghost" aria-label="Settings">
23
+ <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
24
+ </IconButton>
25
+ ```
26
+
27
+ ## Example: Variants
28
+
29
+ ```tsx
30
+ <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>
31
+ <IconButton variant="ghost" aria-label="Ghost action">
32
+ <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
33
+ </IconButton>
34
+ <IconButton variant="solid" aria-label="Solid action">
35
+ <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
36
+ </IconButton>
37
+ <IconButton variant="outline" aria-label="Outline action">
38
+ <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
39
+ </IconButton>
40
+ <IconButton variant="subtle" aria-label="Subtle action">
41
+ <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
42
+ </IconButton>
43
+ </div>
44
+ ```
@@ -0,0 +1,25 @@
1
+ # InfoList
2
+
3
+ Key–value list for displaying structured metadata or details.
4
+
5
+ - Package: `@nexub/patterns` · Category: Data · Status: stable
6
+ - Import: `import { InfoList } from '@nexub/patterns';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/patterns/info-list
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `label` (required) | `string` | | The key label. |
14
+ | `value` (required) | `React.ReactNode` | | The displayed value. |
15
+
16
+ ## Example: Default
17
+
18
+ ```tsx
19
+ <InfoList.Root>
20
+ <InfoList.Item label="Plan" value="Pro" />
21
+ <InfoList.Item label="Status" value={<Badge tone="success">Active</Badge>} />
22
+ <InfoList.Item label="Member since" value="Jan 2024" />
23
+ <InfoList.Item label="Team size" value="12 members" />
24
+ </InfoList.Root>
25
+ ```
@@ -0,0 +1,78 @@
1
+ # Input
2
+
3
+ Text input field for forms. Supports size variants, icons, addons, and validation states.
4
+
5
+ - Package: `@nexub/react` · Category: Form & Input · Status: stable
6
+ - Import: `import { Input } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/input
8
+
9
+ ## When to use
10
+
11
+ - Capturing short free-form text (name, email, search term)
12
+ - Single-line data entry within a form
13
+ - Filtering or searching a list of items
14
+ - Inline editing of a single value
15
+
16
+ ## When not to use
17
+
18
+ - Multi-line text — use Textarea instead
19
+ - Choosing from a fixed list of options — use Select or Combobox
20
+ - Numeric stepping — use NumberInput for increment/decrement control
21
+ - Passwords — use PasswordInput which toggles visibility
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Control height and font size. |
28
+ | `invalid` | `boolean` | `false` | Applies error ring styling. |
29
+ | `disabled` | `boolean` | `false` | Disables the input. |
30
+ | `placeholder` | `string` | | Placeholder text. |
31
+ | `type` | `string` | `'text'` | HTML input type attribute. |
32
+ | `leadingIcon` | `React.ReactNode` | | Icon rendered at the start of the input. |
33
+ | `trailingIcon` | `React.ReactNode` | | Icon rendered at the end of the input. |
34
+ | `leadingAddon` | `string` | | Text addon rendered before the input (e.g. "https://"). |
35
+ | `trailingAddon` | `string` | | Text addon rendered after the input (e.g. ".com"). |
36
+
37
+ ## Example: Default
38
+
39
+ ```tsx
40
+ <Input placeholder="Enter value…" />
41
+ ```
42
+
43
+ ## Example: Sizes
44
+
45
+ ```tsx
46
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px', maxWidth: '320px' }}>
47
+ <Input size="sm" placeholder="Small" />
48
+ <Input size="md" placeholder="Medium" />
49
+ <Input size="lg" placeholder="Large" />
50
+ </div>
51
+ ```
52
+
53
+ ## Example: Invalid state
54
+
55
+ ```tsx
56
+ <Input invalid placeholder="Invalid value" />
57
+ ```
58
+
59
+ ## Example: With label and helper
60
+
61
+ ```tsx
62
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px', maxWidth: '320px' }}>
63
+ <Label htmlFor="email">Email address</Label>
64
+ <Input id="email" type="email" placeholder="you@example.com" />
65
+ <HelperText>We'll never share your email.</HelperText>
66
+ </div>
67
+ ```
68
+
69
+ ## Accessibility
70
+
71
+ - Roles: textbox
72
+ - `Tab`: Moves focus to the input.
73
+ - `Esc`: Browsers may revert recent changes (autofill suggestions).
74
+ - Visible focus ring on `:focus-visible`. Pair with a `<Label htmlFor>` so clicking the label moves focus into the field.
75
+ - `invalid` toggles `aria-invalid="true"` so AT users hear the error state.
76
+ - Use `aria-describedby` to associate `HelperText` or error messages.
77
+
78
+ Related: [textarea](textarea.md), [number-input](number-input.md), [password-input](password-input.md), [search-input](search-input.md)
@@ -0,0 +1,42 @@
1
+ # Kbd
2
+
3
+ Keyboard key display — renders a styled <kbd> element.
4
+
5
+ - Package: `@nexub/react` · Category: Inline Primitives · Status: stable
6
+ - Import: `import { Kbd } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/kbd
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `...props` | `React.HTMLAttributes<HTMLElement>` | | All standard kbd HTML attributes are forwarded. |
14
+
15
+ ## Example: Default
16
+
17
+ ```tsx
18
+ <div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>
19
+ <Kbd>⌘</Kbd>
20
+ <Kbd>K</Kbd>
21
+ </div>
22
+ ```
23
+
24
+ ## Example: Combinations
25
+
26
+ ```tsx
27
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
28
+ <div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>
29
+ <Kbd>⌘</Kbd>
30
+ <Kbd>K</Kbd>
31
+ </div>
32
+ <div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>
33
+ <Kbd>Ctrl</Kbd>
34
+ <Kbd>C</Kbd>
35
+ </div>
36
+ <div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>
37
+ <Kbd>⇧</Kbd>
38
+ <Kbd>⌘</Kbd>
39
+ <Kbd>P</Kbd>
40
+ </div>
41
+ </div>
42
+ ```
@@ -0,0 +1,37 @@
1
+ # Label
2
+
3
+ An accessible form label that optionally shows a required asterisk and links to an input via htmlFor.
4
+
5
+ - Package: `@nexub/react` · Category: Form & Input · Status: stable
6
+ - Import: `import { Label } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/label
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `htmlFor` | `string` | | Associates the label with a form control by its id. |
14
+ | `required` | `boolean` | | Renders a required indicator (asterisk) after the label text. |
15
+ | `disabled` | `boolean` | | Applies disabled styling to the label. |
16
+ | `size` | `'sm' \| 'md'` | `'md'` | Controls label font size. |
17
+
18
+ ## Example: Default
19
+
20
+ ```tsx
21
+ <Label htmlFor="name">Full name</Label>
22
+ ```
23
+
24
+ ## Example: Required
25
+
26
+ ```tsx
27
+ <Label required>Email address</Label>
28
+ ```
29
+
30
+ ## Example: With input
31
+
32
+ ```tsx
33
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
34
+ <Label htmlFor="email">Email</Label>
35
+ <Input id="email" type="email" placeholder="you@example.com" />
36
+ </div>
37
+ ```