@usevyre/ai-context 1.2.1 → 1.3.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.0",
2
+ "version": "1.6.0",
3
3
  "rules": [
4
4
  {
5
5
  "component": "Accordion",
@@ -22,6 +22,27 @@
22
22
  "fix": "Use variant=\"info\" | \"success\" | \"warning\" | \"danger\"",
23
23
  "severity": "error"
24
24
  },
25
+ {
26
+ "component": "AlertDialog",
27
+ "pattern": "AlertDialog without open/onOpenChange (React) or v-model (Vue)",
28
+ "reason": "It is controlled; it never shows/closes without state",
29
+ "fix": "Drive open from state; close in onOpenChange / via v-model",
30
+ "severity": "error"
31
+ },
32
+ {
33
+ "component": "AlertDialog",
34
+ "pattern": "Using Alert (inline banner) for a confirm/cancel decision",
35
+ "reason": "Alert is non-blocking inline feedback, has no confirm flow",
36
+ "fix": "Use AlertDialog for blocking confirmation; Alert for passive messages",
37
+ "severity": "error"
38
+ },
39
+ {
40
+ "component": "AlertDialog",
41
+ "pattern": "variant=\"success\" or \"error\"",
42
+ "reason": "AlertDialog variant is \"danger\" | \"warning\" | \"info\" only",
43
+ "fix": "Use \"danger\" for destructive, \"warning\" to caution, \"info\" otherwise",
44
+ "severity": "error"
45
+ },
25
46
  {
26
47
  "component": "Avatar",
27
48
  "pattern": "size=\"xs\"",
@@ -99,6 +120,13 @@
99
120
  "fix": "Add aria-label describing the action",
100
121
  "severity": "error"
101
122
  },
123
+ {
124
+ "component": "Button",
125
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
126
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
127
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it",
128
+ "severity": "error"
129
+ },
102
130
  {
103
131
  "component": "Calendar",
104
132
  "pattern": "Calendar for an input field that opens a popover",
@@ -134,6 +162,13 @@
134
162
  "fix": "Use variant=\"elevated\" | \"outlined\" | \"ghost\" | \"accent\"",
135
163
  "severity": "error"
136
164
  },
165
+ {
166
+ "component": "Card",
167
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
168
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
169
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it",
170
+ "severity": "error"
171
+ },
137
172
  {
138
173
  "component": "Checkbox",
139
174
  "pattern": "size=\"lg\"",
@@ -232,6 +267,13 @@
232
267
  "fix": "Use v-model on <Input>/<Textarea> in Vue; in React use value + onChange",
233
268
  "severity": "error"
234
269
  },
270
+ {
271
+ "component": "Input",
272
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
273
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
274
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it",
275
+ "severity": "error"
276
+ },
235
277
  {
236
278
  "component": "Modal",
237
279
  "pattern": "size=\"xl\"",
@@ -484,6 +526,90 @@
484
526
  "fix": "Handle onSend(text, files) — map files to message attachments and append",
485
527
  "severity": "error"
486
528
  },
529
+ {
530
+ "component": "Stack",
531
+ "pattern": "<div style={{ display: 'flex', gap: 12 }}>",
532
+ "reason": "Inline flex styles bypass the design system and use magic-number spacing",
533
+ "fix": "Use <Stack gap=\"md\"> — gap is a token",
534
+ "severity": "error"
535
+ },
536
+ {
537
+ "component": "Stack",
538
+ "pattern": "gap={12} or gap=\"12px\"",
539
+ "reason": "Stack gap is a closed token enum",
540
+ "fix": "Use gap=\"none|xs|sm|md|lg|xl|2xl\"",
541
+ "severity": "error"
542
+ },
543
+ {
544
+ "component": "Stack",
545
+ "pattern": "direction=\"vertical\" / \"horizontal\"",
546
+ "reason": "Stack mirrors CSS flex-direction names",
547
+ "fix": "Use direction=\"row\" or \"column\" (also row-reverse / column-reverse)",
548
+ "severity": "error"
549
+ },
550
+ {
551
+ "component": "Stack",
552
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
553
+ "reason": "Inline width/height bypass the design system and use magic numbers",
554
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc.",
555
+ "severity": "error"
556
+ },
557
+ {
558
+ "component": "Grid",
559
+ "pattern": "<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr 1fr' }}>",
560
+ "reason": "Inline grid styles bypass the design system",
561
+ "fix": "Use <Grid columns={3} gap=\"md\">",
562
+ "severity": "error"
563
+ },
564
+ {
565
+ "component": "Grid",
566
+ "pattern": "columns=\"3\" (string)",
567
+ "reason": "columns is a number or the literal 'auto-fit'",
568
+ "fix": "Use columns={3} or columns=\"auto-fit\"",
569
+ "severity": "error"
570
+ },
571
+ {
572
+ "component": "Grid",
573
+ "pattern": "Nested div with inline grid-column for spanning",
574
+ "reason": "Spanning has a dedicated primitive",
575
+ "fix": "Wrap the cell in <GridItem colSpan={2}>",
576
+ "severity": "error"
577
+ },
578
+ {
579
+ "component": "Grid",
580
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
581
+ "reason": "Inline width/height bypass the design system and use magic numbers",
582
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc.",
583
+ "severity": "error"
584
+ },
585
+ {
586
+ "component": "GridItem",
587
+ "pattern": "GridItem outside a Grid",
588
+ "reason": "GridItem only has effect as a direct child of Grid",
589
+ "fix": "Place <GridItem> directly inside <Grid>",
590
+ "severity": "error"
591
+ },
592
+ {
593
+ "component": "Box",
594
+ "pattern": "<Box style={{ padding: 16 }}>",
595
+ "reason": "padding is a token prop; style is a last resort",
596
+ "fix": "Use <Box padding=\"md\"> (or paddingX/paddingTop/...)",
597
+ "severity": "error"
598
+ },
599
+ {
600
+ "component": "Box",
601
+ "pattern": "Using Box for flex/grid layout",
602
+ "reason": "Box is spacing-only and has no layout props",
603
+ "fix": "Use <Stack> or <Grid>",
604
+ "severity": "error"
605
+ },
606
+ {
607
+ "component": "Box",
608
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
609
+ "reason": "Inline width/height bypass the design system and use magic numbers",
610
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc.",
611
+ "severity": "error"
612
+ },
487
613
  {
488
614
  "component": "DateRangePicker",
489
615
  "pattern": "value={[from, to]}",
@@ -0,0 +1,41 @@
1
+ # AlertDialog — AI Cheat Sheet
2
+ > Quick reference for Claude / Cursor / Copilot
3
+
4
+ **Blocking confirmation modal (focus-trapped). Controlled via open + onOpenChange (React) / v-model (Vue). Use for destructive or irreversible actions that need explicit confirm/cancel. For non-blocking inline feedback use Alert; for general dialogs use Modal.**
5
+
6
+ ```ts
7
+ import { AlertDialog } from "@usevyre/react"
8
+ ```
9
+
10
+ ## Valid Props
11
+
12
+ | Prop | Values | Default |
13
+ |------|--------|---------|
14
+ | `variant` | `"danger"` \| `"warning"` \| `"info"` | `info` |
15
+ | `open` | `true` \| `false` | — |
16
+
17
+ ## Common AI Mistakes
18
+
19
+ - ❌ `AlertDialog without open/onOpenChange (React) or v-model (Vue)`
20
+ → Drive open from state; close in onOpenChange / via v-model
21
+ - ❌ `Using Alert (inline banner) for a confirm/cancel decision`
22
+ → Use AlertDialog for blocking confirmation; Alert for passive messages
23
+ - ❌ `variant="success" or "error"`
24
+ → Use "danger" for destructive, "warning" to caution, "info" otherwise
25
+
26
+ ## Examples
27
+
28
+ **Destructive confirmation**
29
+ ```tsx
30
+ const [open, setOpen] = useState(false);
31
+ <Button variant="danger" onClick={() => setOpen(true)}>Delete</Button>
32
+ <AlertDialog
33
+ open={open}
34
+ onOpenChange={setOpen}
35
+ variant="danger"
36
+ title="Delete project?"
37
+ description="This cannot be undone."
38
+ confirmLabel="Delete"
39
+ onConfirm={() => deleteProject()}
40
+ />
41
+ ```
@@ -0,0 +1,52 @@
1
+ # Box — AI Cheat Sheet
2
+ > Quick reference for Claude / Cursor / Copilot
3
+
4
+ **Spacing-only container plus a controlled escape hatch. Token padding/margin with shorthand, per-axis (X/Y) and per-side (Top/Right/Bottom/Left) overrides. The `style` prop is an explicit anti-pattern escape hatch. Renders a plain <div> (or `as`).**
5
+
6
+ ```ts
7
+ import { Box } from "@usevyre/react"
8
+ ```
9
+
10
+ ## Valid Props
11
+
12
+ | Prop | Values | Default |
13
+ |------|--------|---------|
14
+ | `padding` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
15
+ | `paddingX` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
16
+ | `paddingY` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
17
+ | `paddingTop` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
18
+ | `paddingRight` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
19
+ | `paddingBottom` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
20
+ | `paddingLeft` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
21
+ | `margin` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
22
+ | `marginX` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
23
+ | `marginY` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
24
+ | `marginTop` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
25
+ | `marginRight` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
26
+ | `marginBottom` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
27
+ | `marginLeft` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
28
+ | `width` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
29
+ | `height` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
30
+
31
+ ## Common AI Mistakes
32
+
33
+ - ❌ `<Box style={{ padding: 16 }}>`
34
+ → Use <Box padding="md"> (or paddingX/paddingTop/...)
35
+ - ❌ `Using Box for flex/grid layout`
36
+ → Use <Stack> or <Grid>
37
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}`
38
+ → Use the width / height prop: width="full", width="md", height="screen", etc.
39
+
40
+ ## Examples
41
+
42
+ **Asymmetric padding**
43
+ ```tsx
44
+ <Box as="section" paddingX="lg" paddingY="md">
45
+ <Heading>Settings</Heading>
46
+ </Box>
47
+ ```
48
+
49
+ **Vertical rhythm via margin-top**
50
+ ```tsx
51
+ <Box marginTop="xl"><Separator /></Box>
52
+ ```
@@ -28,6 +28,8 @@ import { Button } from "@usevyre/react"
28
28
  → Use leftIcon={...} or rightIcon={...}
29
29
  - ❌ `size="icon" without aria-label`
30
30
  → Add aria-label describing the action
31
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component`
32
+ → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
31
33
 
32
34
  ## Examples
33
35
 
@@ -19,6 +19,8 @@ import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
19
19
 
20
20
  - ❌ `variant="primary"`
21
21
  → Use variant="elevated" | "outlined" | "ghost" | "accent"
22
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component`
23
+ → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
22
24
 
23
25
  ## Examples
24
26
 
@@ -0,0 +1,50 @@
1
+ # Grid — AI Cheat Sheet
2
+ > Quick reference for Claude / Cursor / Copilot
3
+
4
+ **Two-dimensional CSS grid primitive. Explicit column/row counts (or auto-fit), auto-flow control, token gap. Pair with GridItem for cell spanning/placement. Renders a plain <div> (or `as`).**
5
+
6
+ ```ts
7
+ import { Grid, GridItem } from "@usevyre/react"
8
+ ```
9
+
10
+ ## Valid Props
11
+
12
+ | Prop | Values | Default |
13
+ |------|--------|---------|
14
+ | `flow` | `"row"` \| `"column"` \| `"dense"` \| `"row-dense"` \| `"column-dense"` | — |
15
+ | `gap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | `md` |
16
+ | `rowGap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
17
+ | `columnGap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
18
+ | `align` | `"start"` \| `"center"` \| `"end"` \| `"stretch"` | `stretch` |
19
+ | `justify` | `"start"` \| `"center"` \| `"end"` \| `"stretch"` | — |
20
+ | `width` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
21
+ | `height` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
22
+
23
+ ## Common AI Mistakes
24
+
25
+ - ❌ `<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr 1fr' }}>`
26
+ → Use <Grid columns={3} gap="md">
27
+ - ❌ `columns="3" (string)`
28
+ → Use columns={3} or columns="auto-fit"
29
+ - ❌ `Nested div with inline grid-column for spanning`
30
+ → Wrap the cell in <GridItem colSpan={2}>
31
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}`
32
+ → Use the width / height prop: width="full", width="md", height="screen", etc.
33
+
34
+ ## Examples
35
+
36
+ **Three-column grid with a wide first cell**
37
+ ```tsx
38
+ <Grid columns={3} gap="lg">
39
+ <GridItem colSpan={2}><Card>Wide</Card></GridItem>
40
+ <Card>Two</Card>
41
+ <Card>Three</Card>
42
+ </Grid>
43
+ ```
44
+
45
+ **Responsive auto-fit grid**
46
+ ```tsx
47
+ <Grid columns="auto-fit" gap="md">
48
+ {items.map((i) => <Card key={i.id}>{i.title}</Card>)}
49
+ </Grid>
50
+ ```
@@ -0,0 +1,24 @@
1
+ # GridItem — AI Cheat Sheet
2
+ > Quick reference for Claude / Cursor / Copilot
3
+
4
+ **Child placement inside <Grid>. Sets column/row span and start lines. Renders a plain <div> (or `as`).**
5
+
6
+ ```ts
7
+ import { GridItem } from "@usevyre/react"
8
+ ```
9
+
10
+ ## Common AI Mistakes
11
+
12
+ - ❌ `GridItem outside a Grid`
13
+ → Place <GridItem> directly inside <Grid>
14
+
15
+ ## Examples
16
+
17
+ **Span two columns**
18
+ ```tsx
19
+ <Grid columns={4} gap="md">
20
+ <GridItem colSpan={2}>Featured</GridItem>
21
+ <div>a</div>
22
+ <div>b</div>
23
+ </Grid>
24
+ ```
@@ -4,6 +4,7 @@ Quick reference for AI agents — one file per component.
4
4
 
5
5
  - [Accordion](accordion.md) — Vertically stacked collapsible sections. Compose with AccordionItem, AccordionTrigger, AccordionContent.
6
6
  - [Alert](alert.md) — Inline feedback message for info, success, warning, or danger states.
7
+ - [AlertDialog](alertdialog.md) — Blocking confirmation modal (focus-trapped). Controlled via open + onOpenChange (React) / v-model (Vue). Use for destructive or irreversible actions that need explicit confirm/cancel. For non-blocking inline feedback use Alert; for general dialogs use Modal.
7
8
  - [Avatar](avatar.md) — User profile image with fallback initials or icon.
8
9
  - [Badge](badge.md) — Small label for status, category, or count. Use dot prop for live status indicator.
9
10
  - [Breadcrumb](breadcrumb.md) — Navigation trail showing current page location in hierarchy.
@@ -44,4 +45,8 @@ Quick reference for AI agents — one file per component.
44
45
  - [Item](item.md) — Layout primitive for list rows, settings rows, and notification rows. Denser than Card — use Item (not Card) for repeated list rows.
45
46
  - [Kanban](kanban.md) — Drag-and-drop board: cards move between columns (or reorder within a column). CONTROLLED & data-driven like DataGrid. While dragging, a placeholder shows the exact drop position. Each card is wrapped in a Card (variant="outlined"); renderCard (React) / #card slot (Vue) can render ANY content incl. complex components (Avatar/Badge/Progress). Columns and cards accept an optional semantic color tint. Native HTML5 DnD, zero deps.
46
47
  - [Conversation](conversation.md) — Chat / inbox message thread. CONTROLLED & data-driven like Kanban — you own `value` (messages array) and append in your own send handler; Conversation holds no message state. Consecutive messages from the same author are grouped (avatar + name shown once), day separators are inserted on date change, and outgoing messages (authorId === currentUserId) align right.
48
+ - [Stack](stack.md) — Full one-dimensional flex layout primitive. USE INSTEAD OF <div style={{display:'flex'}}>. Covers the whole CSS flexbox surface (direction incl. reverse, wrap, align/justify/alignContent/alignSelf, grow/shrink/basis, per-axis gap) with token-locked spacing. Renders a plain <div> (or `as`).
49
+ - [Grid](grid.md) — Two-dimensional CSS grid primitive. Explicit column/row counts (or auto-fit), auto-flow control, token gap. Pair with GridItem for cell spanning/placement. Renders a plain <div> (or `as`).
50
+ - [GridItem](griditem.md) — Child placement inside <Grid>. Sets column/row span and start lines. Renders a plain <div> (or `as`).
51
+ - [Box](box.md) — Spacing-only container plus a controlled escape hatch. Token padding/margin with shorthand, per-axis (X/Y) and per-side (Top/Right/Bottom/Left) overrides. The `style` prop is an explicit anti-pattern escape hatch. Renders a plain <div> (or `as`).
47
52
  - [DateRangePicker](daterangepicker.md) — Start/end date range picker. Built on Calendar (mode=range) with a friendlier { from, to } object API, a two-month side-by-side view, and preset shortcuts. Use this for report/filter date ranges; use DatePicker for a single date.
@@ -21,6 +21,8 @@ import { Input } from "@usevyre/react"
21
21
  → Import Command from @usevyre/react for search palettes
22
22
  - ❌ `Vue: binding Input/Textarea value without v-model`
23
23
  → Use v-model on <Input>/<Textarea> in Vue; in React use value + onChange
24
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component`
25
+ → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
24
26
 
25
27
  ## Examples
26
28
 
@@ -0,0 +1,55 @@
1
+ # Stack — AI Cheat Sheet
2
+ > Quick reference for Claude / Cursor / Copilot
3
+
4
+ **Full one-dimensional flex layout primitive. USE INSTEAD OF <div style={{display:'flex'}}>. Covers the whole CSS flexbox surface (direction incl. reverse, wrap, align/justify/alignContent/alignSelf, grow/shrink/basis, per-axis gap) with token-locked spacing. Renders a plain <div> (or `as`).**
5
+
6
+ ```ts
7
+ import { Stack } from "@usevyre/react"
8
+ ```
9
+
10
+ ## Valid Props
11
+
12
+ | Prop | Values | Default |
13
+ |------|--------|---------|
14
+ | `direction` | `"row"` \| `"column"` \| `"row-reverse"` \| `"column-reverse"` | `row` |
15
+ | `gap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | `md` |
16
+ | `rowGap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
17
+ | `columnGap` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
18
+ | `align` | `"start"` \| `"center"` \| `"end"` \| `"stretch"` \| `"baseline"` | `stretch` |
19
+ | `justify` | `"start"` \| `"center"` \| `"end"` \| `"between"` \| `"around"` \| `"evenly"` | `start` |
20
+ | `alignContent` | `"start"` \| `"center"` \| `"end"` \| `"stretch"` \| `"between"` \| `"around"` \| `"evenly"` | — |
21
+ | `alignSelf` | `"auto"` \| `"start"` \| `"center"` \| `"end"` \| `"stretch"` \| `"baseline"` | — |
22
+ | `wrap` | `"nowrap"` \| `"wrap"` \| `"wrap-reverse"` | `nowrap` |
23
+ | `basis` | `"none"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` \| `"auto"` \| `"content"` \| `"0"` | — |
24
+ | `width` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
25
+ | `height` | `"auto"` \| `"full"` \| `"fit"` \| `"screen"` \| `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` \| `"2xl"` | — |
26
+ | `inline` | `true` \| `false` | `false` |
27
+
28
+ ## Common AI Mistakes
29
+
30
+ - ❌ `<div style={{ display: 'flex', gap: 12 }}>`
31
+ → Use <Stack gap="md"> — gap is a token
32
+ - ❌ `gap={12} or gap="12px"`
33
+ → Use gap="none|xs|sm|md|lg|xl|2xl"
34
+ - ❌ `direction="vertical" / "horizontal"`
35
+ → Use direction="row" or "column" (also row-reverse / column-reverse)
36
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}`
37
+ → Use the width / height prop: width="full", width="md", height="screen", etc.
38
+
39
+ ## Examples
40
+
41
+ **Row, vertically centered, spaced apart**
42
+ ```tsx
43
+ <Stack direction="row" gap="md" align="center" justify="between">
44
+ <Avatar src={user.avatar} />
45
+ <Text>{user.name}</Text>
46
+ <Button>Edit</Button>
47
+ </Stack>
48
+ ```
49
+
50
+ **Wrapping grid-ish gallery with per-axis gap**
51
+ ```tsx
52
+ <Stack wrap="wrap" rowGap="lg" columnGap="md">
53
+ {tags.map((t) => <Tag key={t}>{t}</Tag>)}
54
+ </Stack>
55
+ ```