@usevyre/ai-context 1.2.2 → 1.4.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 (38) hide show
  1. package/dist/anti-patterns.json +393 -1
  2. package/dist/cheat-sheets/box.md +52 -0
  3. package/dist/cheat-sheets/button.md +2 -0
  4. package/dist/cheat-sheets/card.md +2 -0
  5. package/dist/cheat-sheets/carousel.md +50 -0
  6. package/dist/cheat-sheets/carouselslide.md +22 -0
  7. package/dist/cheat-sheets/emptystate.md +48 -0
  8. package/dist/cheat-sheets/form.md +50 -0
  9. package/dist/cheat-sheets/formfield.md +22 -0
  10. package/dist/cheat-sheets/grid.md +50 -0
  11. package/dist/cheat-sheets/griditem.md +24 -0
  12. package/dist/cheat-sheets/index.md +22 -0
  13. package/dist/cheat-sheets/input.md +2 -0
  14. package/dist/cheat-sheets/numberinput.md +41 -0
  15. package/dist/cheat-sheets/otpinput.md +51 -0
  16. package/dist/cheat-sheets/stack.md +55 -0
  17. package/dist/cheat-sheets/stat.md +41 -0
  18. package/dist/cheat-sheets/statgroup.md +23 -0
  19. package/dist/cheat-sheets/step.md +8 -0
  20. package/dist/cheat-sheets/steppanel.md +8 -0
  21. package/dist/cheat-sheets/stepper.md +59 -0
  22. package/dist/cheat-sheets/steppernav.md +8 -0
  23. package/dist/cheat-sheets/timeline.md +40 -0
  24. package/dist/cheat-sheets/timelineitem.md +28 -0
  25. package/dist/cheat-sheets/togglegroup.md +55 -0
  26. package/dist/cheat-sheets/toggleitem.md +29 -0
  27. package/dist/cheat-sheets/tree.md +48 -0
  28. package/dist/claude-context.md +770 -1
  29. package/dist/copilot-instructions.md +770 -1
  30. package/dist/cursor-rules.md +269 -1
  31. package/dist/full-context.md +769 -0
  32. package/dist/index.js +10427 -4763
  33. package/dist/schema.json +1680 -3
  34. package/dist/tokens.json +1 -1
  35. package/dist/tokens.md +1 -1
  36. package/dist/version-info.json +320 -91
  37. package/dist/windsurf-rules.md +770 -1
  38. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  # useVyre Copilot Instructions
2
- # Version: 1.2.0
2
+ # Version: 1.16.0
3
3
 
4
4
  When generating UI code in this project, follow the useVyre design system rules below.
5
5
 
@@ -344,6 +344,7 @@ import { Button } from "@usevyre/react"
344
344
  - ❌ `color="..."` → Use variant prop instead
345
345
  - ❌ `icon={...}` → Use leftIcon={...} or rightIcon={...}
346
346
  - ❌ `size="icon" without aria-label` → Add aria-label describing the action
347
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
347
348
 
348
349
  ---
349
350
 
@@ -429,6 +430,7 @@ import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
429
430
 
430
431
  **Common mistakes:**
431
432
  - ❌ `variant="primary"` → Use variant="elevated" | "outlined" | "ghost" | "accent"
433
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
432
434
 
433
435
  ---
434
436
 
@@ -640,6 +642,7 @@ import { Input } from "@usevyre/react"
640
642
  - ❌ `size="icon"` → Use size="sm" | "md" | "lg"
641
643
  - ❌ `type="search" for search UI` → Import Command from @usevyre/react for search palettes
642
644
  - ❌ `Vue: binding Input/Textarea value without v-model` → Use v-model on <Input>/<Textarea> in Vue; in React use value + onChange
645
+ - ❌ `padding / margin / marginTop (any spacing prop) on a useVyre component` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
643
646
 
644
647
  ---
645
648
 
@@ -1382,6 +1385,716 @@ const messages = [
1382
1385
 
1383
1386
  ---
1384
1387
 
1388
+ ### Stack
1389
+
1390
+ 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`).
1391
+
1392
+ ```tsx
1393
+ import { Stack } from "@usevyre/react"
1394
+
1395
+ // Props:
1396
+ // direction = "row" | "column" | "row-reverse" | "column-reverse" (default: row)
1397
+ // inline = boolean (default: false)
1398
+ // gap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" (default: md)
1399
+ // rowGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1400
+ // columnGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1401
+ // align = "start" | "center" | "end" | "stretch" | "baseline" (default: stretch)
1402
+ // justify = "start" | "center" | "end" | "between" | "around" | "evenly" (default: start)
1403
+ // alignContent = "start" | "center" | "end" | "stretch" | "between" | "around" | "evenly"
1404
+ // alignSelf = "auto" | "start" | "center" | "end" | "stretch" | "baseline"
1405
+ // wrap = "nowrap" | "wrap" | "wrap-reverse" (default: nowrap)
1406
+ // grow = number
1407
+ // shrink = number
1408
+ // basis = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "auto" | "content" | "0"
1409
+ // width = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1410
+ // height = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1411
+ // as = string (default: div)
1412
+
1413
+ // Examples:
1414
+ <Stack direction="row" gap="md" align="center" justify="between">
1415
+ <Avatar src={user.avatar} />
1416
+ <Text>{user.name}</Text>
1417
+ <Button>Edit</Button>
1418
+ </Stack>
1419
+ <Stack wrap="wrap" rowGap="lg" columnGap="md">
1420
+ {tags.map((t) => <Tag key={t}>{t}</Tag>)}
1421
+ </Stack>
1422
+ ```
1423
+
1424
+ **Common mistakes:**
1425
+ - ❌ `<div style={{ display: 'flex', gap: 12 }}>` → Use <Stack gap="md"> — gap is a token
1426
+ - ❌ `gap={12} or gap="12px"` → Use gap="none|xs|sm|md|lg|xl|2xl"
1427
+ - ❌ `direction="vertical" / "horizontal"` → Use direction="row" or "column" (also row-reverse / column-reverse)
1428
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}` → Use the width / height prop: width="full", width="md", height="screen", etc.
1429
+
1430
+ ---
1431
+
1432
+ ### Grid
1433
+
1434
+ 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`).
1435
+
1436
+ ```tsx
1437
+ import { Grid, GridItem } from "@usevyre/react"
1438
+
1439
+ // Props:
1440
+ // columns = number | "auto-fit" (default: 1)
1441
+ // rows = number | "auto"
1442
+ // flow = "row" | "column" | "dense" | "row-dense" | "column-dense"
1443
+ // gap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" (default: md)
1444
+ // rowGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1445
+ // columnGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1446
+ // align = "start" | "center" | "end" | "stretch" (default: stretch)
1447
+ // justify = "start" | "center" | "end" | "stretch"
1448
+ // width = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1449
+ // height = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1450
+ // as = string (default: div)
1451
+
1452
+ // Examples:
1453
+ <Grid columns={3} gap="lg">
1454
+ <GridItem colSpan={2}><Card>Wide</Card></GridItem>
1455
+ <Card>Two</Card>
1456
+ <Card>Three</Card>
1457
+ </Grid>
1458
+ <Grid columns="auto-fit" gap="md">
1459
+ {items.map((i) => <Card key={i.id}>{i.title}</Card>)}
1460
+ </Grid>
1461
+ ```
1462
+
1463
+ **Common mistakes:**
1464
+ - ❌ `<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr 1fr' }}>` → Use <Grid columns={3} gap="md">
1465
+ - ❌ `columns="3" (string)` → Use columns={3} or columns="auto-fit"
1466
+ - ❌ `Nested div with inline grid-column for spanning` → Wrap the cell in <GridItem colSpan={2}>
1467
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}` → Use the width / height prop: width="full", width="md", height="screen", etc.
1468
+
1469
+ ---
1470
+
1471
+ ### GridItem
1472
+
1473
+ Child placement inside <Grid>. Sets column/row span and start lines. Renders a plain <div> (or `as`).
1474
+
1475
+ ```tsx
1476
+ import { GridItem } from "@usevyre/react"
1477
+
1478
+ // Props:
1479
+ // colSpan = number
1480
+ // rowSpan = number
1481
+ // colStart = number
1482
+ // rowStart = number
1483
+ // as = string (default: div)
1484
+
1485
+ // Examples:
1486
+ <Grid columns={4} gap="md">
1487
+ <GridItem colSpan={2}>Featured</GridItem>
1488
+ <div>a</div>
1489
+ <div>b</div>
1490
+ </Grid>
1491
+ ```
1492
+
1493
+ **Common mistakes:**
1494
+ - ❌ `GridItem outside a Grid` → Place <GridItem> directly inside <Grid>
1495
+
1496
+ ---
1497
+
1498
+ ### Box
1499
+
1500
+ 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`).
1501
+
1502
+ ```tsx
1503
+ import { Box } from "@usevyre/react"
1504
+
1505
+ // Props:
1506
+ // padding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1507
+ // paddingX = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1508
+ // paddingY = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1509
+ // paddingTop = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1510
+ // paddingRight = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1511
+ // paddingBottom = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1512
+ // paddingLeft = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1513
+ // margin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1514
+ // marginX = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1515
+ // marginY = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1516
+ // marginTop = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1517
+ // marginRight = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1518
+ // marginBottom = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1519
+ // marginLeft = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1520
+ // width = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1521
+ // height = "auto" | "full" | "fit" | "screen" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
1522
+ // as = string (default: div)
1523
+ // style = React.CSSProperties
1524
+
1525
+ // Examples:
1526
+ <Box as="section" paddingX="lg" paddingY="md">
1527
+ <Heading>Settings</Heading>
1528
+ </Box>
1529
+ <Box marginTop="xl"><Separator /></Box>
1530
+ ```
1531
+
1532
+ **Common mistakes:**
1533
+ - ❌ `<Box style={{ padding: 16 }}>` → Use <Box padding="md"> (or paddingX/paddingTop/...)
1534
+ - ❌ `Using Box for flex/grid layout` → Use <Stack> or <Grid>
1535
+ - ❌ `style={{ width: "100%" }} / style={{ height: 320 }}` → Use the width / height prop: width="full", width="md", height="screen", etc.
1536
+
1537
+ ---
1538
+
1539
+ ### Form
1540
+
1541
+ Controlled, data-driven form. Zero dependencies. Validation runs on submit and (after the first submit) on blur. Errors map into the wrapped Field automatically (state=error + hint=message). Compose with FormField, which wires name/value/onChange/onBlur into a single control child.
1542
+
1543
+ ```tsx
1544
+ import { Form, FormField } from "@usevyre/react"
1545
+
1546
+ // Props:
1547
+ // values = Record<string, any>
1548
+ // defaultValues = Record<string, any>
1549
+ // onChange = function
1550
+ // onSubmit = function
1551
+ // onInvalid = function
1552
+
1553
+ // Examples:
1554
+ const [values, setValues] = useState({ email: "", password: "" });
1555
+
1556
+ <Form values={values} onChange={setValues} onSubmit={(v) => signIn(v)}>
1557
+ <FormField name="email" label="Email" rules={{ required: true, email: true }}>
1558
+ <Input type="email" />
1559
+ </FormField>
1560
+ <FormField name="password" label="Password" rules={{ required: true, minLength: 8 }}>
1561
+ <Input type="password" />
1562
+ </FormField>
1563
+ <Button type="submit" variant="primary">Sign in</Button>
1564
+ </Form>
1565
+ <FormField
1566
+ name="confirm"
1567
+ label="Confirm password"
1568
+ rules={{
1569
+ required: true,
1570
+ validate: (v, all) => v === all.password ? null : "Passwords do not match",
1571
+ }}
1572
+ >
1573
+ <Input type="password" />
1574
+ </FormField>
1575
+ ```
1576
+
1577
+ **Common mistakes:**
1578
+ - ❌ `Manually tracking each field's error state with useState` → Wrap controls in <FormField name rules> and let Form manage errors
1579
+ - ❌ `Adding a validation library (zod/yup) just for basic rules` → Use rules={{ required, minLength, pattern, email, validate }}
1580
+ - ❌ `<FormField> with multiple control children` → Use one control per FormField (Input/Textarea/Select/etc.)
1581
+ - ❌ `<FormField> outside a <Form>` → Always nest FormField inside <Form>
1582
+
1583
+ ---
1584
+
1585
+ ### FormField
1586
+
1587
+ A single labelled, validated field inside <Form>. Injects name/value/onChange/onBlur into its one control child and wraps it in <Field> (label + error state + hint).
1588
+
1589
+ ```tsx
1590
+ import { FormField } from "@usevyre/react"
1591
+
1592
+ // Props:
1593
+ // name = string
1594
+ // label = string
1595
+ // hint = string
1596
+ // rules = object
1597
+
1598
+ // Examples:
1599
+ <FormField name="bio" label="Bio" hint="Max 200 characters" rules={{ maxLength: 200 }}>
1600
+ <Textarea />
1601
+ </FormField>
1602
+ ```
1603
+
1604
+ **Common mistakes:**
1605
+ - ❌ `Putting onChange/value manually on the control inside FormField` → Let FormField wire the control; only pass static props (type, placeholder)
1606
+
1607
+ ---
1608
+
1609
+ ### NumberInput
1610
+
1611
+ Controlled numeric input with −/+ stepper buttons. onChange emits a NUMBER (or null when empty) — NOT an event. Drops straight into <FormField> (Form handles the non-event value). Clamps to min/max on blur; keyboard ArrowUp/Down ±step, Shift+Arrow ±step×10.
1612
+
1613
+ ```tsx
1614
+ import { NumberInput } from "@usevyre/react"
1615
+
1616
+ // Props:
1617
+ // value = number | null
1618
+ // defaultValue = number | null (default: null)
1619
+ // onChange = function
1620
+ // min = number
1621
+ // max = number
1622
+ // step = number (default: 1)
1623
+ // precision = number
1624
+ // size = "sm" | "md" | "lg" (default: md)
1625
+ // disabled = boolean (default: false)
1626
+ // readOnly = boolean (default: false)
1627
+
1628
+ // Examples:
1629
+ const [qty, setQty] = useState<number | null>(1);
1630
+
1631
+ <NumberInput value={qty} onChange={setQty} min={1} max={99} />
1632
+ <FormField name="age" label="Age" rules={{ required: true, min: 18 }}>
1633
+ <NumberInput min={0} max={120} />
1634
+ </FormField>
1635
+ ```
1636
+
1637
+ **Common mistakes:**
1638
+ - ❌ `onChange={(e) => set(e.target.value)}` → onChange={(value) => set(value)} — value is number | null
1639
+ - ❌ `Using <Input type="number"> for numeric fields` → Use <NumberInput value onChange min max step />
1640
+ - ❌ `Parsing the value with Number() in form state` → Store the value directly; it is already number | null
1641
+
1642
+ ---
1643
+
1644
+ ### ToggleGroup
1645
+
1646
+ Segmented control. CONTROLLED — the group owns the value. onChange emits the VALUE (not an event). type=single → value:string|null; type=multiple → value:string[]. Provide options[] for simple lists or <ToggleItem value> children for custom content. Distinct from Switch (boolean), ButtonGroup (layout only), RadioGroup (form radios, single only).
1647
+
1648
+ ```tsx
1649
+ import { ToggleGroup, ToggleItem } from "@usevyre/react"
1650
+
1651
+ // Props:
1652
+ // type = "single" | "multiple" (default: single)
1653
+ // value = string | null | string[]
1654
+ // onChange = function
1655
+ // options = array
1656
+ // size = "sm" | "md" | "lg" (default: md)
1657
+ // orientation = "horizontal" | "vertical" (default: horizontal)
1658
+ // disabled = boolean (default: false)
1659
+
1660
+ // Examples:
1661
+ const [view, setView] = useState<string | null>("grid");
1662
+
1663
+ <ToggleGroup
1664
+ value={view}
1665
+ onChange={setView}
1666
+ options={[
1667
+ { value: "grid", label: "Grid" },
1668
+ { value: "list", label: "List" },
1669
+ ]}
1670
+ />
1671
+ const [fmt, setFmt] = useState<string[]>(["bold"]);
1672
+
1673
+ <ToggleGroup type="multiple" value={fmt} onChange={setFmt}>
1674
+ <ToggleItem value="bold">B</ToggleItem>
1675
+ <ToggleItem value="italic">I</ToggleItem>
1676
+ <ToggleItem value="underline">U</ToggleItem>
1677
+ </ToggleGroup>
1678
+ ```
1679
+
1680
+ **Common mistakes:**
1681
+ - ❌ `onChange={(e) => set(e.target.value)}` → onChange={(value) => set(value)} — string|null (single) or string[] (multiple)
1682
+ - ❌ `Using ToggleGroup for a single on/off setting` → Use <Switch> for on/off; ToggleGroup is for choosing among options
1683
+ - ❌ `type="multiple" with a string value` → value={['a','b']} and onChange receives string[]
1684
+ - ❌ `<ToggleItem> outside <ToggleGroup>` → Always nest ToggleItem inside ToggleGroup (or use options)
1685
+
1686
+ ---
1687
+
1688
+ ### ToggleItem
1689
+
1690
+ A single toggle button inside <ToggleGroup>. Reads selection state from the group via context.
1691
+
1692
+ ```tsx
1693
+ import { ToggleItem } from "@usevyre/react"
1694
+
1695
+ // Props:
1696
+ // value = string
1697
+ // icon = ReactNode
1698
+ // disabled = boolean (default: false)
1699
+
1700
+ // Examples:
1701
+ <ToggleGroup value={v} onChange={setV}>
1702
+ <ToggleItem value="left">Left</ToggleItem>
1703
+ <ToggleItem value="center">Center</ToggleItem>
1704
+ </ToggleGroup>
1705
+ ```
1706
+
1707
+ **Common mistakes:**
1708
+ - ❌ `Tracking selected state on ToggleItem yourself` → Only set value; the group controls selected state
1709
+
1710
+ ---
1711
+
1712
+ ### Stepper
1713
+
1714
+ Multi-step flow indicator + controller (onboarding/checkout/wizard). CONTROLLED by a 0-based index. Compose StepperNav (with Step indicators) and StepPanel (content shown when its index == active). Step/StepPanel take an explicit 0-based `index`. Not Tabs — Stepper is an ORDERED linear flow with completed/current/upcoming states.
1715
+
1716
+ ```tsx
1717
+ import { Stepper, StepperNav, Step, StepPanel } from "@usevyre/react"
1718
+
1719
+ // Props:
1720
+ // value = number
1721
+ // defaultValue = number (default: 0)
1722
+ // onChange = function
1723
+ // orientation = "horizontal" | "vertical" (default: horizontal)
1724
+ // clickable = boolean (default: false)
1725
+
1726
+ // Examples:
1727
+ const [step, setStep] = useState(0);
1728
+
1729
+ <Stepper value={step} onChange={setStep}>
1730
+ <StepperNav>
1731
+ <Step index={0} label="Account" />
1732
+ <Step index={1} label="Profile" />
1733
+ <Step index={2} label="Done" />
1734
+ </StepperNav>
1735
+ <StepPanel index={0}><AccountForm /></StepPanel>
1736
+ <StepPanel index={1}><ProfileForm /></StepPanel>
1737
+ <StepPanel index={2}><Summary /></StepPanel>
1738
+ <Stack direction="row" gap="sm" justify="between">
1739
+ <Button onClick={() => setStep((s) => s - 1)} disabled={step === 0}>Back</Button>
1740
+ <Button variant="primary" onClick={() => setStep((s) => s + 1)}>Next</Button>
1741
+ </Stack>
1742
+ </Stepper>
1743
+ <Stepper orientation="vertical" defaultValue={1}>
1744
+ <StepperNav>
1745
+ <Step index={0} label="Cart" description="2 items" />
1746
+ <Step index={1} label="Shipping" description="Enter address" />
1747
+ <Step index={2} label="Payment" />
1748
+ </StepperNav>
1749
+ </Stepper>
1750
+ ```
1751
+
1752
+ **Common mistakes:**
1753
+ - ❌ `Using Tabs for a wizard / checkout flow` → Use <Stepper> with StepperNav + Step + StepPanel
1754
+ - ❌ `onChange={(e) => set(e.target.value)}` → onChange={(index) => setStep(index)}
1755
+ - ❌ `Manually toggling which panel is visible` → Give each StepPanel an index; Stepper shows the active one
1756
+ - ❌ `<Step> or <StepPanel> outside <Stepper>` → Nest Step inside StepperNav, StepPanel inside Stepper
1757
+
1758
+ ---
1759
+
1760
+ ### StepperNav
1761
+
1762
+ Container for Step indicators inside <Stepper>. Lays them out per the Stepper's orientation.
1763
+
1764
+ ```tsx
1765
+ import { Stepper, StepperNav, Step, StepPanel } from "@usevyre/react"
1766
+
1767
+ ```
1768
+
1769
+ ---
1770
+
1771
+ ### Step
1772
+
1773
+ One step indicator inside <StepperNav>. State (completed/current/upcoming) derives from the Stepper's active index automatically.
1774
+
1775
+ ```tsx
1776
+ import { Stepper, StepperNav, Step, StepPanel } from "@usevyre/react"
1777
+
1778
+ // Props:
1779
+ // index = number
1780
+ // label = ReactNode
1781
+ // description = ReactNode
1782
+ // icon = ReactNode
1783
+
1784
+ ```
1785
+
1786
+ ---
1787
+
1788
+ ### StepPanel
1789
+
1790
+ Content for one step. Renders its children only when its index equals the Stepper's active step.
1791
+
1792
+ ```tsx
1793
+ import { Stepper, StepperNav, Step, StepPanel } from "@usevyre/react"
1794
+
1795
+ // Props:
1796
+ // index = number
1797
+
1798
+ ```
1799
+
1800
+ ---
1801
+
1802
+ ### EmptyState
1803
+
1804
+ Presentational placeholder for empty lists, tables, and search results. No state. title/description/variant/size are props; the optional call-to-action goes in children (React) or the default slot (Vue). variant picks a preset icon (default=box, search=magnifier, error=warning); pass `icon` (or #icon slot) to override.
1805
+
1806
+ ```tsx
1807
+ import { EmptyState } from "@usevyre/react"
1808
+
1809
+ // Props:
1810
+ // title = string
1811
+ // description = string
1812
+ // variant = "default" | "search" | "error" (default: default)
1813
+ // icon = ReactNode
1814
+ // size = "sm" | "md" | "lg" (default: md)
1815
+ // children = ReactNode
1816
+
1817
+ // Examples:
1818
+ <EmptyState
1819
+ variant="search"
1820
+ title="No results"
1821
+ description="Try a different search term."
1822
+ >
1823
+ <Button variant="secondary" onClick={reset}>Clear filters</Button>
1824
+ </EmptyState>
1825
+ <EmptyState
1826
+ size="lg"
1827
+ title="No projects yet"
1828
+ description="Create your first project to get started."
1829
+ >
1830
+ <Button variant="primary">New project</Button>
1831
+ </EmptyState>
1832
+ ```
1833
+
1834
+ **Common mistakes:**
1835
+ - ❌ `Building an empty placeholder with a bare <div> + centered text` → Use <EmptyState title description variant>
1836
+ - ❌ `action / cta prop` → Put the Button as children of EmptyState
1837
+ - ❌ `Using EmptyState for a loading state` → Use <Skeleton> while loading; EmptyState when the result set is empty
1838
+
1839
+ ---
1840
+
1841
+ ### Stat
1842
+
1843
+ Presentational dashboard KPI. No state. The arrow DIRECTION follows the sign of `delta` (the actual change: -0.4% → down arrow). The arrow/delta COLOR is set explicitly by `trend` (up=success, down=danger, neutral=muted) — so 'churn -0.4%, trend=up' shows a green DOWN arrow. Wrap several in StatGroup for an evenly-split row with dividers.
1844
+
1845
+ ```tsx
1846
+ import { Stat, StatGroup } from "@usevyre/react"
1847
+
1848
+ // Props:
1849
+ // label = string
1850
+ // value = string | number
1851
+ // delta = string | number
1852
+ // trend = "up" | "down" | "neutral" (default: neutral)
1853
+ // deltaLabel = string
1854
+ // icon = ReactNode
1855
+ // size = "sm" | "md" | "lg" (default: md)
1856
+
1857
+ // Examples:
1858
+ <StatGroup>
1859
+ <Stat label="Revenue" value="$48.2k" delta="+12%" trend="up" deltaLabel="vs last month" />
1860
+ <Stat label="Churn" value="2.1%" delta="-0.4%" trend="up" deltaLabel="lower is better" />
1861
+ <Stat label="Orders" value="1,204" delta="0%" trend="neutral" />
1862
+ </StatGroup>
1863
+ <Stat label="Active users" value="12,840" delta="+3.2%" trend="up"
1864
+ icon={<UsersIcon />} size="lg" />
1865
+ ```
1866
+
1867
+ **Common mistakes:**
1868
+ - ❌ `Assuming trend flips the arrow direction` → delta="-0.4%" always shows a down arrow; trend="up" just colors it green
1869
+ - ❌ `Building a KPI card with Card + manual layout` → Use <Stat label value delta trend />
1870
+ - ❌ `Laying out a KPI row with custom flex + dividers` → Wrap the Stats in <StatGroup>
1871
+
1872
+ ---
1873
+
1874
+ ### StatGroup
1875
+
1876
+ Evenly-split row of <Stat> with subtle dividers between items. Each Stat flexes to equal width.
1877
+
1878
+ ```tsx
1879
+ import { Stat, StatGroup } from "@usevyre/react"
1880
+
1881
+ // Examples:
1882
+ <StatGroup>
1883
+ <Stat label="MRR" value="$9.6k" delta="+5%" trend="up" />
1884
+ <Stat label="Refunds" value="32" delta="+8" trend="down" />
1885
+ </StatGroup>
1886
+ ```
1887
+
1888
+ **Common mistakes:**
1889
+ - ❌ `Putting non-Stat children in StatGroup` → Only place <Stat> elements inside StatGroup
1890
+
1891
+ ---
1892
+
1893
+ ### Timeline
1894
+
1895
+ Vertical activity feed for audit logs and history. Presentational — a status dot per item plus a connector line. Pass `items` for plain logs, or TimelineItem children for rich per-item content. Timeline does NOT reorder; pass items in the order you want shown.
1896
+
1897
+ ```tsx
1898
+ import { Timeline, TimelineItem } from "@usevyre/react"
1899
+
1900
+ // Props:
1901
+ // items = array
1902
+ // children = ReactNode
1903
+
1904
+ // Examples:
1905
+ <Timeline
1906
+ items={[
1907
+ { title: "Deployed v2.1", time: "2m ago", status: "success" },
1908
+ { title: "Build started", time: "5m ago", status: "info" },
1909
+ { title: "Push to main", time: "6m ago" },
1910
+ ]}
1911
+ />
1912
+ <Timeline>
1913
+ <TimelineItem title="Invoice paid" time="Apr 2" status="success">
1914
+ <Text size="sm">$1,200 — <a href="#">view receipt</a></Text>
1915
+ </TimelineItem>
1916
+ <TimelineItem title="Invoice sent" time="Mar 28" status="info" />
1917
+ </Timeline>
1918
+ ```
1919
+
1920
+ **Common mistakes:**
1921
+ - ❌ `Building an activity log with a <ul> + manual dots/lines` → Use <Timeline items={[...]} /> or TimelineItem children
1922
+ - ❌ `Using Stepper for a history/audit feed` → Use <Timeline> for logs/history; Stepper for wizards
1923
+ - ❌ `Expecting Timeline to sort by time` → Sort the array yourself (newest- or oldest-first)
1924
+
1925
+ ---
1926
+
1927
+ ### TimelineItem
1928
+
1929
+ One entry in a <Timeline>. Renders a status-colored dot (or a custom icon), a title, an optional time, and optional rich content.
1930
+
1931
+ ```tsx
1932
+ import { Timeline, TimelineItem } from "@usevyre/react"
1933
+
1934
+ // Props:
1935
+ // title = ReactNode
1936
+ // time = ReactNode
1937
+ // status = "default" | "success" | "warning" | "danger" | "info" (default: default)
1938
+ // icon = ReactNode
1939
+ // children = ReactNode
1940
+
1941
+ // Examples:
1942
+ <TimelineItem title="Comment added" time="1h ago" status="default">
1943
+ <Text size="sm">“Looks good to me 👍”</Text>
1944
+ </TimelineItem>
1945
+ ```
1946
+
1947
+ **Common mistakes:**
1948
+ - ❌ `<TimelineItem> outside <Timeline>` → Always nest TimelineItem inside Timeline
1949
+
1950
+ ---
1951
+
1952
+ ### Tree
1953
+
1954
+ Hierarchical tree view for file explorers and nested navigation. DATA-DRIVEN and CONTROLLED — pass a nested `data` array; the Tree renders recursively. Single selection. A node WITH children is a folder (click toggles expand); a leaf fires onSelect. Keyboard: ArrowUp/Down move, ArrowRight/Left expand/collapse, Enter/Space select.
1955
+
1956
+ ```tsx
1957
+ import { Tree } from "@usevyre/react"
1958
+
1959
+ // Props:
1960
+ // data = TreeNode[]
1961
+ // expandedIds = string[]
1962
+ // defaultExpandedIds = string[] (default: [])
1963
+ // onExpandedChange = function
1964
+ // selectedId = string | null
1965
+ // defaultSelectedId = string | null (default: null)
1966
+ // onSelect = function
1967
+
1968
+ // Examples:
1969
+ const [sel, setSel] = useState<string | null>("src/a.ts");
1970
+
1971
+ <Tree
1972
+ data={[
1973
+ { id: "src", label: "src", children: [
1974
+ { id: "src/a.ts", label: "a.ts" },
1975
+ { id: "src/b", label: "b", children: [
1976
+ { id: "src/b/c.ts", label: "c.ts" },
1977
+ ]},
1978
+ ]},
1979
+ { id: "README.md", label: "README.md" },
1980
+ ]}
1981
+ selectedId={sel}
1982
+ onSelect={setSel}
1983
+ defaultExpandedIds={["src"]}
1984
+ />
1985
+ const [open, setOpen] = useState<string[]>(["root"]);
1986
+
1987
+ <Tree data={tree} expandedIds={open} onExpandedChange={setOpen} />
1988
+ ```
1989
+
1990
+ **Common mistakes:**
1991
+ - ❌ `Rendering a nested <ul> tree by hand with manual expand state` → Pass a nested `data` array to <Tree> and control expandedIds/selectedId
1992
+ - ❌ `onSelect={(e) => ...}` → onSelect={(id) => setSelected(id)}
1993
+ - ❌ `Mutating the data array to expand/collapse` → Track expandedIds in state (or use defaultExpandedIds)
1994
+ - ❌ `Using DropdownMenu submenus for a file tree` → Use <Tree> for file explorers / nested nav
1995
+
1996
+ ---
1997
+
1998
+ ### OTPInput
1999
+
2000
+ Segmented one-time-code input for verification / 2FA. CONTROLLED. onChange emits the STRING value (not an event), and onComplete fires once when every slot is filled. Paste-aware (pasting a full code fills all slots), auto-advance on input, backspace moves to the previous slot, arrow keys navigate. Drops straight into <FormField>.
2001
+
2002
+ ```tsx
2003
+ import { OTPInput } from "@usevyre/react"
2004
+
2005
+ // Props:
2006
+ // value = string
2007
+ // defaultValue = string (default: "")
2008
+ // onChange = function
2009
+ // onComplete = function
2010
+ // length = number (default: 6)
2011
+ // type = "numeric" | "alphanumeric" (default: numeric)
2012
+ // mask = boolean (default: false)
2013
+ // size = "sm" | "md" | "lg" (default: md)
2014
+ // disabled = boolean (default: false)
2015
+ // autoFocus = boolean (default: false)
2016
+
2017
+ // Examples:
2018
+ const [code, setCode] = useState("");
2019
+
2020
+ <OTPInput
2021
+ value={code}
2022
+ onChange={setCode}
2023
+ onComplete={(c) => verify(c)}
2024
+ autoFocus
2025
+ />
2026
+ <FormField name="otp" label="Verification code"
2027
+ rules={{ required: true, minLength: 6 }}>
2028
+ <OTPInput length={6} />
2029
+ </FormField>
2030
+ ```
2031
+
2032
+ **Common mistakes:**
2033
+ - ❌ `onChange={(e) => set(e.target.value)}` → onChange={(value) => setCode(value)}
2034
+ - ❌ `Six separate <Input> boxes wired by hand` → Use <OTPInput length={6} value onChange />
2035
+ - ❌ `Reading completion by comparing length yourself` → Use onComplete={(code) => verify(code)}
2036
+ - ❌ `type="password" to hide digits` → Use mask (type stays numeric/alphanumeric)
2037
+
2038
+ ---
2039
+
2040
+ ### Carousel
2041
+
2042
+ Accessible content slider for galleries, onboarding, and testimonials. CONTROLLED by a 0-based slide index. Compose CarouselSlide children (slide order = index). Snap scrolling, clickable dot indicators, prev/next arrows, ArrowLeft/Right keyboard, optional loop and autoPlay (autoplay pauses on hover/focus). onChange emits the index (not an event).
2043
+
2044
+ ```tsx
2045
+ import { Carousel, CarouselSlide } from "@usevyre/react"
2046
+
2047
+ // Props:
2048
+ // value = number
2049
+ // defaultValue = number (default: 0)
2050
+ // onChange = function
2051
+ // loop = boolean (default: false)
2052
+ // autoPlay = boolean (default: false)
2053
+ // interval = number (default: 5000)
2054
+ // showArrows = boolean (default: true)
2055
+ // showIndicators = boolean (default: true)
2056
+
2057
+ // Examples:
2058
+ const [i, setI] = useState(0);
2059
+
2060
+ <Carousel value={i} onChange={setI} loop>
2061
+ <CarouselSlide><img src="/a.jpg" alt="A" /></CarouselSlide>
2062
+ <CarouselSlide><img src="/b.jpg" alt="B" /></CarouselSlide>
2063
+ <CarouselSlide><img src="/c.jpg" alt="C" /></CarouselSlide>
2064
+ </Carousel>
2065
+ <Carousel autoPlay interval={4000} showArrows={false}>
2066
+ <CarouselSlide><Welcome /></CarouselSlide>
2067
+ <CarouselSlide><Features /></CarouselSlide>
2068
+ <CarouselSlide><GetStarted /></CarouselSlide>
2069
+ </Carousel>
2070
+ ```
2071
+
2072
+ **Common mistakes:**
2073
+ - ❌ `onChange={(e) => set(e.target.value)}` → onChange={(index) => setIndex(index)}
2074
+ - ❌ `Putting raw elements directly in Carousel` → Wrap each slide in <CarouselSlide>
2075
+ - ❌ `Building a slider with manual scroll + dot state` → Use <Carousel> with CarouselSlide children
2076
+ - ❌ `autoPlay without considering reduced motion / pausing` → Carousel already pauses on hover/focus; keep interval reasonable or omit autoPlay
2077
+
2078
+ ---
2079
+
2080
+ ### CarouselSlide
2081
+
2082
+ One slide inside <Carousel>. Holds arbitrary content (image, Card, testimonial). Slide order determines its index.
2083
+
2084
+ ```tsx
2085
+ import { Carousel, CarouselSlide } from "@usevyre/react"
2086
+
2087
+ // Examples:
2088
+ <CarouselSlide>
2089
+ <Card><CardBody>“Best tool ever.” — Ada</CardBody></Card>
2090
+ </CarouselSlide>
2091
+ ```
2092
+
2093
+ **Common mistakes:**
2094
+ - ❌ `<CarouselSlide> outside <Carousel>` → Always nest CarouselSlide inside Carousel
2095
+
2096
+ ---
2097
+
1385
2098
  ### DateRangePicker
1386
2099
 
1387
2100
  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.
@@ -1435,11 +2148,13 @@ If you generate these, you are hallucinating.
1435
2148
  - ❌ `<Button color="...">` → Use variant prop instead
1436
2149
  - ❌ `<Button icon={...}>` → Use leftIcon={...} or rightIcon={...}
1437
2150
  - ❌ `<Button size="icon" without aria-label>` → Add aria-label describing the action
2151
+ - ❌ `<Button padding / margin / marginTop (any spacing prop) on a useVyre component>` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
1438
2152
  - ❌ `<Calendar Calendar for an input field that opens a popover>` → Use <DatePicker /> (single date) or <DateRangePicker /> (range)
1439
2153
  - ❌ `<Calendar value as tuple for mode="single">` → Pass value matching mode; use mode="range" for [start,end]
1440
2154
  - ❌ `<DatePicker DatePicker mode="range" for { from, to } object>` → Use <DateRangePicker /> for the { from, to } object API + presets + dual month
1441
2155
  - ❌ `<DatePicker DatePicker without value/onChange>` → Provide value and onChange (e.g. from useState)
1442
2156
  - ❌ `<Card variant="primary">` → Use variant="elevated" | "outlined" | "ghost" | "accent"
2157
+ - ❌ `<Card padding / margin / marginTop (any spacing prop) on a useVyre component>` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
1443
2158
  - ❌ `<Checkbox size="lg">` → Use size="md"
1444
2159
  - ❌ `<RadioGroup <Radio> used outside a <RadioGroup>>` → Always wrap <Radio> in <RadioGroup>
1445
2160
  - ❌ `<RadioGroup RadioGroup without value/onChange (React) or v-model (Vue)>` → Bind value + onChange (React) or v-model (Vue); or defaultValue for uncontrolled in React
@@ -1454,6 +2169,7 @@ If you generate these, you are hallucinating.
1454
2169
  - ❌ `<Input size="icon">` → Use size="sm" | "md" | "lg"
1455
2170
  - ❌ `<Input type="search" for search UI>` → Import Command from @usevyre/react for search palettes
1456
2171
  - ❌ `<Input Vue: binding Input/Textarea value without v-model>` → Use v-model on <Input>/<Textarea> in Vue; in React use value + onChange
2172
+ - ❌ `<Input padding / margin / marginTop (any spacing prop) on a useVyre component>` → Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it
1457
2173
  - ❌ `<Modal size="xl">` → Use size="lg" or size="full"
1458
2174
  - ❌ `<Popover placement="top-center">` → Use placement="top" for centered placement
1459
2175
  - ❌ `<Progress value > 100>` → Normalize your value to 0–100 range before passing
@@ -1490,6 +2206,59 @@ If you generate these, you are hallucinating.
1490
2206
  - ❌ `<Conversation Expecting Conversation to store/append messages>` → Append to your own state in onSend (or @send) and pass it back via value
1491
2207
  - ❌ `<Conversation composer without onSend (React) / @send (Vue)>` → Provide onSend / @send to append the message to value
1492
2208
  - ❌ `<Conversation Treating onSend as (text) only when using allowAttachments>` → Handle onSend(text, files) — map files to message attachments and append
2209
+ - ❌ `<Stack <div style={{ display: 'flex', gap: 12 }}>>` → Use <Stack gap="md"> — gap is a token
2210
+ - ❌ `<Stack gap={12} or gap="12px">` → Use gap="none|xs|sm|md|lg|xl|2xl"
2211
+ - ❌ `<Stack direction="vertical" / "horizontal">` → Use direction="row" or "column" (also row-reverse / column-reverse)
2212
+ - ❌ `<Stack style={{ width: "100%" }} / style={{ height: 320 }}>` → Use the width / height prop: width="full", width="md", height="screen", etc.
2213
+ - ❌ `<Grid <div style={{ display:'grid', gridTemplateColumns:'1fr 1fr 1fr' }}>>` → Use <Grid columns={3} gap="md">
2214
+ - ❌ `<Grid columns="3" (string)>` → Use columns={3} or columns="auto-fit"
2215
+ - ❌ `<Grid Nested div with inline grid-column for spanning>` → Wrap the cell in <GridItem colSpan={2}>
2216
+ - ❌ `<Grid style={{ width: "100%" }} / style={{ height: 320 }}>` → Use the width / height prop: width="full", width="md", height="screen", etc.
2217
+ - ❌ `<GridItem GridItem outside a Grid>` → Place <GridItem> directly inside <Grid>
2218
+ - ❌ `<Box <Box style={{ padding: 16 }}>>` → Use <Box padding="md"> (or paddingX/paddingTop/...)
2219
+ - ❌ `<Box Using Box for flex/grid layout>` → Use <Stack> or <Grid>
2220
+ - ❌ `<Box style={{ width: "100%" }} / style={{ height: 320 }}>` → Use the width / height prop: width="full", width="md", height="screen", etc.
2221
+ - ❌ `<Form Manually tracking each field's error state with useState>` → Wrap controls in <FormField name rules> and let Form manage errors
2222
+ - ❌ `<Form Adding a validation library (zod/yup) just for basic rules>` → Use rules={{ required, minLength, pattern, email, validate }}
2223
+ - ❌ `<Form <FormField> with multiple control children>` → Use one control per FormField (Input/Textarea/Select/etc.)
2224
+ - ❌ `<Form <FormField> outside a <Form>>` → Always nest FormField inside <Form>
2225
+ - ❌ `<FormField Putting onChange/value manually on the control inside FormField>` → Let FormField wire the control; only pass static props (type, placeholder)
2226
+ - ❌ `<NumberInput onChange={(e) => set(e.target.value)}>` → onChange={(value) => set(value)} — value is number | null
2227
+ - ❌ `<NumberInput Using <Input type="number"> for numeric fields>` → Use <NumberInput value onChange min max step />
2228
+ - ❌ `<NumberInput Parsing the value with Number() in form state>` → Store the value directly; it is already number | null
2229
+ - ❌ `<ToggleGroup onChange={(e) => set(e.target.value)}>` → onChange={(value) => set(value)} — string|null (single) or string[] (multiple)
2230
+ - ❌ `<ToggleGroup Using ToggleGroup for a single on/off setting>` → Use <Switch> for on/off; ToggleGroup is for choosing among options
2231
+ - ❌ `<ToggleGroup type="multiple" with a string value>` → value={['a','b']} and onChange receives string[]
2232
+ - ❌ `<ToggleGroup <ToggleItem> outside <ToggleGroup>>` → Always nest ToggleItem inside ToggleGroup (or use options)
2233
+ - ❌ `<ToggleItem Tracking selected state on ToggleItem yourself>` → Only set value; the group controls selected state
2234
+ - ❌ `<Stepper Using Tabs for a wizard / checkout flow>` → Use <Stepper> with StepperNav + Step + StepPanel
2235
+ - ❌ `<Stepper onChange={(e) => set(e.target.value)}>` → onChange={(index) => setStep(index)}
2236
+ - ❌ `<Stepper Manually toggling which panel is visible>` → Give each StepPanel an index; Stepper shows the active one
2237
+ - ❌ `<Stepper <Step> or <StepPanel> outside <Stepper>>` → Nest Step inside StepperNav, StepPanel inside Stepper
2238
+ - ❌ `<EmptyState Building an empty placeholder with a bare <div> + centered text>` → Use <EmptyState title description variant>
2239
+ - ❌ `<EmptyState action / cta prop>` → Put the Button as children of EmptyState
2240
+ - ❌ `<EmptyState Using EmptyState for a loading state>` → Use <Skeleton> while loading; EmptyState when the result set is empty
2241
+ - ❌ `<Stat Assuming trend flips the arrow direction>` → delta="-0.4%" always shows a down arrow; trend="up" just colors it green
2242
+ - ❌ `<Stat Building a KPI card with Card + manual layout>` → Use <Stat label value delta trend />
2243
+ - ❌ `<Stat Laying out a KPI row with custom flex + dividers>` → Wrap the Stats in <StatGroup>
2244
+ - ❌ `<StatGroup Putting non-Stat children in StatGroup>` → Only place <Stat> elements inside StatGroup
2245
+ - ❌ `<Timeline Building an activity log with a <ul> + manual dots/lines>` → Use <Timeline items={[...]} /> or TimelineItem children
2246
+ - ❌ `<Timeline Using Stepper for a history/audit feed>` → Use <Timeline> for logs/history; Stepper for wizards
2247
+ - ❌ `<Timeline Expecting Timeline to sort by time>` → Sort the array yourself (newest- or oldest-first)
2248
+ - ❌ `<TimelineItem <TimelineItem> outside <Timeline>>` → Always nest TimelineItem inside Timeline
2249
+ - ❌ `<Tree Rendering a nested <ul> tree by hand with manual expand state>` → Pass a nested `data` array to <Tree> and control expandedIds/selectedId
2250
+ - ❌ `<Tree onSelect={(e) => ...}>` → onSelect={(id) => setSelected(id)}
2251
+ - ❌ `<Tree Mutating the data array to expand/collapse>` → Track expandedIds in state (or use defaultExpandedIds)
2252
+ - ❌ `<Tree Using DropdownMenu submenus for a file tree>` → Use <Tree> for file explorers / nested nav
2253
+ - ❌ `<OTPInput onChange={(e) => set(e.target.value)}>` → onChange={(value) => setCode(value)}
2254
+ - ❌ `<OTPInput Six separate <Input> boxes wired by hand>` → Use <OTPInput length={6} value onChange />
2255
+ - ❌ `<OTPInput Reading completion by comparing length yourself>` → Use onComplete={(code) => verify(code)}
2256
+ - ❌ `<OTPInput type="password" to hide digits>` → Use mask (type stays numeric/alphanumeric)
2257
+ - ❌ `<Carousel onChange={(e) => set(e.target.value)}>` → onChange={(index) => setIndex(index)}
2258
+ - ❌ `<Carousel Putting raw elements directly in Carousel>` → Wrap each slide in <CarouselSlide>
2259
+ - ❌ `<Carousel Building a slider with manual scroll + dot state>` → Use <Carousel> with CarouselSlide children
2260
+ - ❌ `<Carousel autoPlay without considering reduced motion / pausing>` → Carousel already pauses on hover/focus; keep interval reasonable or omit autoPlay
2261
+ - ❌ `<CarouselSlide <CarouselSlide> outside <Carousel>>` → Always nest CarouselSlide inside Carousel
1493
2262
  - ❌ `<DateRangePicker value={[from, to]}>` → Use value={{ from, to }} and read range.from / range.to
1494
2263
  - ❌ `<DateRangePicker DateRangePicker for a single date>` → Use <DatePicker /> for a single date
1495
2264
  - ❌ `<DateRangePicker presets="true" (string)>` → Use the bare prop: presets (or presets={true})