@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
@@ -24,54 +24,49 @@ Vertically stacked list of collapsible sections.
24
24
  ## Example: Default
25
25
 
26
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>
27
+ import { Accordion, Code } from '@nexub/react';
28
+
29
+ export default function Example() {
30
+ return (
31
+ <div className="w-full max-w-[480px]">
32
+ <Accordion.Root type="single" collapsible>
33
+ <Accordion.Item value="a">
34
+ <Accordion.Trigger>What is Nexub?</Accordion.Trigger>
35
+ <Accordion.Content>A design system for ambitious SaaS teams, built on tokens and accessibility.</Accordion.Content>
36
+ </Accordion.Item>
37
+ <Accordion.Item value="b">
38
+ <Accordion.Trigger>How do I install?</Accordion.Trigger>
39
+ <Accordion.Content>Run: <Code>pnpm add @nexub/react</Code></Accordion.Content>
40
+ </Accordion.Item>
41
+ <Accordion.Item value="c">
42
+ <Accordion.Trigger>Is it open source?</Accordion.Trigger>
43
+ <Accordion.Content>Yes — MIT licensed and free to use.</Accordion.Content>
44
+ </Accordion.Item>
45
+ </Accordion.Root>
46
+ </div>
47
+ );
48
+ }
50
49
  ```
51
50
 
52
51
  ## Example: Multiple
53
52
 
54
53
  ```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>
54
+ import { Accordion } from '@nexub/react';
55
+
56
+ export default function Example() {
57
+ return (
58
+ <div className="w-full max-w-[480px]">
59
+ <Accordion.Root type="multiple">
60
+ <Accordion.Item value="x">
61
+ <Accordion.Trigger>Section A</Accordion.Trigger>
62
+ <Accordion.Content>Content for section A — stays open when B is opened.</Accordion.Content>
63
+ </Accordion.Item>
64
+ <Accordion.Item value="y">
65
+ <Accordion.Trigger>Section B</Accordion.Trigger>
66
+ <Accordion.Content>Content for section B — multiple can be open at once.</Accordion.Content>
67
+ </Accordion.Item>
68
+ </Accordion.Root>
69
+ </div>
70
+ );
71
+ }
77
72
  ```
@@ -18,16 +18,17 @@ Chronological list of activity events with avatar, description, and timestamp.
18
18
  ## Example: Default
19
19
 
20
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>
21
+ import { ActivityFeed } from '@nexub/patterns';
22
+
23
+ export default function Example() {
24
+ return (
25
+ <div className="w-[340px]">
26
+ <ActivityFeed.Root>
27
+ <ActivityFeed.Item title="Sarah K. created an invoice" description="Invoice #1042 for Acme Corp" timestamp="2 min ago" />
28
+ <ActivityFeed.Item title="James L. approved a request" description="Budget increase for Q2" timestamp="15 min ago" />
29
+ <ActivityFeed.Item title="Maria R. added a comment" description="On the design review document" timestamp="1 hr ago" />
30
+ </ActivityFeed.Root>
31
+ </div>
32
+ );
33
+ }
33
34
  ```
@@ -23,26 +23,30 @@ Confirmation dialog that requires an explicit user action before proceeding.
23
23
  ## Example: Default
24
24
 
25
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>
26
+ import * as React from 'react';
27
+ import { Button, AlertDialog } from '@nexub/react';
28
+
29
+ export default function Example() {
30
+ const [open, setOpen] = React.useState(false);
31
+ return (
32
+ <>
33
+ <Button variant="destructive" onClick={() => setOpen(true)}>Delete account</Button>
34
+ <AlertDialog.Root open={open} onOpenChange={setOpen}>
35
+ <AlertDialog.Portal>
36
+ <AlertDialog.Overlay />
37
+ <AlertDialog.Content>
38
+ <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
39
+ <AlertDialog.Description>
40
+ This action cannot be undone. This will permanently delete your account and remove all your data.
41
+ </AlertDialog.Description>
42
+ <div className="flex gap-2 justify-end mt-6">
43
+ <AlertDialog.Cancel asChild><Button variant="outline">Cancel</Button></AlertDialog.Cancel>
44
+ <AlertDialog.Action asChild><Button variant="destructive">Yes, delete</Button></AlertDialog.Action>
45
+ </div>
46
+ </AlertDialog.Content>
47
+ </AlertDialog.Portal>
48
+ </AlertDialog.Root>
49
+ </>
50
+ );
51
+ }
48
52
  ```
@@ -33,22 +33,40 @@ Inline contextual message with optional title, icon, and dismiss action.
33
33
  ## Example: Default
34
34
 
35
35
  ```tsx
36
- <Alert tone="info" title="Heads up">Your trial expires in 3 days.</Alert>
36
+ import { Alert } from '@nexub/react';
37
+
38
+ export default function Example() {
39
+ return <Alert tone="info" title="Heads up">Your trial expires in 3 days.</Alert>;
40
+ }
37
41
  ```
38
42
 
39
43
  ## Example: Tones
40
44
 
41
45
  ```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>
46
+ import { Alert } from '@nexub/react';
47
+
48
+ export default function Example() {
49
+ return (
50
+ <div className="flex flex-col gap-2 items-start w-full max-w-[480px]">
51
+ <Alert tone="info" title="Info">Informational message.</Alert>
52
+ <Alert tone="success" title="Success">Operation completed successfully.</Alert>
53
+ <Alert tone="warning" title="Warning">Something needs your attention.</Alert>
54
+ <Alert tone="danger" title="Error">Something went wrong.</Alert>
55
+ </div>
56
+ );
57
+ }
48
58
  ```
49
59
 
50
60
  ## Example: Dismissible
51
61
 
52
62
  ```tsx
53
- <Alert tone="success" title="Saved" onClose={() => {}}>Your changes have been saved.</Alert>
63
+ import { Alert } from '@nexub/react';
64
+
65
+ export default function Example() {
66
+ return (
67
+ <div className="w-full max-w-[480px]">
68
+ <Alert tone="success" title="Saved" onClose={() => {}}>Your changes have been saved.</Alert>
69
+ </div>
70
+ );
71
+ }
54
72
  ```
@@ -21,14 +21,26 @@ Honest money: Intl formatting, tabular numerals, the currency’s minor unit and
21
21
  ## Example: Display
22
22
 
23
23
  ```tsx
24
- <Amount value={128450.75} currency="USD" size="display" />
24
+ import { Amount } from '@nexub/react';
25
+
26
+ export default function Example() {
27
+ return <Amount value={128450.75} currency="USD" size="display" />;
28
+ }
25
29
  ```
26
30
 
27
31
  ## Example: Gains and losses
28
32
 
29
33
  ```tsx
30
- <Amount value={312.4} currency="USD" tone="auto" signDisplay="exceptZero" />
31
- <Amount value={-89.99} currency="USD" tone="auto" />
34
+ import { Amount } from '@nexub/react';
35
+
36
+ export default function Example() {
37
+ return (
38
+ <div className="flex gap-4">
39
+ <Amount value={312.4} currency="USD" tone="auto" signDisplay="exceptZero" />
40
+ <Amount value={-89.99} currency="USD" tone="auto" />
41
+ </div>
42
+ );
43
+ }
32
44
  ```
33
45
 
34
46
  Related: [money-input](money-input.md), [number-ticker](number-ticker.md)
@@ -19,15 +19,26 @@ Authentication layout pattern. Wraps sign-in, sign-up, and reset flows in a cent
19
19
  ## Example: Sign in
20
20
 
21
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>
22
+ import { AuthCard } from '@nexub/patterns';
23
+ import { Label, Input, Button } from '@nexub/react';
24
+
25
+ export default function Example() {
26
+ return (
27
+ <div className="w-[360px]">
28
+ <AuthCard title="Sign in" description="Welcome back — enter your credentials to continue.">
29
+ <div className="flex flex-col gap-3 items-start">
30
+ <div className="flex flex-col gap-1 items-start">
31
+ <Label htmlFor="auth-email">Email</Label>
32
+ <Input id="auth-email" type="email" placeholder="you@company.com" />
33
+ </div>
34
+ <div className="flex flex-col gap-1 items-start">
35
+ <Label htmlFor="auth-pass">Password</Label>
36
+ <Input id="auth-pass" type="password" placeholder="••••••••" />
37
+ </div>
38
+ <Button variant="primary" className="w-full">Sign in</Button>
39
+ </div>
40
+ </AuthCard>
41
+ </div>
42
+ );
43
+ }
33
44
  ```
@@ -20,35 +20,56 @@ Type-to-search input with matching options dropdown.
20
20
  ## Example: Default
21
21
 
22
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
- />
23
+ import { Autocomplete } from '@nexub/react';
24
+
25
+ export default function Example() {
26
+ return (
27
+ <div className="w-[260px]">
28
+ <Autocomplete
29
+ options={[
30
+ { value: 'react', label: 'React' },
31
+ { value: 'vue', label: 'Vue' },
32
+ { value: 'angular', label: 'Angular' },
33
+ { value: 'svelte', label: 'Svelte' },
34
+ ]}
35
+ placeholder="Search framework…"
36
+ />
37
+ </div>
38
+ );
39
+ }
31
40
  ```
32
41
 
33
42
  ## Example: With loading state
34
43
 
35
44
  ```tsx
36
- <Autocomplete
37
- options={[]}
38
- loading
39
- placeholder="Loading options…"
40
- />
45
+ import { Autocomplete } from '@nexub/react';
46
+
47
+ export default function Example() {
48
+ return (
49
+ <div className="w-[260px]">
50
+ <Autocomplete options={[]} loading placeholder="Loading options…" />
51
+ </div>
52
+ );
53
+ }
41
54
  ```
42
55
 
43
56
  ## Example: Custom empty text
44
57
 
45
58
  ```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
- />
59
+ import { Autocomplete } from '@nexub/react';
60
+
61
+ export default function Example() {
62
+ return (
63
+ <div className="w-[260px]">
64
+ <Autocomplete
65
+ options={[
66
+ { value: 'nexub', label: 'Nexub' },
67
+ { value: 'acme', label: 'Acme Corp' },
68
+ ]}
69
+ placeholder="Search company…"
70
+ emptyText="No companies found. Try a different search."
71
+ />
72
+ </div>
73
+ );
74
+ }
54
75
  ```
@@ -17,10 +17,17 @@ Stacked group of avatars with overflow count.
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <AvatarGroup max={3}>
21
- <Avatar name="Alice" />
22
- <Avatar name="Bob" />
23
- <Avatar name="Carol" />
24
- <Avatar name="Dave" />
25
- </AvatarGroup>
20
+ import { AvatarGroup, Avatar } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <AvatarGroup max={3}>
25
+ <Avatar name="Alice B" />
26
+ <Avatar name="Bob C" />
27
+ <Avatar name="Carol D" />
28
+ <Avatar name="Dave E" />
29
+ <Avatar name="Eve F" />
30
+ </AvatarGroup>
31
+ );
32
+ }
26
33
  ```
@@ -20,29 +20,50 @@ Displays a user's profile picture with initials fallback.
20
20
  ## Example: Default
21
21
 
22
22
  ```tsx
23
- <Avatar name="Alex Johnson" />
23
+ import { Avatar } from '@nexub/react';
24
+
25
+ export default function Example() {
26
+ return <Avatar name="Alex Johnson" />;
27
+ }
24
28
  ```
25
29
 
26
30
  ## Example: Sizes
27
31
 
28
32
  ```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>
33
+ import { Avatar } from '@nexub/react';
34
+
35
+ export default function Example() {
36
+ return (
37
+ <div className="flex gap-3 flex-wrap items-center justify-center">
38
+ {(['xs', 'sm', 'md', 'lg', 'xl'] as const).map((s) => (
39
+ <Avatar key={s} name="Alex J" size={s} />
40
+ ))}
41
+ </div>
42
+ );
43
+ }
36
44
  ```
37
45
 
38
46
  ## Example: With image
39
47
 
40
48
  ```tsx
41
- <Avatar src="https://i.pravatar.cc/150?img=1" name="Alex Johnson" />
49
+ import { Avatar } from '@nexub/react';
50
+
51
+ export default function Example() {
52
+ return <Avatar src="https://i.pravatar.cc/150?img=3" name="Alex Johnson" />;
53
+ }
42
54
  ```
43
55
 
44
56
  ## Example: With badge
45
57
 
46
58
  ```tsx
47
- <Avatar name="Online User" badge badgeColor="green" />
59
+ import { Avatar } from '@nexub/react';
60
+
61
+ export default function Example() {
62
+ return (
63
+ <div className="flex gap-3 flex-wrap items-center justify-center">
64
+ <Avatar name="Online" badge badgeColor="var(--color-success)" />
65
+ <Avatar name="Away" badge badgeColor="var(--color-warning)" />
66
+ </div>
67
+ );
68
+ }
48
69
  ```
@@ -32,32 +32,53 @@ Small status indicator or label. Communicates state, category, or count.
32
32
  ## Example: Tones
33
33
 
34
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>
35
+ import { Badge } from '@nexub/react';
36
+
37
+ export default function Example() {
38
+ return (
39
+ <div className="flex gap-2 flex-wrap items-center justify-center">
40
+ <Badge tone="success">Active</Badge>
41
+ <Badge tone="danger">Error</Badge>
42
+ <Badge tone="warning">Warning</Badge>
43
+ <Badge tone="info">Info</Badge>
44
+ <Badge tone="neutral">Draft</Badge>
45
+ </div>
46
+ );
47
+ }
42
48
  ```
43
49
 
44
50
  ## Example: Variants
45
51
 
46
52
  ```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>
53
+ import { Badge } from '@nexub/react';
54
+
55
+ export default function Example() {
56
+ return (
57
+ <div className="flex gap-2 flex-wrap items-center justify-center">
58
+ <Badge variant="solid" tone="success">Solid</Badge>
59
+ <Badge variant="soft" tone="info">Soft</Badge>
60
+ <Badge variant="outline" tone="warning">Outline</Badge>
61
+ </div>
62
+ );
63
+ }
52
64
  ```
53
65
 
54
66
  ## Example: With leading dot
55
67
 
56
68
  ```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>
69
+ import { Badge } from '@nexub/react';
70
+
71
+ export default function Example() {
72
+ return (
73
+ <div className="flex gap-2 flex-wrap items-center justify-center">
74
+ {(['success', 'danger', 'warning'] as const).map((t) => (
75
+ <Badge key={t} tone={t} leadingIcon={<span className="w-[6px] h-[6px] rounded-full bg-current inline-block" />}>
76
+ {t === 'success' ? 'Online' : t === 'danger' ? 'Offline' : 'Away'}
77
+ </Badge>
78
+ ))}
79
+ </div>
80
+ );
81
+ }
61
82
  ```
62
83
 
63
84
  ## Accessibility
@@ -17,16 +17,27 @@
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <Banner tone="info">New features available — <strong>see what's new</strong></Banner>
20
+ import { Banner } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return <Banner tone="info">New features available — <strong>see what&apos;s new</strong></Banner>;
24
+ }
21
25
  ```
22
26
 
23
27
  ## Example: With action
24
28
 
25
29
  ```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>
30
+ import { Banner, Button } from '@nexub/react';
31
+
32
+ export default function Example() {
33
+ return (
34
+ <Banner
35
+ tone="warning"
36
+ action={<Button variant="outline" size="sm">Review now</Button>}
37
+ onClose={() => {}}
38
+ >
39
+ Your payment method is expiring soon.
40
+ </Banner>
41
+ );
42
+ }
32
43
  ```
@@ -26,17 +26,39 @@ A grid of card tiles in mixed sizes. Responds to its own width: 1 column, 2 at 4
26
26
  ## Example: Dashboard
27
27
 
28
28
  ```tsx
29
- <BentoGrid>
30
- <BentoTile size="2x2">
31
- <h3 className="text-title-sm">Revenue, last 7 days</h3>
32
- <RevenueChart />
33
- </BentoTile>
34
- <BentoTile><StatTile label="Active users" value="12,480" /></BentoTile>
35
- <BentoTile><StatTile label="Conversion" value="3.2%" /></BentoTile>
36
- <BentoTile size="2x1">3 invoices awaiting approval.</BentoTile>
37
- <BentoTile><StatTile label="Churn" value="0.8%" /></BentoTile>
38
- <BentoTile><StatTile label="NPS" value="61" /></BentoTile>
39
- </BentoGrid>
29
+ import { BentoGrid, BentoTile } from '@nexub/patterns';
30
+
31
+ function BentoStat({ label, value }: { label: string; value: string }) {
32
+ return (
33
+ <BentoTile className="flex flex-col justify-between">
34
+ <span className="text-label-md text-[var(--color-on-surface-variant)]">{label}</span>
35
+ <span className="text-title-lg text-[var(--color-on-surface)]">{value}</span>
36
+ </BentoTile>
37
+ );
38
+ }
39
+
40
+ export default function Example() {
41
+ const bars = ['40%', '65%', '50%', '80%', '72%', '90%', '60%'];
42
+ return (
43
+ <BentoGrid className="w-full">
44
+ <BentoTile size="2x2" className="flex flex-col gap-3">
45
+ <h3 className="text-title-sm text-[var(--color-on-surface)]">Revenue, last 7 days</h3>
46
+ <div role="img" aria-label={`Bar chart: ${bars.join(', ')}`} className="flex flex-1 items-end gap-2">
47
+ {bars.map((h, i) => (
48
+ <div key={i} className="flex-1 rounded-shape-min bg-[var(--color-primary-container)]" style={{ height: h }} />
49
+ ))}
50
+ </div>
51
+ </BentoTile>
52
+ <BentoStat label="Active users" value="12,480" />
53
+ <BentoStat label="Conversion" value="3.2%" />
54
+ <BentoTile size="2x1" className="flex items-center text-body-md text-[var(--color-on-surface-variant)]">
55
+ 3 invoices awaiting approval.
56
+ </BentoTile>
57
+ <BentoStat label="Churn" value="0.8%" />
58
+ <BentoStat label="NPS" value="61" />
59
+ </BentoGrid>
60
+ );
61
+ }
40
62
  ```
41
63
 
42
64
  Related: [card](card.md), [stat-card](stat-card.md)