@nexub/mcp 2.7.0 → 2.9.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,39 +19,40 @@ Scrollable container with custom styled scrollbars.
19
19
  ## Example: Default
20
20
 
21
21
  ```tsx
22
- <ScrollArea style={{ height: '200px', width: '280px', border: '1px solid var(--color-border-default)', borderRadius: 'var(--radius-md)', padding: '12px' }}>
23
- {Array.from({ length: 20 }, (_, i) => (
24
- <div key={i} style={{ padding: '4px 0', fontSize: '0.875rem', color: 'var(--color-text-secondary)' }}>
25
- Item {i + 1}
26
- </div>
27
- ))}
28
- </ScrollArea>
22
+ import { ScrollArea } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <ScrollArea className="h-[200px] w-[280px] border border-[var(--color-outline-variant)] rounded-shape-field p-3">
27
+ {Array.from({ length: 20 }, (_, i) => (
28
+ <div key={i} className="py-1 px-0 text-body-sm text-[var(--color-on-surface-variant)]">
29
+ List item {i + 1}
30
+ </div>
31
+ ))}
32
+ </ScrollArea>
33
+ );
34
+ }
29
35
  ```
30
36
 
31
37
  ## Example: Horizontal
32
38
 
33
39
  ```tsx
34
- <ScrollArea orientation="horizontal" style={{ width: '320px', border: '1px solid var(--color-border-default)', borderRadius: 'var(--radius-md)', padding: '12px' }}>
35
- <div style={{ display: 'flex', gap: '8px', width: 'max-content' }}>
36
- {Array.from({ length: 12 }, (_, i) => (
37
- <div
38
- key={i}
39
- style={{
40
- width: '80px',
41
- height: '80px',
42
- background: 'var(--color-bg-subtle)',
43
- borderRadius: 'var(--radius-sm)',
44
- display: 'flex',
45
- alignItems: 'center',
46
- justifyContent: 'center',
47
- fontSize: '0.75rem',
48
- color: 'var(--color-text-secondary)',
49
- flexShrink: 0,
50
- }}
51
- >
52
- Card {i + 1}
40
+ import { ScrollArea } from '@nexub/react';
41
+
42
+ export default function Example() {
43
+ return (
44
+ <ScrollArea orientation="horizontal" className="w-[320px] border border-[var(--color-outline-variant)] rounded-shape-field p-3">
45
+ <div className="flex gap-2 w-max">
46
+ {Array.from({ length: 12 }, (_, i) => (
47
+ <div
48
+ key={i}
49
+ className="w-[80px] h-[80px] bg-[var(--color-surface-container-low)] rounded-shape-tooltip flex items-center justify-center text-label-sm text-[var(--color-on-surface-variant)] shrink-0"
50
+ >
51
+ Card {i + 1}
52
+ </div>
53
+ ))}
53
54
  </div>
54
- ))}
55
- </div>
56
- </ScrollArea>
55
+ </ScrollArea>
56
+ );
57
+ }
57
58
  ```
@@ -18,5 +18,9 @@ A text input pre-wired with a search icon and a clear button for filtering conte
18
18
  ## Example: Default
19
19
 
20
20
  ```tsx
21
- <SearchInput placeholder="Search…" />
21
+ import { SearchInput } from '@nexub/react';
22
+
23
+ export default function Example() {
24
+ return <div className="w-[280px]"><SearchInput placeholder="Search…" /></div>;
25
+ }
22
26
  ```
@@ -17,28 +17,35 @@ Tab-style control for mutually exclusive selections.
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <SegmentedControl.Root defaultValue="month">
21
- <SegmentedControl.Item value="day">Day</SegmentedControl.Item>
22
- <SegmentedControl.Item value="week">Week</SegmentedControl.Item>
23
- <SegmentedControl.Item value="month">Month</SegmentedControl.Item>
24
- </SegmentedControl.Root>
20
+ import { SegmentedControl } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <SegmentedControl.Root defaultValue="month">
25
+ <SegmentedControl.Item value="day">Day</SegmentedControl.Item>
26
+ <SegmentedControl.Item value="week">Week</SegmentedControl.Item>
27
+ <SegmentedControl.Item value="month">Month</SegmentedControl.Item>
28
+ </SegmentedControl.Root>
29
+ );
30
+ }
25
31
  ```
26
32
 
27
33
  ## Example: Sizes
28
34
 
29
35
  ```tsx
30
- <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
31
- <SegmentedControl.Root defaultValue="b" size="sm">
32
- <SegmentedControl.Item value="a">Small A</SegmentedControl.Item>
33
- <SegmentedControl.Item value="b">Small B</SegmentedControl.Item>
34
- </SegmentedControl.Root>
35
- <SegmentedControl.Root defaultValue="b" size="md">
36
- <SegmentedControl.Item value="a">Medium A</SegmentedControl.Item>
37
- <SegmentedControl.Item value="b">Medium B</SegmentedControl.Item>
38
- </SegmentedControl.Root>
39
- <SegmentedControl.Root defaultValue="b" size="lg">
40
- <SegmentedControl.Item value="a">Large A</SegmentedControl.Item>
41
- <SegmentedControl.Item value="b">Large B</SegmentedControl.Item>
42
- </SegmentedControl.Root>
43
- </div>
36
+ import { SegmentedControl } from '@nexub/react';
37
+
38
+ export default function Example() {
39
+ return (
40
+ <div className="flex flex-col gap-3 items-start">
41
+ {(['sm', 'md', 'lg'] as const).map((s) => (
42
+ <SegmentedControl.Root key={s} size={s} defaultValue="a">
43
+ <SegmentedControl.Item value="a">A</SegmentedControl.Item>
44
+ <SegmentedControl.Item value="b">B</SegmentedControl.Item>
45
+ <SegmentedControl.Item value="c">C</SegmentedControl.Item>
46
+ </SegmentedControl.Root>
47
+ ))}
48
+ </div>
49
+ );
50
+ }
44
51
  ```
@@ -32,12 +32,20 @@ Accessible dropdown select built on Radix UI. Supports groups and search.
32
32
  ## Example: Default
33
33
 
34
34
  ```tsx
35
- <Select.Root>
36
- <Select.Trigger placeholder="Pick a fruit" />
37
- <Select.Content>
38
- <Select.Item value="apple">Apple</Select.Item>
39
- <Select.Item value="banana">Banana</Select.Item>
40
- <Select.Item value="cherry">Cherry</Select.Item>
41
- </Select.Content>
42
- </Select.Root>
35
+ import { Select } from '@nexub/react';
36
+
37
+ export default function Example() {
38
+ return (
39
+ <div className="w-[220px]">
40
+ <Select.Root>
41
+ <Select.Trigger><Select.Value placeholder="Select an option…" /></Select.Trigger>
42
+ <Select.Content>
43
+ <Select.Item value="option-1">Option 1</Select.Item>
44
+ <Select.Item value="option-2">Option 2</Select.Item>
45
+ <Select.Item value="option-3">Option 3</Select.Item>
46
+ </Select.Content>
47
+ </Select.Root>
48
+ </div>
49
+ );
50
+ }
43
51
  ```
@@ -16,15 +16,25 @@ A horizontal or vertical visual divider.
16
16
  ## Example: Default
17
17
 
18
18
  ```tsx
19
- <Separator />
19
+ import { Separator } from '@nexub/react';
20
+
21
+ export default function Example() {
22
+ return <div className="w-[280px]"><Separator /></div>;
23
+ }
20
24
  ```
21
25
 
22
26
  ## Example: Vertical
23
27
 
24
28
  ```tsx
25
- <div style={{ display: 'flex', height: '32px', alignItems: 'center', gap: '16px' }}>
26
- <span>Left</span>
27
- <Separator orientation="vertical" />
28
- <span>Right</span>
29
- </div>
29
+ import { Separator } from '@nexub/react';
30
+
31
+ export default function Example() {
32
+ return (
33
+ <div className="flex h-[32px] items-center gap-4">
34
+ <span className="text-[var(--color-on-surface-variant)] text-body-sm">Left</span>
35
+ <Separator orientation="vertical" />
36
+ <span className="text-[var(--color-on-surface-variant)] text-body-sm">Right</span>
37
+ </div>
38
+ );
39
+ }
30
40
  ```
@@ -18,14 +18,23 @@ Grouped settings panel with title, description, and action area.
18
18
  ## Example: Default
19
19
 
20
20
  ```tsx
21
- <SettingsSection
22
- title="Profile"
23
- description="Update your personal information."
24
- action={<Button size="sm">Save changes</Button>}
25
- >
26
- <div style={{ display: 'flex', flexDirection: 'column', gap: '12px', maxWidth: '400px' }}>
27
- <Input placeholder="Display name" />
28
- <Input placeholder="Email address" type="email" />
29
- </div>
30
- </SettingsSection>
21
+ import { SettingsSection } from '@nexub/patterns';
22
+ import { Switch } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <div className="w-full max-w-[560px]">
27
+ <SettingsSection title="Notifications" description="Control how and when you receive notifications.">
28
+ <div className="flex flex-col gap-3 items-start">
29
+ {['Email alerts', 'Push notifications'].map((item) => (
30
+ <div key={item} className="flex items-center justify-between">
31
+ <span className="text-body-sm text-[var(--color-on-surface)]">{item}</span>
32
+ <Switch defaultChecked />
33
+ </div>
34
+ ))}
35
+ </div>
36
+ </SettingsSection>
37
+ </div>
38
+ );
39
+ }
31
40
  ```
@@ -26,26 +26,29 @@ Alias for Drawer — slide-in sheet panel.
26
26
  ## Example: Default
27
27
 
28
28
  ```tsx
29
- <Sheet.Root>
30
- <Sheet.Trigger asChild>
31
- <Button variant="outline">Open sheet</Button>
32
- </Sheet.Trigger>
33
- <Sheet.Portal>
34
- <Sheet.Overlay />
35
- <Sheet.Content side="right">
36
- <Sheet.Header>
37
- <Sheet.Title>Notifications</Sheet.Title>
38
- <Sheet.Description>Review your latest activity.</Sheet.Description>
39
- </Sheet.Header>
40
- <div style={{ padding: '16px', flex: 1 }}>
41
- <Text size="body-sm" tone="secondary">No new notifications.</Text>
42
- </div>
43
- <Sheet.Footer>
44
- <Sheet.Close asChild>
45
- <Button variant="outline">Close</Button>
46
- </Sheet.Close>
47
- </Sheet.Footer>
48
- </Sheet.Content>
49
- </Sheet.Portal>
50
- </Sheet.Root>
29
+ import * as React from 'react';
30
+ import { Button, Sheet, Text } from '@nexub/react';
31
+
32
+ export default function Example() {
33
+ const [open, setOpen] = React.useState(false);
34
+ return (
35
+ <>
36
+ <Button variant="outline" onClick={() => setOpen(true)}>Open Sheet</Button>
37
+ <Sheet.Root open={open} onOpenChange={setOpen}>
38
+ <Sheet.Portal>
39
+ <Sheet.Overlay />
40
+ <Sheet.Content side="right">
41
+ <Sheet.Header>
42
+ <Sheet.Title>Notifications</Sheet.Title>
43
+ <Sheet.Description>Your recent activity</Sheet.Description>
44
+ </Sheet.Header>
45
+ <div className="p-4 flex-1">
46
+ <Text size="body-sm" tone="muted">No new notifications.</Text>
47
+ </div>
48
+ </Sheet.Content>
49
+ </Sheet.Portal>
50
+ </Sheet.Root>
51
+ </>
52
+ );
53
+ }
51
54
  ```
@@ -18,21 +18,38 @@ Placeholder loading animation that mimics content layout.
18
18
  ## Example: Default
19
19
 
20
20
  ```tsx
21
- <div style={{ display: 'flex', flexDirection: 'column', gap: '12px', width: '280px', padding: '16px', border: '1px solid #e5e7eb', borderRadius: '8px' }}>
22
- <Skeleton shape="circle" width={40} height={40} />
23
- <Skeleton shape="line" width="60%" height={12} />
24
- <Skeleton shape="line" width="100%" height={12} />
25
- <Skeleton shape="line" width="80%" height={12} />
26
- <Skeleton shape="rect" width="100%" height={80} />
27
- </div>
21
+ import { Skeleton } from '@nexub/react';
22
+
23
+ export default function Example() {
24
+ return (
25
+ <div className="flex flex-col gap-2 items-start w-[280px]">
26
+ <Skeleton shape="line" width="60%" />
27
+ <Skeleton shape="line" width="100%" />
28
+ <Skeleton shape="line" width="80%" />
29
+ <div className="flex gap-2 flex-nowrap items-center justify-center">
30
+ <Skeleton shape="circle" width={40} height={40} />
31
+ <div className="flex flex-col gap-1.5 items-start flex-1">
32
+ <Skeleton shape="line" width="70%" />
33
+ <Skeleton shape="line" width="50%" />
34
+ </div>
35
+ </div>
36
+ </div>
37
+ );
38
+ }
28
39
  ```
29
40
 
30
41
  ## Example: Shapes
31
42
 
32
43
  ```tsx
33
- <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
34
- <Skeleton shape="line" width={120} height={12} />
35
- <Skeleton shape="rect" width={80} height={60} />
36
- <Skeleton shape="circle" width={40} height={40} />
37
- </div>
44
+ import { Skeleton } from '@nexub/react';
45
+
46
+ export default function Example() {
47
+ return (
48
+ <div className="flex gap-4 flex-wrap items-center justify-center">
49
+ <Skeleton shape="line" width={80} />
50
+ <Skeleton shape="rect" width={80} height={40} />
51
+ <Skeleton shape="circle" width={40} height={40} />
52
+ </div>
53
+ );
54
+ }
38
55
  ```
@@ -21,11 +21,19 @@ Range slider built on Radix UI Slider.
21
21
  ## Example: Default
22
22
 
23
23
  ```tsx
24
- <Slider defaultValue={[50]} min={0} max={100} style={{ width: '240px' }} />
24
+ import { Slider } from '@nexub/react';
25
+
26
+ export default function Example() {
27
+ return <div className="w-[240px]"><Slider defaultValue={[50]} min={0} max={100} /></div>;
28
+ }
25
29
  ```
26
30
 
27
31
  ## Example: Range
28
32
 
29
33
  ```tsx
30
- <Slider defaultValue={[20, 80]} min={0} max={100} style={{ width: '240px' }} />
34
+ import { Slider } from '@nexub/react';
35
+
36
+ export default function Example() {
37
+ return <div className="w-[240px]"><Slider defaultValue={[20, 80]} min={0} max={100} /></div>;
38
+ }
31
39
  ```
@@ -16,17 +16,26 @@ Animated loading indicator. Inherits color from context.
16
16
  ## Example: Sizes
17
17
 
18
18
  ```tsx
19
- <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
20
- <Spinner size="xs" />
21
- <Spinner size="sm" />
22
- <Spinner size="md" />
23
- <Spinner size="lg" />
24
- <Spinner size="xl" />
25
- </div>
19
+ import { Spinner } from '@nexub/react';
20
+
21
+ export default function Example() {
22
+ return <div className="flex gap-5 flex-wrap items-center justify-center"><Spinner size="sm" /><Spinner size="md" /><Spinner size="lg" /><Spinner size="xl" /></div>;
23
+ }
26
24
  ```
27
25
 
28
26
  ## Example: Inside button
29
27
 
30
28
  ```tsx
31
- <Button loading>Saving…</Button>
29
+ import { Spinner } from '@nexub/react';
30
+
31
+ export default function Example() {
32
+ return (
33
+ <div className="flex gap-5 flex-wrap items-center justify-center">
34
+ <Spinner size="md" tone="info" />
35
+ <Spinner size="md" tone="success" />
36
+ <Spinner size="md" tone="warning" />
37
+ <Spinner size="md" tone="danger" />
38
+ </div>
39
+ );
40
+ }
32
41
  ```
@@ -18,26 +18,37 @@ A primary action with related secondary actions behind a chevron, as one connect
18
18
  ## Example: Default
19
19
 
20
20
  ```tsx
21
- <SplitButton
22
- onClick={save}
23
- menuLabel="More save options"
24
- menu={
25
- <>
26
- <DropdownMenu.Item>Save as draft</DropdownMenu.Item>
27
- <DropdownMenu.Item>Save a copy</DropdownMenu.Item>
28
- </>
29
- }
30
- >
31
- Save
32
- </SplitButton>
21
+ import { SplitButton, DropdownMenu } from '@nexub/react';
22
+
23
+ export default function Example() {
24
+ return (
25
+ <SplitButton
26
+ menuLabel="More save options"
27
+ menu={
28
+ <>
29
+ <DropdownMenu.Item>Save as draft</DropdownMenu.Item>
30
+ <DropdownMenu.Item>Save a copy</DropdownMenu.Item>
31
+ </>
32
+ }
33
+ >
34
+ Save
35
+ </SplitButton>
36
+ );
37
+ }
33
38
  ```
34
39
 
35
40
  ## Example: Outlined
36
41
 
37
42
  ```tsx
38
- <SplitButton variant="outlined" menuLabel="More export options" menu={<DropdownMenu.Item>CSV</DropdownMenu.Item>}>
39
- Export
40
- </SplitButton>
43
+ import { SplitButton, DropdownMenu } from '@nexub/react';
44
+
45
+ export default function Example() {
46
+ return (
47
+ <SplitButton variant="outlined" menuLabel="More export options" menu={<DropdownMenu.Item>CSV</DropdownMenu.Item>}>
48
+ Export
49
+ </SplitButton>
50
+ );
51
+ }
41
52
  ```
42
53
 
43
54
  Related: [button](button.md), [button-group](button-group.md), [dropdown-menu](dropdown-menu.md)
@@ -17,19 +17,31 @@ Vertical stack layout with configurable gap.
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <Stack gap="md">
21
- <Button variant="outline">Item 1</Button>
22
- <Button variant="outline">Item 2</Button>
23
- <Button variant="outline">Item 3</Button>
24
- </Stack>
20
+ import { Stack, Button } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <Stack gap="md">
25
+ <Button variant="outline">Item 1</Button>
26
+ <Button variant="outline">Item 2</Button>
27
+ <Button variant="outline">Item 3</Button>
28
+ </Stack>
29
+ );
30
+ }
25
31
  ```
26
32
 
27
33
  ## Example: With dividers
28
34
 
29
35
  ```tsx
30
- <Stack gap="md" dividers>
31
- <Text>First section</Text>
32
- <Text>Second section</Text>
33
- <Text>Third section</Text>
34
- </Stack>
36
+ import { Stack, Separator, Text } from '@nexub/react';
37
+
38
+ export default function Example() {
39
+ return (
40
+ <Stack gap="md" divider={<Separator />} className="w-[220px]">
41
+ <Text size="body-sm">First item</Text>
42
+ <Text size="body-sm">Second item</Text>
43
+ <Text size="body-sm">Third item</Text>
44
+ </Stack>
45
+ );
46
+ }
35
47
  ```
@@ -22,29 +22,48 @@ Metric display card showing a KPI value, label, optional delta, and icon.
22
22
  ## Example: Default
23
23
 
24
24
  ```tsx
25
- <StatCard
26
- label="Total Revenue"
27
- value="$48,295"
28
- delta="+12.5%"
29
- deltaType="increase"
30
- description="vs last month"
31
- />
25
+ import { StatCard } from '@nexub/patterns';
26
+
27
+ export default function Example() {
28
+ return (
29
+ <div className="w-[240px]">
30
+ <StatCard label="Total Revenue" value="$48,295" delta="+12.5%" deltaType="increase" description="vs last month" />
31
+ </div>
32
+ );
33
+ }
32
34
  ```
33
35
 
34
36
  ## Example: With icon
35
37
 
36
38
  ```tsx
37
- <StatCard
38
- label="Active Users"
39
- value="2,841"
40
- delta="-3.2%"
41
- deltaType="decrease"
42
- icon={<Users size={20} />}
43
- />
39
+ import { StatCard } from '@nexub/patterns';
40
+
41
+ export default function Example() {
42
+ return (
43
+ <div className="flex gap-3 flex-wrap items-center justify-center">
44
+ <StatCard label="Users" value="2,841" delta="+8.3%" deltaType="increase" />
45
+ <StatCard label="Churn" value="3.2%" delta="-0.4%" deltaType="decrease" />
46
+ </div>
47
+ );
48
+ }
44
49
  ```
45
50
 
46
51
  ## Example: Animated
47
52
 
48
53
  ```tsx
49
- <StatCard label="Orders today" value={orders.toLocaleString()} animate />
54
+ import * as React from 'react';
55
+ import { StatCard } from '@nexub/patterns';
56
+ import { Button } from '@nexub/react';
57
+
58
+ export default function Example() {
59
+ const [orders, setOrders] = React.useState(1284);
60
+ return (
61
+ <div className="flex flex-col gap-3 items-stretch w-[240px]">
62
+ <StatCard label="Orders today" value={orders.toLocaleString('en-US')} animate />
63
+ <Button size="sm" variant="outlined" onClick={() => setOrders((o) => o + Math.ceil(Math.random() * 40))}>
64
+ New orders
65
+ </Button>
66
+ </div>
67
+ );
68
+ }
50
69
  ```
@@ -17,21 +17,27 @@
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <div style={{ display: 'flex', gap: '8px' }}>
21
- <StatusPill tone="success" label="Active" />
22
- <StatusPill tone="warning" label="Pending" />
23
- <StatusPill tone="danger" label="Error" />
24
- <StatusPill tone="neutral" label="Draft" />
25
- <StatusPill tone="info" label="Syncing" />
26
- </div>
20
+ import { StatusPill } from '@nexub/react';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <div className="flex gap-2 flex-wrap items-center justify-center">
25
+ <StatusPill tone="success" label="Active" />
26
+ <StatusPill tone="warning" label="Pending" />
27
+ <StatusPill tone="danger" label="Error" />
28
+ <StatusPill tone="neutral" label="Draft" />
29
+ <StatusPill tone="info" label="Syncing" />
30
+ </div>
31
+ );
32
+ }
27
33
  ```
28
34
 
29
35
  ## Example: With dot
30
36
 
31
37
  ```tsx
32
- <div style={{ display: 'flex', gap: '8px' }}>
33
- <StatusPill tone="success" dot label="Live" />
34
- <StatusPill tone="info" dot label="Syncing" />
35
- <StatusPill tone="warning" dot label="Degraded" />
36
- </div>
38
+ import { StatusPill } from '@nexub/react';
39
+
40
+ export default function Example() {
41
+ return <StatusPill tone="success" dot label="Live" />;
42
+ }
37
43
  ```
@@ -17,13 +17,14 @@ Visual progress indicator for multi-step flows like onboarding or checkout.
17
17
  ## Example: Default
18
18
 
19
19
  ```tsx
20
- <StepIndicator
21
- currentStep={1}
22
- steps={[
23
- { label: 'Account' },
24
- { label: 'Profile' },
25
- { label: 'Payment' },
26
- { label: 'Review' },
27
- ]}
28
- />
20
+ import { StepIndicator } from '@nexub/patterns';
21
+
22
+ export default function Example() {
23
+ return (
24
+ <StepIndicator
25
+ currentStep={1}
26
+ steps={[{ label: 'Account' }, { label: 'Profile' }, { label: 'Billing' }, { label: 'Done' }]}
27
+ />
28
+ );
29
+ }
29
30
  ```