@nexub/mcp 2.6.0 → 2.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 (103) hide show
  1. package/dist/skill/references/components/accordion.md +40 -45
  2. package/dist/skill/references/components/activity-feed.md +13 -12
  3. package/dist/skill/references/components/alert-dialog.md +26 -22
  4. package/dist/skill/references/components/alert.md +26 -8
  5. package/dist/skill/references/components/amount.md +15 -3
  6. package/dist/skill/references/components/auth-card.md +22 -11
  7. package/dist/skill/references/components/autocomplete.md +42 -21
  8. package/dist/skill/references/components/avatar-group.md +13 -6
  9. package/dist/skill/references/components/avatar.md +31 -10
  10. package/dist/skill/references/components/badge.md +37 -16
  11. package/dist/skill/references/components/banner.md +18 -7
  12. package/dist/skill/references/components/bento-grid.md +33 -11
  13. package/dist/skill/references/components/box.md +21 -9
  14. package/dist/skill/references/components/breadcrumb.md +32 -34
  15. package/dist/skill/references/components/button-group.md +32 -14
  16. package/dist/skill/references/components/button.md +57 -32
  17. package/dist/skill/references/components/callout.md +10 -2
  18. package/dist/skill/references/components/card.md +54 -22
  19. package/dist/skill/references/components/checkbox-card.md +23 -8
  20. package/dist/skill/references/components/checkbox.md +32 -19
  21. package/dist/skill/references/components/chip.md +22 -10
  22. package/dist/skill/references/components/citation.md +18 -10
  23. package/dist/skill/references/components/code-inline.md +20 -2
  24. package/dist/skill/references/components/collapsible.md +38 -33
  25. package/dist/skill/references/components/combobox.md +18 -16
  26. package/dist/skill/references/components/conversation.md +23 -11
  27. package/dist/skill/references/components/data-table.md +40 -36
  28. package/dist/skill/references/components/date-picker.md +21 -17
  29. package/dist/skill/references/components/date-range-picker.md +11 -5
  30. package/dist/skill/references/components/dialog.md +26 -22
  31. package/dist/skill/references/components/drawer.md +66 -44
  32. package/dist/skill/references/components/empty-state.md +40 -50
  33. package/dist/skill/references/components/error-state.md +22 -10
  34. package/dist/skill/references/components/error-summary.md +20 -14
  35. package/dist/skill/references/components/eyebrow-chip.md +15 -5
  36. package/dist/skill/references/components/filter-bar.md +18 -14
  37. package/dist/skill/references/components/filter-chip.md +12 -5
  38. package/dist/skill/references/components/flex.md +31 -15
  39. package/dist/skill/references/components/form-field.md +11 -5
  40. package/dist/skill/references/components/gradient-divider.md +5 -1
  41. package/dist/skill/references/components/grid.md +22 -14
  42. package/dist/skill/references/components/heading.md +30 -14
  43. package/dist/skill/references/components/helper-text.md +17 -7
  44. package/dist/skill/references/components/hover-card.md +21 -12
  45. package/dist/skill/references/components/icon-button.md +19 -17
  46. package/dist/skill/references/components/info-list.md +15 -6
  47. package/dist/skill/references/components/input.md +32 -12
  48. package/dist/skill/references/components/kbd.md +21 -19
  49. package/dist/skill/references/components/label.md +20 -6
  50. package/dist/skill/references/components/link.md +21 -7
  51. package/dist/skill/references/components/list-detail.md +27 -6
  52. package/dist/skill/references/components/media-card.md +55 -16
  53. package/dist/skill/references/components/message-bubble.md +30 -13
  54. package/dist/skill/references/components/money-input.md +10 -2
  55. package/dist/skill/references/components/motion-collapse.md +22 -22
  56. package/dist/skill/references/components/motion-fade.md +19 -15
  57. package/dist/skill/references/components/motion-scale.md +13 -20
  58. package/dist/skill/references/components/motion-slide.md +13 -25
  59. package/dist/skill/references/components/navigation-rail.md +14 -5
  60. package/dist/skill/references/components/notification-item.md +10 -6
  61. package/dist/skill/references/components/number-input.md +10 -2
  62. package/dist/skill/references/components/number-ticker.md +27 -6
  63. package/dist/skill/references/components/pagination.md +11 -20
  64. package/dist/skill/references/components/password-input.md +13 -2
  65. package/dist/skill/references/components/plan-card.md +17 -9
  66. package/dist/skill/references/components/popover.md +31 -21
  67. package/dist/skill/references/components/progress.md +22 -8
  68. package/dist/skill/references/components/prompt-input.md +57 -29
  69. package/dist/skill/references/components/radio-card.md +41 -22
  70. package/dist/skill/references/components/radio-group.md +32 -28
  71. package/dist/skill/references/components/rating.md +23 -7
  72. package/dist/skill/references/components/scroll-area.md +30 -29
  73. package/dist/skill/references/components/search-input.md +5 -1
  74. package/dist/skill/references/components/segmented-control.md +26 -19
  75. package/dist/skill/references/components/select.md +16 -8
  76. package/dist/skill/references/components/separator.md +16 -6
  77. package/dist/skill/references/components/settings-section.md +19 -10
  78. package/dist/skill/references/components/sheet.md +25 -22
  79. package/dist/skill/references/components/skeleton.md +29 -12
  80. package/dist/skill/references/components/slider.md +10 -2
  81. package/dist/skill/references/components/spinner.md +17 -8
  82. package/dist/skill/references/components/split-button.md +26 -15
  83. package/dist/skill/references/components/stack.md +22 -10
  84. package/dist/skill/references/components/stat-card.md +34 -15
  85. package/dist/skill/references/components/status-pill.md +18 -12
  86. package/dist/skill/references/components/step-indicator.md +10 -9
  87. package/dist/skill/references/components/streaming-text.md +21 -12
  88. package/dist/skill/references/components/switch.md +10 -9
  89. package/dist/skill/references/components/table.md +66 -60
  90. package/dist/skill/references/components/tabs.md +24 -16
  91. package/dist/skill/references/components/tag.md +13 -5
  92. package/dist/skill/references/components/text-gradient.md +14 -5
  93. package/dist/skill/references/components/text.md +29 -12
  94. package/dist/skill/references/components/textarea.md +21 -7
  95. package/dist/skill/references/components/thinking-indicator.md +16 -4
  96. package/dist/skill/references/components/toast.md +41 -64
  97. package/dist/skill/references/components/toggle-group.md +22 -10
  98. package/dist/skill/references/components/toggle.md +15 -5
  99. package/dist/skill/references/components/tooltip.md +22 -9
  100. package/dist/skill/references/components/user-card.md +9 -5
  101. package/dist/skill/references/components.md +1 -1
  102. package/dist/skill/references/tokens.md +1 -1
  103. package/package.json +1 -1
@@ -19,59 +19,49 @@ Placeholder UI shown when a list or page has no content.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <EmptyState.Root>
23
- <EmptyState.Illustration>
24
- <svg
25
- width="48"
26
- height="48"
27
- viewBox="0 0 24 24"
28
- fill="none"
29
- stroke="var(--color-text-disabled)"
30
- strokeWidth="1.5"
31
- strokeLinecap="round"
32
- strokeLinejoin="round"
33
- aria-hidden="true"
34
- >
35
- <circle cx="11" cy="11" r="8" />
36
- <path d="m21 21-4.35-4.35" />
37
- </svg>
38
- </EmptyState.Illustration>
39
- <EmptyState.Title>No results found</EmptyState.Title>
40
- <EmptyState.Description>
41
- Try adjusting your search or filters to find what you're looking for.
42
- </EmptyState.Description>
43
- <EmptyState.Actions>
44
- <Button variant="primary">Clear filters</Button>
45
- <Button variant="outline">Browse all</Button>
46
- </EmptyState.Actions>
47
- </EmptyState.Root>
22
+ import { EmptyState, Button } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <EmptyState.Root>
27
+ <EmptyState.Illustration>
28
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none">
29
+ <rect x="8" y="8" width="32" height="32" rx="4" stroke="var(--color-outline-variant)" strokeWidth="2" />
30
+ <path d="M18 24h12M24 18v12" stroke="var(--color-on-surface-muted)" strokeWidth="2" strokeLinecap="round" />
31
+ </svg>
32
+ </EmptyState.Illustration>
33
+ <EmptyState.Title>No results found</EmptyState.Title>
34
+ <EmptyState.Description>Try adjusting your search or filters to find what you&apos;re looking for.</EmptyState.Description>
35
+ <EmptyState.Actions>
36
+ <Button variant="primary" size="sm">Clear filters</Button>
37
+ </EmptyState.Actions>
38
+ </EmptyState.Root>
39
+ );
40
+ }
48
41
  ```
49
42
 
50
43
  ## Example: Custom illustration
51
44
 
52
45
  ```tsx
53
- <EmptyState.Root>
54
- <EmptyState.Illustration>
55
- <svg
56
- width="80"
57
- height="80"
58
- viewBox="0 0 80 80"
59
- fill="none"
60
- xmlns="http://www.w3.org/2000/svg"
61
- aria-hidden="true"
62
- >
63
- <rect width="80" height="80" rx="40" fill="var(--color-bg-subtle)" />
64
- <rect x="24" y="28" width="32" height="24" rx="4" stroke="var(--color-border-strong)" strokeWidth="2" />
65
- <path d="M24 36h32" stroke="var(--color-border-strong)" strokeWidth="2" />
66
- <circle cx="40" cy="48" r="4" fill="var(--color-text-disabled)" />
67
- </svg>
68
- </EmptyState.Illustration>
69
- <EmptyState.Title>No documents yet</EmptyState.Title>
70
- <EmptyState.Description>
71
- Upload your first document to get started.
72
- </EmptyState.Description>
73
- <EmptyState.Actions>
74
- <Button variant="primary">Upload document</Button>
75
- </EmptyState.Actions>
76
- </EmptyState.Root>
46
+ import { EmptyState, Button } from '@nexub/react';
47
+
48
+ export default function Example() {
49
+ return (
50
+ <EmptyState.Root>
51
+ <EmptyState.Illustration>
52
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" aria-hidden="true">
53
+ <rect width="80" height="80" rx="40" fill="var(--color-surface-container-low)" />
54
+ <rect x="24" y="28" width="32" height="24" rx="4" stroke="var(--color-outline)" strokeWidth="2" />
55
+ <path d="M24 36h32" stroke="var(--color-outline)" strokeWidth="2" />
56
+ <circle cx="40" cy="48" r="4" fill="color-mix(in srgb, var(--color-on-surface) 38%, transparent)" />
57
+ </svg>
58
+ </EmptyState.Illustration>
59
+ <EmptyState.Title>No documents yet</EmptyState.Title>
60
+ <EmptyState.Description>Upload your first document to get started.</EmptyState.Description>
61
+ <EmptyState.Actions>
62
+ <Button variant="primary">Upload document</Button>
63
+ </EmptyState.Actions>
64
+ </EmptyState.Root>
65
+ );
66
+ }
77
67
  ```
@@ -19,19 +19,31 @@ Full-page or section error view with retry action.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <ErrorState
23
- title="Something went wrong"
24
- description="We could not load the data. Please try again."
25
- onRetry={() => {}}
26
- />
22
+ import { ErrorState } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <ErrorState
27
+ title="Something went wrong"
28
+ description="We could not load the data. Please try again."
29
+ onRetry={() => {}}
30
+ />
31
+ );
32
+ }
27
33
  ```
28
34
 
29
35
  ## Example: Warning
30
36
 
31
37
  ```tsx
32
- <ErrorState
33
- tone="warning"
34
- title="Connection issue"
35
- description="Check your network and try again."
36
- />
38
+ import { ErrorState } from '@nexub/react';
39
+
40
+ export default function Example() {
41
+ return (
42
+ <ErrorState
43
+ tone="warning"
44
+ title="Connection issue"
45
+ description="Check your network and try again."
46
+ />
47
+ );
48
+ }
37
49
  ```
@@ -33,28 +33,34 @@ Lists a form’s errors after a failed submit, with a link to each field. useFor
33
33
  Submit empty to see the summary. A new map per submit moves focus to the summary; links jump to each field.
34
34
 
35
35
  ```tsx
36
- function SignUp() {
36
+ import * as React from 'react';
37
+ import { type FormErrorMap, useFormErrors, ErrorSummary } from '@nexub/patterns';
38
+ import { Label, Input, FormError, Button } from '@nexub/react';
39
+
40
+ export default function Example() {
37
41
  const [submitted, setSubmitted] = React.useState<FormErrorMap>({});
38
42
  const { errors, fieldProps, errorProps } = useFormErrors(submitted);
39
-
40
- function submit(e: React.FormEvent<HTMLFormElement>) {
43
+ const submit = (e: React.FormEvent<HTMLFormElement>) => {
41
44
  e.preventDefault();
42
45
  const data = new FormData(e.currentTarget);
43
46
  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',
47
+ 'es-name': String(data.get('name')).trim() ? undefined : 'Enter your name',
48
+ 'es-email': /^\S+@\S+\.\S+$/.test(String(data.get('email'))) ? undefined : 'Enter an email address, like name@example.com',
46
49
  });
47
- }
48
-
50
+ };
49
51
  return (
50
- <form noValidate onSubmit={submit}>
52
+ <form noValidate onSubmit={submit} className="flex flex-col gap-3 items-stretch w-[340px]">
51
53
  <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>}
54
+ <div className="flex flex-col gap-1 items-stretch">
55
+ <Label htmlFor="es-name">Name</Label>
56
+ <Input name="name" {...fieldProps('es-name')} invalid={Boolean(submitted['es-name'])} />
57
+ {submitted['es-name'] && <FormError {...errorProps('es-name')}>{submitted['es-name']}</FormError>}
58
+ </div>
59
+ <div className="flex flex-col gap-1 items-stretch">
60
+ <Label htmlFor="es-email">Email</Label>
61
+ <Input name="email" type="email" {...fieldProps('es-email')} invalid={Boolean(submitted['es-email'])} />
62
+ {submitted['es-email'] && <FormError {...errorProps('es-email')}>{submitted['es-email']}</FormError>}
63
+ </div>
58
64
  <Button type="submit">Create account</Button>
59
65
  </form>
60
66
  );
@@ -15,14 +15,24 @@ A compact eyebrow label, typically used above headings.
15
15
  ## Example: Default
16
16
 
17
17
  ```tsx
18
- <EyebrowChip>New release</EyebrowChip>
18
+ import { EyebrowChip } from '@nexub/react';
19
+
20
+ export default function Example() {
21
+ return <EyebrowChip>New release</EyebrowChip>;
22
+ }
19
23
  ```
20
24
 
21
25
  ## Example: Usage
22
26
 
23
27
  ```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
+ import { EyebrowChip } from '@nexub/react';
29
+
30
+ export default function Example() {
31
+ return (
32
+ <div className="flex flex-col gap-2 items-start">
33
+ <EyebrowChip>Now available</EyebrowChip>
34
+ <h2 className="m-0 text-[1.5rem] font-bold text-[var(--color-on-surface)]">Version 2.0</h2>
35
+ </div>
36
+ );
37
+ }
28
38
  ```
@@ -19,18 +19,22 @@ Search + filter toolbar pattern for data-heavy list or table views.
19
19
  ## Example: Default
20
20
 
21
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
- />
22
+ import { FilterBar } from '@nexub/patterns';
23
+ import { Badge } from '@nexub/react';
24
+
25
+ export default function Example() {
26
+ return (
27
+ <div className="w-full max-w-[480px]">
28
+ <FilterBar
29
+ searchPlaceholder="Search users…"
30
+ filters={
31
+ <div className="flex gap-2 flex-wrap items-center justify-center">
32
+ <Badge tone="neutral">Status: All</Badge>
33
+ <Badge tone="neutral">Plan: All</Badge>
34
+ </div>
35
+ }
36
+ />
37
+ </div>
38
+ );
39
+ }
36
40
  ```
@@ -18,9 +18,16 @@ Interactive chip for filtering, supports selected/unselected state.
18
18
  ## Example: Default
19
19
 
20
20
  ```tsx
21
- <div style={{ display: 'flex', gap: '8px' }}>
22
- <FilterChip>All</FilterChip>
23
- <FilterChip defaultSelected>Active</FilterChip>
24
- <FilterChip>Archived</FilterChip>
25
- </div>
21
+ import { FilterChip } from '@nexub/react';
22
+
23
+ export default function Example() {
24
+ return (
25
+ <div className="flex gap-2 flex-wrap items-center justify-center">
26
+ <FilterChip>All</FilterChip>
27
+ <FilterChip selected>Active</FilterChip>
28
+ <FilterChip>Archived</FilterChip>
29
+ <FilterChip>Draft</FilterChip>
30
+ </div>
31
+ );
32
+ }
26
33
  ```
@@ -19,29 +19,45 @@ Flexbox layout primitive.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <Flex gap="md" align="center">
23
- <Button variant="primary">Action</Button>
24
- <Button variant="outline">Cancel</Button>
25
- </Flex>
22
+ import { Flex, Button } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <Flex gap="md" align="center">
27
+ <Button variant="primary">Action</Button>
28
+ <Button variant="outline">Cancel</Button>
29
+ </Flex>
30
+ );
31
+ }
26
32
  ```
27
33
 
28
34
  ## Example: Space between
29
35
 
30
36
  ```tsx
31
- <Flex justify="between">
32
- <Badge tone="success">Active</Badge>
33
- <Badge tone="neutral">Draft</Badge>
34
- </Flex>
37
+ import { Flex, Badge } from '@nexub/react';
38
+
39
+ export default function Example() {
40
+ return (
41
+ <Flex justify="between" className="w-full max-w-[320px]">
42
+ <Badge tone="success">Active</Badge>
43
+ <Badge tone="neutral">Draft</Badge>
44
+ </Flex>
45
+ );
46
+ }
35
47
  ```
36
48
 
37
49
  ## Example: Wrap
38
50
 
39
51
  ```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>
52
+ import { Flex, Badge } from '@nexub/react';
53
+
54
+ export default function Example() {
55
+ return (
56
+ <Flex gap="sm" wrap className="max-w-[260px]">
57
+ {['React', 'TypeScript', 'Tailwind', 'Radix UI', 'Storybook'].map((t) => (
58
+ <Badge key={t} tone="info">{t}</Badge>
59
+ ))}
60
+ </Flex>
61
+ );
62
+ }
47
63
  ```
@@ -18,9 +18,15 @@ Wraps Label, Input, HelperText and FormError into a single accessible group.
18
18
  ## Example: Default
19
19
 
20
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>
21
+ import { Label, Input, HelperText } from '@nexub/react';
22
+
23
+ export default function Example() {
24
+ return (
25
+ <div className="flex flex-col gap-1 items-start w-[280px]">
26
+ <Label htmlFor="field-name" required>Full name</Label>
27
+ <Input id="field-name" placeholder="Jane Smith" />
28
+ <HelperText>Enter your legal name.</HelperText>
29
+ </div>
30
+ );
31
+ }
26
32
  ```
@@ -9,5 +9,9 @@ A decorative gradient-faded horizontal rule.
9
9
  ## Example: Default
10
10
 
11
11
  ```tsx
12
- <GradientDivider />
12
+ import { GradientDivider } from '@nexub/react';
13
+
14
+ export default function Example() {
15
+ return <div className="w-[280px]"><GradientDivider /></div>;
16
+ }
13
17
  ```
@@ -17,23 +17,31 @@ CSS Grid layout primitive.
17
17
  ## Example: 2-column
18
18
 
19
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>
20
+ import { Grid, Card, Text } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <Grid cols={2} gap="md" className="w-full max-w-[400px]">
25
+ {[1, 2, 3, 4].map((n) => (
26
+ <Card key={n}><Text size="body-sm" tone="muted">Card {n}</Text></Card>
27
+ ))}
28
+ </Grid>
29
+ );
30
+ }
26
31
  ```
27
32
 
28
33
  ## Example: 3-column
29
34
 
30
35
  ```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>
36
+ import { Grid, Card, Text } from '@nexub/react';
37
+
38
+ export default function Example() {
39
+ return (
40
+ <Grid cols={3} gap="sm" className="w-full max-w-[480px]">
41
+ {[1, 2, 3, 4, 5, 6].map((n) => (
42
+ <Card key={n}><Text size="caption" tone="muted">Item {n}</Text></Card>
43
+ ))}
44
+ </Grid>
45
+ );
46
+ }
39
47
  ```
@@ -19,28 +19,44 @@ Semantic heading component with size, weight, and tone control.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <Heading>The quick brown fox</Heading>
22
+ import { Heading } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return <Heading>The quick brown fox</Heading>;
26
+ }
23
27
  ```
24
28
 
25
29
  ## Example: Scale
26
30
 
27
31
  ```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>
32
+ import { Heading } from '@nexub/react';
33
+
34
+ export default function Example() {
35
+ return (
36
+ <div className="flex flex-col gap-2 items-start">
37
+ <Heading size="h1">Heading 1</Heading>
38
+ <Heading size="h2">Heading 2</Heading>
39
+ <Heading size="h3">Heading 3</Heading>
40
+ <Heading size="h4">Heading 4</Heading>
41
+ <Heading size="h5">Heading 5</Heading>
42
+ </div>
43
+ );
44
+ }
35
45
  ```
36
46
 
37
47
  ## Example: Tones
38
48
 
39
49
  ```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>
50
+ import { Heading } from '@nexub/react';
51
+
52
+ export default function Example() {
53
+ return (
54
+ <div className="flex flex-col gap-2 items-start">
55
+ <Heading tone="info">Info tone</Heading>
56
+ <Heading tone="success">Success tone</Heading>
57
+ <Heading tone="warning">Warning tone</Heading>
58
+ <Heading tone="danger">Danger tone</Heading>
59
+ </div>
60
+ );
61
+ }
46
62
  ```
@@ -16,16 +16,26 @@ Small supporting text placed beneath a form field to provide hints or validation
16
16
  ## Example: Default
17
17
 
18
18
  ```tsx
19
- <HelperText>We will never share your email with anyone else.</HelperText>
19
+ import { HelperText } from '@nexub/react';
20
+
21
+ export default function Example() {
22
+ return <HelperText>We will never share your email with anyone else.</HelperText>;
23
+ }
20
24
  ```
21
25
 
22
26
  ## Example: Tones
23
27
 
24
28
  ```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>
29
+ import { HelperText } from '@nexub/react';
30
+
31
+ export default function Example() {
32
+ return (
33
+ <div className="flex flex-col gap-1.5 items-start">
34
+ <HelperText tone="info">Sync runs every 10 minutes.</HelperText>
35
+ <HelperText tone="success">Your account is verified.</HelperText>
36
+ <HelperText tone="warning">This action cannot be reversed.</HelperText>
37
+ <HelperText tone="danger">Required field is missing.</HelperText>
38
+ </div>
39
+ );
40
+ }
31
41
  ```
@@ -19,16 +19,25 @@ Rich tooltip card revealed on hover.
19
19
  ## Example: Default
20
20
 
21
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>
22
+ import { HoverCard, Link, Avatar, Text } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <HoverCard.Root>
27
+ <HoverCard.Trigger asChild>
28
+ <Link href="#">@alex_johnson</Link>
29
+ </HoverCard.Trigger>
30
+ <HoverCard.Content>
31
+ <div className="flex flex-col gap-2 items-start">
32
+ <Avatar name="Alex Johnson" size="lg" />
33
+ <div>
34
+ <Text weight="semibold">Alex Johnson</Text>
35
+ <Text size="body-sm" tone="muted">Product Designer</Text>
36
+ </div>
37
+ <Text size="body-sm" tone="secondary">Building design systems and making developers happy.</Text>
38
+ </div>
39
+ </HoverCard.Content>
40
+ </HoverCard.Root>
41
+ );
42
+ }
34
43
  ```
@@ -19,26 +19,28 @@ A square button designed to hold a single icon, with an accessible label.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <IconButton variant="ghost" aria-label="Settings">
23
- <div style={{ width: 16, height: 16, background: 'currentColor', borderRadius: 2 }} />
24
- </IconButton>
22
+ import { IconButton } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ const icon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M12 5v14M5 12h14" /></svg>;
26
+ return <IconButton variant="ghost" label="Add item">{icon}</IconButton>;
27
+ }
25
28
  ```
26
29
 
27
30
  ## Example: Variants
28
31
 
29
32
  ```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>
33
+ import { IconButton } from '@nexub/react';
34
+
35
+ export default function Example() {
36
+ const icon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M12 5v14M5 12h14" /></svg>;
37
+ return (
38
+ <div className="flex gap-2 flex-wrap items-center justify-center">
39
+ <IconButton variant="ghost" label="Ghost">{icon}</IconButton>
40
+ <IconButton variant="solid" label="Solid">{icon}</IconButton>
41
+ <IconButton variant="outline" label="Outline">{icon}</IconButton>
42
+ <IconButton variant="subtle" label="Subtle">{icon}</IconButton>
43
+ </div>
44
+ );
45
+ }
44
46
  ```
@@ -16,10 +16,19 @@ Key–value list for displaying structured metadata or details.
16
16
  ## Example: Default
17
17
 
18
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>
19
+ import { InfoList } from '@nexub/patterns';
20
+ import { Badge } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <div className="w-[280px]">
25
+ <InfoList.Root>
26
+ <InfoList.Item label="Plan" value="Pro" />
27
+ <InfoList.Item label="Seats" value="12 / 50" />
28
+ <InfoList.Item label="Renewal" value="Jan 15, 2026" />
29
+ <InfoList.Item label="Status" value={<Badge tone="success" size="sm">Active</Badge>} />
30
+ </InfoList.Root>
31
+ </div>
32
+ );
33
+ }
25
34
  ```