anvilui 0.2.0 → 0.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.
Files changed (45) hide show
  1. package/AGENTS.md +29 -29
  2. package/README.md +42 -89
  3. package/dist/components/Combobox/Combobox.d.ts +8 -2
  4. package/dist/components/DateInput/DateInput.d.ts +5 -3
  5. package/dist/components/IconButton/IconButton.d.ts +5 -3
  6. package/dist/components/Input/Input.d.ts +5 -3
  7. package/dist/components/PinInput/PinInput.d.ts +5 -3
  8. package/dist/components/Progress/Progress.d.ts +4 -1
  9. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  10. package/dist/components/Search/Search.d.ts +22 -6
  11. package/dist/components/Select/Select.d.ts +6 -2
  12. package/dist/components/Slider/Slider.d.ts +2 -1
  13. package/dist/components/SquigglyWave/SquigglyWave.d.ts +26 -4
  14. package/dist/components/Textarea/Textarea.d.ts +6 -3
  15. package/dist/components/TimePicker/TimePicker.d.ts +7 -5
  16. package/dist/components/Toggle/Toggle.d.ts +2 -1
  17. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -2
  18. package/dist/index.cjs +302 -62
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.css +48 -25
  21. package/dist/index.css.map +1 -1
  22. package/dist/index.js +336 -88
  23. package/dist/index.js.map +1 -1
  24. package/dist/themes/types.d.ts +0 -4
  25. package/dist/utils.d.ts +4 -0
  26. package/docs/badge.md +41 -41
  27. package/docs/combobox.md +2 -1
  28. package/docs/composition.md +1 -1
  29. package/docs/date-input.md +4 -3
  30. package/docs/forms.md +1 -1
  31. package/docs/icon-button.md +3 -2
  32. package/docs/input.md +1 -0
  33. package/docs/morph.md +4 -1
  34. package/docs/pin-input.md +1 -1
  35. package/docs/progress.md +37 -37
  36. package/docs/radio-group.md +17 -0
  37. package/docs/search.md +7 -7
  38. package/docs/select.md +3 -2
  39. package/docs/slider.md +49 -49
  40. package/docs/textarea.md +1 -1
  41. package/docs/theming.md +2 -1
  42. package/docs/time-picker.md +3 -2
  43. package/docs/toggle-group.md +1 -1
  44. package/docs/toggle.md +2 -2
  45. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AnvilUI: reference for AI coding agents
2
2
 
3
- `anvilui` is a React 19 component library with Material 3 styling, built on [Base UI](https://base-ui.com) (`@base-ui/react`). It has ~50 accessible components (buttons, inputs, selects, dialogs, menus, navigation, …), a theme system driven by CSS variables, and Material Symbols icons referenced by name. It is **not** shadcn/ui, Radix or MUI: names and props differ. This file matches the installed version. Read it before writing code; per-component pages are in [`docs/`](docs/llms-index.md) (`node_modules/anvilui/docs/<name>.md`).
3
+ `anvilui` is a React 19 component library implementing Material 3 Expressive (with extra motion beyond the spec), built on [Base UI](https://base-ui.com) (`@base-ui/react`). It has ~50 accessible components (buttons, inputs, selects, dialogs, menus, navigation, …), a theme system driven by CSS variables, and Material Symbols icons referenced by name. It is **not** shadcn/ui, Radix or MUI: names and props differ. This file matches the installed version. Read it before writing code; per-component pages are in [`docs/`](docs/llms-index.md) (`node_modules/anvilui/docs/<name>.md`).
4
4
 
5
5
  ## Rules that prevent most errors
6
6
 
@@ -66,22 +66,22 @@ Nothing else is exported. Not in the library: `Box`, `Stack`, `Grid`, `Container
66
66
 
67
67
  ## Component reference
68
68
 
69
- Props marked * are required. All components also take `className`, `style`, `ref` and the props of their underlying element / Base UI part. Full tables: `docs/<name>.md`.
69
+ Props marked \* are required. All components also take `className`, `style`, `ref` and the props of their underlying element / Base UI part. Full tables: `docs/<name>.md`.
70
70
 
71
71
  ### Buttons
72
72
 
73
73
  | Component | Key props | Usage |
74
74
  | --- | --- | --- |
75
75
  | `Button` | `fillType`, `color`, `size: 'small'\|'normal'\|'big'`, `startIcon`, `endIcon`, `loading`, `disabled`, `type`, `render` | `<Button startIcon="add" onClick={create}>New</Button>` |
76
- | `IconButton` | `icon`_, `aria-label`_, `fillType`, `color`. No size, no children | `<IconButton icon="close" aria-label="Close" fillType="text" color="container" />` |
76
+ | `IconButton` | `icon`\*, `aria-label`\*, `fillType`, `color`, `size`. No children | `<IconButton icon="close" aria-label="Close" fillType="text" color="container" />` |
77
77
  | `SplitButton` | `<div>` props | `<SplitButton><Button>Save</Button><IconButton icon="arrow_drop_down" aria-label="More" /></SplitButton>` |
78
- | `HoldButton` | `onConfirm`*, `holdDuration` (1500), Button props | `<HoldButton color="error" onConfirm={del}>Hold to delete</HoldButton>` |
78
+ | `HoldButton` | `onConfirm`\*, `holdDuration` (1500), Button props | `<HoldButton color="error" onConfirm={del}>Hold to delete</HoldButton>` |
79
79
  | `Toggle` | `pressed`/`defaultPressed`/`onPressedChange`, `color`, `fillType`; text: `children`, `startIcon`, `size`; icon: `icon` + `aria-label` | `<Toggle icon="favorite" aria-label="Favorite" />` |
80
80
  | `ToggleGroup` | `value`/`defaultValue`/`onValueChange` (single value; array with `multiple`), `multiple`, `color`, `fillType`, `size` | `<ToggleGroup aria-label="View" defaultValue="list">…</ToggleGroup>` |
81
- | `ToggleGroupItem` | `value`*, `startIcon`, `endIcon`, `children` | `<ToggleGroupItem value="list">List</ToggleGroupItem>` |
82
- | `FAB` | `icon`_, `label` or `aria-label`_, `size`, `color`, `fillType`, `sticky` | `<FAB icon="add" aria-label="New" style={{ position: 'fixed', right: 16, bottom: 16 }} />` |
83
- | `FABMenu` | `icon`_, `aria-label`_, `children`* (`FABMenuItem`s), `side`, `align`, `color` | `<FABMenu icon="add" aria-label="Create"><FABMenuItem icon="folder">Folder</FABMenuItem></FABMenu>` |
84
- | `Chip` / `FilterChip` / `InputChip` | `startIcon`; FilterChip `pressed`/`onPressedChange`; InputChip `onRemove`*, `removeLabel` | `<FilterChip pressed={on} onPressedChange={setOn}>Vegan</FilterChip>` |
81
+ | `ToggleGroupItem` | `value`\*, `startIcon`, `endIcon`, `children` | `<ToggleGroupItem value="list">List</ToggleGroupItem>` |
82
+ | `FAB` | `icon`\*, `label` or `aria-label`\*, `size`, `color`, `fillType`, `sticky` | `<FAB icon="add" aria-label="New" style={{ position: 'fixed', right: 16, bottom: 16 }} />` |
83
+ | `FABMenu` | `icon`\*, `aria-label`\*, `children`\* (`FABMenuItem`s), `side`, `align`, `color` | `<FABMenu icon="add" aria-label="Create"><FABMenuItem icon="folder">Folder</FABMenuItem></FABMenu>` |
84
+ | `Chip` / `FilterChip` / `InputChip` | `startIcon`; FilterChip `pressed`/`onPressedChange`; InputChip `onRemove`\*, `removeLabel` | `<FilterChip pressed={on} onPressedChange={setOn}>Vegan</FilterChip>` |
85
85
 
86
86
  ### Form controls
87
87
 
@@ -90,17 +90,17 @@ Props marked * are required. All components also take `className`, `style`, `ref
90
90
  | `Input` | `label`, `size: 'small'\|'normal'`, `value`/`defaultValue`, `onValueChange(string)` or `onChange(event)`, input attrs | `<Input label="Email" type="email" value={v} onValueChange={setV} />` |
91
91
  | `Textarea` | same as Input + `rows` | `<Textarea label="Bio" rows={4} />` |
92
92
  | `Select` | `items` (map or `{value,label}[]`), `value`/`defaultValue`/`onValueChange(value)`, `label`, `placeholder`, `multiple`, `name` | `<Select label="Fruit" items={fruits} defaultValue="apple">{…SelectItem}</Select>` |
93
- | `SelectItem` | `value`*, children = label | `<SelectItem value="apple">Apple</SelectItem>` |
94
- | `Combobox` | `items`, `children`* = `(item) => <ComboboxItem/>`, `value`/`onValueChange(item)`, `itemToStringLabel`, `label`, `empty` | `<Combobox label="Fruit" items={list}>{(f: string) => <ComboboxItem key={f} value={f}>{f}</ComboboxItem>}</Combobox>` |
95
- | `Search` | `aria-label`_, `items`, `children`_ = `(item) => <SearchItem/>`, `value`/`onValueChange(text)`, `placeholder`, `empty` | `<Search aria-label="Search" items={[]} onValueChange={setQ}>{(i: string) => <SearchItem key={i} value={i}>{i}</SearchItem>}</Search>` |
93
+ | `SelectItem` | `value`\*, children = label | `<SelectItem value="apple">Apple</SelectItem>` |
94
+ | `Combobox` | `items`, `children`\* = `(item) => <ComboboxItem/>`, `value`/`onValueChange(item)`, `itemToStringLabel`, `label`, `empty` | `<Combobox label="Fruit" items={list}>{(f: string) => <ComboboxItem key={f} value={f}>{f}</ComboboxItem>}</Combobox>` |
95
+ | `Search` | `aria-label`\*, `value`/`onValueChange(text)`, `placeholder`, `color` (`surface`/`container`); suggestions: `items` + `children` = `(item) => <SearchItem/>`, `empty` | `<Search aria-label="Filter" value={q} onValueChange={setQ} />` |
96
96
  | `Checkbox` | `checked`/`defaultChecked`/`onCheckedChange(boolean)`, `indeterminate`, `name` | `<label><Checkbox checked={c} onCheckedChange={setC} /> Remember me</label>` |
97
97
  | `Switch` | `checked`/`defaultChecked`/`onCheckedChange(boolean)`, `name` | `<label><Switch defaultChecked /> Wi-Fi</label>` |
98
- | `RadioGroup` / `Radio` | group: `value`/`defaultValue`/`onValueChange(value)`, `name`; radio: `value`* | `<RadioGroup defaultValue="a"><label><Radio value="a" /> A</label></RadioGroup>` |
99
- | `Slider` | `label` or `aria-label`*, `value`/`defaultValue` (number or number[]), `onValueChange(number)`, `min`, `max`, `step`, `showValue`, `format` | `<Slider label="Volume" defaultValue={50} />` |
100
- | `DateInput` | `value`/`defaultValue` `"YYYY-MM-DD" \| null`, `onValueChange`, `label` or `aria-label`* | `<DateInput label="Due" value={d} onValueChange={setD} />` |
101
- | `TimePicker` | `value`/`defaultValue` `"HH:mm" \| null`, `onValueChange`, `type: 'dial'\|'input'`, `hourCycle: 12\|24`, `label` or `aria-label`*, `name` | `<TimePicker label="Start" defaultValue="09:00" />` |
98
+ | `RadioGroup` / `Radio` | group: `value`/`defaultValue`/`onValueChange(value)`, `name`; radio: `value`\* | `<RadioGroup defaultValue="a"><label><Radio value="a" /> A</label></RadioGroup>` |
99
+ | `Slider` | `label` or `aria-label`\*, `value`/`defaultValue` (number or number[]), `onValueChange(number)`, `min`, `max`, `step`, `showValue`, `format` | `<Slider label="Volume" defaultValue={50} />` |
100
+ | `DateInput` | `value`/`defaultValue` `"YYYY-MM-DD" \| null`, `onValueChange`, `label` or `aria-label`\* | `<DateInput label="Due" value={d} onValueChange={setD} />` |
101
+ | `TimePicker` | `value`/`defaultValue` `"HH:mm" \| null`, `onValueChange`, `type: 'dial'\|'input'`, `hourCycle: 12\|24`, `label` or `aria-label`\*, `name` | `<TimePicker label="Start" defaultValue="09:00" />` |
102
102
  | `Calendar` | `value`/`defaultValue` `"YYYY-MM-DD" \| null`, `onValueChange` | `<Calendar value={d} onValueChange={setD} />` |
103
- | `PinInput` | `length`_, `label` or `aria-label`_, `value`/`onValueChange`, `onValueComplete`, `mask`, `validationType` | `<PinInput label="Code" length={6} />` |
103
+ | `PinInput` | `length`\*, `label` or `aria-label`\*, `value`/`onValueChange`, `onValueComplete`, `mask`, `validationType` | `<PinInput label="Code" length={6} />` |
104
104
  | `Field` | `name`, `validate`, `validationMode: 'onSubmit'\|'onBlur'\|'onChange'`, `invalid`, `disabled` | `<Field name="email"><Input label="Email" required /><FieldError /></Field>` |
105
105
  | `FieldDescription` / `FieldError` | FieldError `match` | `<FieldError match="valueMissing">Required</FieldError>` |
106
106
 
@@ -112,7 +112,7 @@ Props marked * are required. All components also take `className`, `style`, `ref
112
112
  | `BottomSheet` | same shape: `BottomSheetTrigger`, `BottomSheetPopup`, `BottomSheetTitle`, `BottomSheetDescription`, `BottomSheetClose`; `snapPoints` | |
113
113
  | `Popover` | `PopoverTrigger`, `PopoverPopup` (`side`, `align`, `sideOffset`), `PopoverTitle`, `PopoverDescription`, `PopoverClose` | |
114
114
  | `PreviewCard` | `PreviewCardTrigger` (an `<a href>`), `PreviewCardPopup` | |
115
- | `Tooltip` | `label`_, one element child_, `side`, `align`, `delay` | `<Tooltip label="Delete"><IconButton icon="delete" aria-label="Delete" /></Tooltip>` |
115
+ | `Tooltip` | `label`\*, one element child_, `side`, `align`, `delay` | `<Tooltip label="Delete"><IconButton icon="delete" aria-label="Delete" /></Tooltip>` |
116
116
  | `Menu` | `MenuTrigger`, `MenuPopup` (`side`, `align`), `MenuItem` (`onClick`, `startIcon`, `endIcon`, `disabled`), `MenuGroup`, `MenuSubmenu` + `MenuSubmenuTrigger` | see Patterns |
117
117
  | `ContextMenu` | `ContextMenuTrigger` (area) + `MenuPopup` / `MenuItem` | |
118
118
  | `Menubar` | contains `Menu`s | |
@@ -122,18 +122,18 @@ Props marked * are required. All components also take `className`, `style`, `ref
122
122
 
123
123
  | Component | Key props | Usage |
124
124
  | --- | --- | --- |
125
- | `AppBar` | `label`*, `labelAs`, `start`, `end`, `size: 'normal'\|'big'`, `centered`, `color` ('container') | `<AppBar label="Inbox" start={…} end={…} />` |
126
- | `NavigationBar` / `NavigationBarItem` | item: `icon`_, `label`_, `active`, `href` or `render={<Link/>}` | `<NavigationBarItem icon="home" label="Home" href="/" active />` |
127
- | `NavigationRail` / `NavigationRailToggle` / `NavigationRailItem` | rail: `expanded`/`defaultExpanded`/`onExpandedChange`; toggle: `aria-label`_; item: `icon`_, `label`*, `active`, `end`, `href` | |
128
- | `NavigationList` / `NavigationListItem` | item: `label`*, `active`, `href`, `render` | |
129
- | `NavigationDrawer` | `NavigationDrawerTrigger`, `NavigationDrawerPopup`, `NavigationDrawerTitle`, `NavigationDrawerItem` (`icon`_, `label`_, `active`, `href`) | |
130
- | `Tabs` | `value`/`defaultValue`/`onValueChange`; `TabsList`, `TabsTab` (`value`_, `icon`), `TabsPanel` (`value`_). Always set `defaultValue` | see Patterns |
125
+ | `AppBar` | `label`\*, `labelAs`, `start`, `end`, `size: 'normal'\|'big'`, `centered`, `color` ('container') | `<AppBar label="Inbox" start={…} end={…} />` |
126
+ | `NavigationBar` / `NavigationBarItem` | item: `icon`\*, `label`\*, `active`, `href` or `render={<Link/>}` | `<NavigationBarItem icon="home" label="Home" href="/" active />` |
127
+ | `NavigationRail` / `NavigationRailToggle` / `NavigationRailItem` | rail: `expanded`/`defaultExpanded`/`onExpandedChange`; toggle: `aria-label`\*; item: `icon`\*, `label`\*, `active`, `end`, `href` | |
128
+ | `NavigationList` / `NavigationListItem` | item: `label`\*, `active`, `href`, `render` | |
129
+ | `NavigationDrawer` | `NavigationDrawerTrigger`, `NavigationDrawerPopup`, `NavigationDrawerTitle`, `NavigationDrawerItem` (`icon`\*, `label`\*, `active`, `href`) | |
130
+ | `Tabs` | `value`/`defaultValue`/`onValueChange`; `TabsList`, `TabsTab` (`value`\*, `icon`), `TabsPanel` (`value`\*). Always set `defaultValue` | see Patterns |
131
131
  | `FloatingToolbar` | `inverseColor`; `FloatingToolbarButton` (IconButton props), `FloatingToolbarSeparator` | |
132
132
  | `Card` | `color` ('container'), `fillType`, `clickable`; `CardTitle` (`as`), `CardContent`, `CardActions` | |
133
- | `List` / `ListItem` | list: `divided`; item: `label`*, `description`, `start`, `end`, `render`. No children | `<ListItem label="Wi-Fi" end={<Switch />} render={<label />} />` |
133
+ | `List` / `ListItem` | list: `divided`; item: `label`\*, `description`, `start`, `end`, `render`. No children | `<ListItem label="Wi-Fi" end={<Switch />} render={<label />} />` |
134
134
  | `Table` | `TableCaption`, `TableHead`, `TableBody`, `TableRow`, `TableHeaderCell`, `TableCell` (native elements) | |
135
135
  | `Accordion` | `value`/`defaultValue` (array), `multiple`; `AccordionItem` (`value`), `AccordionTrigger` (`as`), `AccordionPanel` | |
136
- | `Carousel` / `CarouselItem` | `aria-label`* | |
136
+ | `Carousel` / `CarouselItem` | `aria-label`\* | |
137
137
  | `Divider` | `orientation`, `label`, `squiggly` | `<Divider label="or" />` |
138
138
  | `Typography` | `type: 'body'\|'caption'\|'h1'…'h6'` (not `variant`), `as` | `<Typography type="h5" as="h1">Settings</Typography>` |
139
139
 
@@ -144,11 +144,11 @@ Props marked * are required. All components also take `className`, `style`, `ref
144
144
  | `Avatar` | `name`, `src`, `icon`, `size` (32/40/56px), `color` | `<Avatar name="Ada Lovelace" src={url} />` |
145
145
  | `AvatarGroup` | `max`, `size`, `fan`, `aria-label` | `<AvatarGroup max={3} aria-label="Team">{avatars}</AvatarGroup>` |
146
146
  | `Badge` | `count` (omit for dot, 0 hides), `max`, `color` ('error'), wraps children | `<Badge count={3}><IconButton icon="mail" aria-label="Mail, 3 new" /></Badge>` |
147
- | `Icon` | `name`* | `<Icon name="star" />` |
148
- | `Progress` | `value`* (`number \| null`), `type: 'linear'\|'circular'\|'inline'`, `label` or `aria-label`*, `squiggly` | `<Progress type="circular" value={null} aria-label="Loading" />` |
147
+ | `Icon` | `name`\* | `<Icon name="star" />` |
148
+ | `Progress` | `value`\* (`number \| null`), `type: 'linear'\|'circular'\|'inline'`, `label` or `aria-label`\*, `squiggly` | `<Progress type="circular" value={null} aria-label="Loading" />` |
149
149
  | `Skeleton` | `variant: 'text'\|'circular'\|'rectangular'`, `animation`; size via `style` | `<Skeleton style={{ width: 120 }} />` |
150
150
  | `Sticker` | `color`, `startIcon`, `tilt` | `<Sticker>NEW</Sticker>` |
151
- | `AnimatedNumber` | `value`*, `format`, `locales` | `<AnimatedNumber value={n} />` |
151
+ | `AnimatedNumber` | `value`\*, `format`, `locales` | `<AnimatedNumber value={n} />` |
152
152
  | `Kbd` | `children`, `listen`, `listenFor` | `<Kbd>⌘</Kbd><Kbd>K</Kbd>` |
153
153
 
154
154
  ## Patterns
@@ -434,7 +434,7 @@ Inside AnvilRoot: `var(--avl-color-background)`, `var(--avl-color-on-background)
434
434
  | `<Button size="lg">` / `size="sm"` | `size="big"` / `size="small"` |
435
435
  | `<Button><Plus /> Add</Button>` | `<Button startIcon="add">Add</Button>` |
436
436
  | `<IconButton><DeleteIcon /></IconButton>` | `<IconButton icon="delete" aria-label="Delete" />` |
437
- | `<IconButton icon="x" size="small" />` | IconButton has no `size`; it's always 40px |
437
+ | `<IconButton icon="close" size="sm" />` | `size="small"` (`'small' \| 'normal' \| 'big'`) |
438
438
  | `<DialogTrigger asChild><Button>Open</Button></DialogTrigger>` | `<DialogTrigger render={<Button />}>Open</DialogTrigger>` |
439
439
  | `<DialogTrigger>Open</DialogTrigger>` expecting a styled button | It's a bare `<button>`; add `render={<Button />}` |
440
440
  | `<DialogContent>`, `<DialogHeader>`, `<DialogFooter>` | `<DialogPopup>`, (nothing), `<DialogActions>` |
package/README.md CHANGED
@@ -1,49 +1,22 @@
1
1
  # anvilui
2
2
 
3
- React components built on [Base UI](https://base-ui.com). Requires React 19.
3
+ **Material 3 Expressive for the web, pushed further.**
4
4
 
5
- ```sh
6
- npm install anvilui
7
- ```
8
-
9
- ## Using with AI coding agents
5
+ React components that bounce, stretch, roll and react. AnvilUI brings Google's [Material 3 Expressive](https://m3.material.io/) to React, then keeps going where the spec stops: buttons with weight, selections that stretch, numbers that roll and progress that ripples. Around 50 components, all built on [Base UI](https://base-ui.com), so keyboard, focus and screen reader support come built in.
10
6
 
11
- AnvilUI is new, so AI models don't know its API and will guess it from other libraries. The package ships accurate, version-matched docs for agents: [`AGENTS.md`](AGENTS.md) plus one page per component in [`docs/`](docs/llms-index.md).
7
+ <img src="https://raw.githubusercontent.com/itayvak/anvilui/main/.github/assets/showcase.png" alt="AnvilUI components in light and dark mode" width="900" />
12
8
 
13
- Tell your agent to read them. Paste this into your project's `AGENTS.md`, `CLAUDE.md`, `.cursorrules` or `.github/copilot-instructions.md`:
9
+ ## Install
14
10
 
15
- ```md
16
- ## AnvilUI
17
-
18
- This project uses the `anvilui` React component library. Its API differs from shadcn/ui, Radix and MUI, so don't guess it. Before writing or changing UI code that uses it, read `node_modules/anvilui/AGENTS.md`, then the page for each component you use in `node_modules/anvilui/docs/` (index: `node_modules/anvilui/docs/llms-index.md`). These docs match the installed version; prefer them over memory.
19
- ```
20
-
21
- Or run this once in your project, which appends that note to whichever of those files exist (or creates `AGENTS.md`):
11
+ Requires React 19.
22
12
 
23
13
  ```sh
24
- npx anvilui setup-agents
14
+ npm install anvilui
25
15
  ```
26
16
 
27
- In development, mistakes like a missing stylesheet, `asChild`, `variant` or a missing `aria-label` log an `[anvilui]` error that shows the fix and names the doc page, so pasting the console output back to your agent is enough. These checks are removed from production builds.
28
-
29
17
  ## Setup
30
18
 
31
- ### 1. Load the fonts
32
-
33
- AnvilUI does not load any fonts by itself. The default theme uses Google Sans and Google Sans Code - if you intend to use them, add this to your HTML `<head>`:
34
-
35
- ```html
36
- <link rel="preconnect" href="https://fonts.googleapis.com" />
37
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
38
- <link
39
- rel="stylesheet"
40
- href="https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght,MONO@0,300..800,1;1,300..800,1&family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap"
41
- />
42
- ```
43
-
44
- To use different fonts, pass `tokens.font` to `AnvilRoot` and load the font yourself instead of Google Sans.
45
-
46
- ### 2. Wrap your app in `AnvilRoot`
19
+ Import the stylesheet once and wrap your app in `AnvilRoot`. That's the only provider: it handles theming, color mode, tooltips and snackbars.
47
20
 
48
21
  ```tsx
49
22
  import { AnvilRoot, Button } from 'anvilui'
@@ -51,79 +24,59 @@ import 'anvilui/styles.css'
51
24
 
52
25
  export function App() {
53
26
  return (
54
- <AnvilRoot defaultColorMode="light">
55
- <Button>Hello</Button>
27
+ <AnvilRoot defaultColorMode="system">
28
+ <Button startIcon="rocket_launch">Hello</Button>
56
29
  </AnvilRoot>
57
30
  )
58
31
  }
59
32
  ```
60
33
 
61
- - **Icons:** components import `material-symbols/rounded.css`, so your bundler needs to handle CSS and font files from `node_modules` (Vite, Next and webpack setups do by default).
62
- - Styles only apply inside `AnvilRoot`; nothing outside it is touched. To theme the whole page, give it a `className` that fills the viewport (`min-height: 100vh`).
63
-
64
- ## Color mode and themes
34
+ - Styles only apply inside `AnvilRoot`. To theme the whole page, give it a `className` that fills the viewport (`min-height: 100vh`).
35
+ - Icons come from the `material-symbols` font, so your bundler needs to handle CSS and font files from `node_modules` (Vite, Next.js and webpack do by default).
36
+ - The default theme uses Google Sans, which AnvilUI doesn't load for you. See [setup](https://github.com/itayvak/anvilui/blob/main/core/docs/setup.md) for the font link, Next.js and more.
65
37
 
66
- The color mode is `'light'`, `'dark'` or `'system'` (the default, which follows the OS setting live). Pass `storageKey="my-app-color-mode"` to remember the user's choice; with server rendering the saved mode is applied before the first paint, so there's no flash. Read or change the mode anywhere inside with `useAnvil()`:
38
+ ## Make it yours
67
39
 
68
40
  ```tsx
69
- // colorMode is what's shown ('light' | 'dark'); colorModeSetting may be 'system'
70
- const { colorMode, colorModeSetting, setColorMode } = useAnvil()
71
- ```
41
+ import { AnvilRoot, createTheme } from 'anvilui'
72
42
 
73
- To switch themes at runtime, keep them in state and pass them as `lightTheme` / `darkTheme`.
43
+ const brand = createTheme('#0B6E4F') // or: await createThemeFromImage(file)
74
44
 
75
- ## Making a theme
45
+ <AnvilRoot lightTheme={brand.light} darkTheme={brand.dark} storageKey="color-mode">
46
+ <App />
47
+ </AnvilRoot>
48
+ ```
76
49
 
77
- Generate a light and a dark theme from one color, or from the main colors of an image:
50
+ One color becomes a full light and dark palette. Color mode follows the OS by default, and with `storageKey` the user's choice is remembered and applied before first paint. Spacing, radius, fonts and motion are tokens you can override too. See [theming](https://github.com/itayvak/anvilui/blob/main/core/docs/theming.md).
78
51
 
79
- ```tsx
80
- import { createTheme, createThemeFromImage } from 'anvilui'
52
+ ## Using with AI coding agents
81
53
 
82
- const theme = createTheme('#0B6E4F') // optional: { tonal: '#…' }
83
- // or, in the browser: from an <img>, a File/Blob, or a CORS-enabled URL
84
- const theme = await createThemeFromImage(file)
54
+ AnvilUI is new, so AI models don't know its API and will guess it from other libraries. The package ships accurate, version-matched docs for agents: [`AGENTS.md`](https://github.com/itayvak/anvilui/blob/main/core/AGENTS.md) plus one page per component in `docs/`.
85
55
 
86
- <AnvilRoot lightTheme={theme.light} darkTheme={theme.dark}>
87
- ```
56
+ Run this once in your project to point your agent at them:
88
57
 
89
- Each color keeps the lightness of the base theme, so text stays readable; only the hue and colorfulness change. Error, warning and success colors stay the same. Tweak any role by spreading: `{ ...theme.light, primary: '#…' }`.
58
+ ```sh
59
+ npx anvilui setup-agents
60
+ ```
90
61
 
91
- ## Morphing between views
62
+ It appends a short note to whichever of `AGENTS.md`, `CLAUDE.md`, `.cursorrules` or `.github/copilot-instructions.md` exist, or creates `AGENTS.md`. To add it by hand, paste this:
92
63
 
93
- `morph(id, update)` grows one element into another while the view changes, like a list row opening into its detail page. Give both elements the same `data-morph-id`. They can be any elements, including your own markup.
64
+ ```md
65
+ ## AnvilUI
94
66
 
95
- ```tsx
96
- import { morph } from 'anvilui'
97
-
98
- function Albums() {
99
- const [open, setOpen] = useState<string | null>(null)
100
-
101
- if (open) {
102
- return (
103
- <section data-morph-id={open}>
104
- <button onClick={() => morph(open, () => setOpen(null))}>
105
- Back
106
- </button>
107
- </section>
108
- )
109
- }
110
- return albums.map((a) => (
111
- <button
112
- key={a.id}
113
- data-morph-id={a.id}
114
- onClick={() => morph(a.id, () => setOpen(a.id))}
115
- >
116
- {a.title}
117
- </button>
118
- ))
119
- }
67
+ This project uses the `anvilui` React component library. Its API differs from shadcn/ui, Radix and MUI, so don't guess it. Before writing or changing UI code that uses it, read `node_modules/anvilui/AGENTS.md`, then the page for each component you use in `node_modules/anvilui/docs/` (index: `node_modules/anvilui/docs/llms-index.md`). These docs match the installed version; prefer them over memory.
120
68
  ```
121
69
 
122
- - The box's size, position, background, corners and shadow animate from one element to the other. Their content crossfades.
123
- - `update` must change the view synchronously: set React state, or call your router with its sync option (React Router: `navigate(to, { flushSync: true })`). A view that waits on data or a lazy route has nothing to morph into yet.
124
- - It returns a promise that resolves when the morph ends, e.g. to move focus afterwards: `await morph(id, close); row.focus()`.
125
- - Pass `{ duration, easing }` as a third argument to override the theme's `easeLength.slow` and `ease.smooth`.
126
- - Have the elements themselves rather than an id? Use `morphBetween(fromEl, update, () => toEl, options)`. The target is a function because it usually only exists after `update` runs.
127
- - Without View Transitions support, or with reduced motion on, `update` just runs.
70
+ In development, mistakes like a missing stylesheet, `asChild`, `variant` or a missing `aria-label` log an `[anvilui]` error that shows the fix and names the doc page, so pasting the console output back to your agent is enough. These checks are removed from production builds.
71
+
72
+ ## Documentation
73
+
74
+ - [Component docs](https://github.com/itayvak/anvilui/blob/main/core/docs/llms-index.md): one page per component, with props and examples
75
+ - [Theming and color mode](https://github.com/itayvak/anvilui/blob/main/core/docs/theming.md)
76
+ - [Forms and validation](https://github.com/itayvak/anvilui/blob/main/core/docs/forms.md)
77
+ - [Morphing between views](https://github.com/itayvak/anvilui/blob/main/core/docs/morph.md) with `morph()`
78
+ - [API reference](https://github.com/itayvak/anvilui/blob/main/core/AGENTS.md): every export on one page
79
+
80
+ ## License
128
81
 
129
- `Dialog` and `Popover` take a `morph` prop that does this between the trigger and the popup.
82
+ MIT
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode, type Ref } from 'react';
2
2
  import { Combobox as BaseCombobox } from '@base-ui/react/combobox';
3
3
  import '../Input/input.css';
4
4
  import '../Menu/menu.css';
@@ -22,6 +22,12 @@ export type ComboboxProps<Item> = Omit<BaseCombobox.Root.Props<Item>, 'children'
22
22
  size?: 'small' | 'normal';
23
23
  /** Applied to the outer wrapper, so width and margins work as expected. */
24
24
  className?: string;
25
+ /** Applied to the outer wrapper, with `className`. */
26
+ style?: CSSProperties;
27
+ /** The text `<input>`. */
28
+ ref?: Ref<HTMLInputElement>;
29
+ /** The text `<input>`'s id. */
30
+ id?: string;
25
31
  };
26
32
  /**
27
33
  * A text field that filters a list of options as you type, and picks one.
@@ -36,7 +42,7 @@ export type ComboboxProps<Item> = Omit<BaseCombobox.Root.Props<Item>, 'children'
36
42
  * )}
37
43
  * </Combobox>
38
44
  */
39
- export declare function Combobox<Item>({ children, label, placeholder, empty, size, className, ...props }: ComboboxProps<Item>): import("react").JSX.Element;
45
+ export declare function Combobox<Item>({ children, label, placeholder, empty, size, className, style, ref, id, ...allProps }: ComboboxProps<Item>): import("react").JSX.Element;
40
46
  export type ComboboxItemProps = BaseCombobox.Item.Props;
41
47
  /** One option in a `Combobox`. Needs a `value` (the item); children are its label. */
42
48
  export declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): import("react").JSX.Element;
@@ -1,8 +1,10 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
2
  import { Input as BaseInput } from '@base-ui/react/input';
3
3
  import '../Input/input.css';
4
4
  import './date-input.css';
5
- export type DateInputProps = Omit<BaseInput.Props, 'value' | 'defaultValue' | 'onValueChange' | 'type' | 'size' | 'className' | 'placeholder'> & {
5
+ export type DateInputProps = Omit<BaseInput.Props, 'value' | 'defaultValue' | 'onValueChange' | 'type' | 'size' | 'className' | 'style' | 'placeholder'> & {
6
+ /** Applied to the outer wrapper, with `className`. */
7
+ style?: CSSProperties;
6
8
  /** The date as `"YYYY-MM-DD"` (like `<input type="date">`), or `null` for none. */
7
9
  value?: string | null;
8
10
  /** Starting date when `value` isn't controlled. @default null */
@@ -34,4 +36,4 @@ export type DateInputProps = Omit<BaseInput.Props, 'value' | 'defaultValue' | 'o
34
36
  * const [date, setDate] = useState<string | null>(null)
35
37
  * <DateInput label="Start date" value={date} onValueChange={setDate} />
36
38
  */
37
- export declare function DateInput({ value: valueProp, defaultValue, onValueChange, label, size, disabled, id, onBlur, className, ...props }: DateInputProps): import("react").JSX.Element;
39
+ export declare function DateInput({ value: valueProp, defaultValue, onValueChange, label, size, disabled, id, onBlur, className, style, ref, ...props }: DateInputProps): import("react").JSX.Element;
@@ -9,14 +9,16 @@ export type IconButtonProps = Omit<BaseButtonProps, 'children'> & {
9
9
  fillType?: ComponentFillType;
10
10
  /** Color role from the theme. @default 'primary' */
11
11
  color?: ComponentColor;
12
+ /** 32px, 40px or 48px, the same heights as `Button`. @default 'normal' */
13
+ size?: 'small' | 'normal' | 'big';
12
14
  /** Required: there is no visible text, so screen readers read this. */
13
15
  'aria-label': string;
14
16
  };
15
17
  /**
16
- * A round, 40px button that shows only an icon. Always 40px: it has no
17
- * `size` prop.
18
+ * A round button that shows only an icon.
18
19
  *
19
20
  * @example
20
21
  * <IconButton icon="delete" aria-label="Delete" fillType="text" color="container" />
22
+ * <IconButton icon="add" aria-label="Add" size="big" />
21
23
  */
22
- export declare function IconButton({ icon, color, fillType, className, ...props }: IconButtonProps): import("react").JSX.Element;
24
+ export declare function IconButton({ icon, color, fillType, size, className, ...props }: IconButtonProps): import("react").JSX.Element;
@@ -1,7 +1,9 @@
1
- import type { ReactNode } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
2
  import { Input as BaseInput } from '@base-ui/react/input';
3
3
  import './input.css';
4
- export type InputProps = Omit<BaseInput.Props, 'className' | 'size'> & {
4
+ export type InputProps = Omit<BaseInput.Props, 'className' | 'style' | 'size'> & {
5
+ /** Applied to the outer wrapper, with `className`. */
6
+ style?: CSSProperties;
5
7
  /** Floating label. Sits inside the field and moves onto the border once it has focus or a value. */
6
8
  label?: ReactNode;
7
9
  /**
@@ -21,4 +23,4 @@ export type InputProps = Omit<BaseInput.Props, 'className' | 'size'> & {
21
23
  * @example
22
24
  * <Input label="Email" type="email" value={email} onValueChange={setEmail} />
23
25
  */
24
- export declare function Input({ label, size, className, placeholder, ...props }: InputProps): import("react").JSX.Element;
26
+ export declare function Input({ label, size, className, style, placeholder, ...props }: InputProps): import("react").JSX.Element;
@@ -1,7 +1,9 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
2
  import { OTPField as BaseOTPField } from '@base-ui/react/otp-field';
3
3
  import './pin-input.css';
4
- export type PinInputProps = Omit<BaseOTPField.Root.Props, 'className' | 'children' | 'size'> & {
4
+ export type PinInputProps = Omit<BaseOTPField.Root.Props, 'className' | 'style' | 'children' | 'size'> & {
5
+ /** Applied to the outer wrapper, with `className`. */
6
+ style?: CSSProperties;
5
7
  /** `filled` gives each box a tinted background and a bottom line instead of a full border. @default 'outlined' */
6
8
  fillType?: 'filled' | 'outlined';
7
9
  /** Boxes are 40px tall instead of 56px. @default 'normal' */
@@ -28,4 +30,4 @@ export type PinInputProps = Omit<BaseOTPField.Root.Props, 'className' | 'childre
28
30
  * @example
29
31
  * <PinInput label="Verification code" length={6} onValueChange={setCode} />
30
32
  */
31
- export declare function PinInput({ label, 'aria-label': ariaLabel, fillType, size, slotLabel, className, id, length, ...props }: PinInputProps): import("react").JSX.Element;
33
+ export declare function PinInput({ label, 'aria-label': ariaLabel, fillType, size, slotLabel, className, style, id, length, ...props }: PinInputProps): import("react").JSX.Element;
@@ -7,7 +7,10 @@ export type ProgressProps = BaseProgress.Root.Props & {
7
7
  * place inside a line of text. @default 'linear'
8
8
  */
9
9
  type?: 'linear' | 'circular' | 'inline';
10
- /** Draw the filled part of a linear bar as a moving wave. @default false */
10
+ /**
11
+ * Draw the filled part of a linear bar as a moving wave. Changing it
12
+ * animates between the wave and the plain bar. @default false
13
+ */
11
14
  squiggly?: boolean;
12
15
  } & ({
13
16
  /** Visible label above the indicator. */
@@ -1,7 +1,7 @@
1
1
  import { Radio as BaseRadio } from '@base-ui/react/radio';
2
2
  import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';
3
3
  import './radio-group.css';
4
- export type RadioGroupProps<Value = any> = BaseRadioGroup.Props<Value>;
4
+ export type RadioGroupProps<Value = unknown> = BaseRadioGroup.Props<Value>;
5
5
  /**
6
6
  * A group of `Radio`s where exactly one is picked. State: `value` /
7
7
  * `defaultValue` / `onValueChange` on the group; each `Radio` has a `value`.
@@ -14,6 +14,6 @@ export type RadioGroupProps<Value = any> = BaseRadioGroup.Props<Value>;
14
14
  * </RadioGroup>
15
15
  */
16
16
  export declare function RadioGroup<Value>({ className, ...props }: RadioGroupProps<Value>): import("react").JSX.Element;
17
- export type RadioProps<Value = any> = BaseRadio.Root.Props<Value>;
17
+ export type RadioProps<Value = unknown> = BaseRadio.Root.Props<Value>;
18
18
  /** One option in a `RadioGroup`. Needs a `value`. Wrap it in a `<label>` with its text. */
19
19
  export declare function Radio<Value>({ className, ...props }: RadioProps<Value>): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode, type Ref } from 'react';
2
2
  import { Autocomplete as BaseAutocomplete } from '@base-ui/react/autocomplete';
3
3
  import type { MaterialSymbol } from 'material-symbols';
4
4
  import '../Menu/menu.css';
@@ -6,31 +6,47 @@ import './search.css';
6
6
  export type SearchProps<Item> = Omit<BaseAutocomplete.Root.Props<Item>, 'children' | 'items'> & {
7
7
  /** The suggestions. Filtered against what's typed. */
8
8
  items?: readonly Item[];
9
- /** Renders each suggestion, e.g. `(item) => <SearchItem key={item} value={item}>{item}</SearchItem>`. */
10
- children: (item: Item, index: number) => ReactNode;
9
+ /**
10
+ * Renders each suggestion, e.g. `(item) => <SearchItem key={item} value={item}>{item}</SearchItem>`.
11
+ * Leave it out for a plain search bar with no suggestion list.
12
+ */
13
+ children?: (item: Item, index: number) => ReactNode;
11
14
  /** Hint text inside the bar, e.g. "Search mail". */
12
15
  placeholder?: string;
13
16
  /** There's no visible label, so the input needs a name for screen readers. */
14
17
  'aria-label': string;
15
18
  /** Shown in the popup when nothing matches. Without it, the popup hides. */
16
19
  empty?: ReactNode;
20
+ /**
21
+ * The bar's background. Use `'container'` when the bar sits on a
22
+ * `surface` panel, like a navigation drawer, so it doesn't blend in.
23
+ * @default 'surface'
24
+ */
25
+ color?: 'surface' | 'container';
17
26
  /** Accessible name of the clear button. @default 'Clear' */
18
27
  clearLabel?: string;
19
28
  /** Applied to the bar, so width and margins work as expected. */
20
29
  className?: string;
30
+ /** Applied to the bar, with `className`. */
31
+ style?: CSSProperties;
32
+ /** The text `<input>`. */
33
+ ref?: Ref<HTMLInputElement>;
34
+ /** The text `<input>`'s id. */
35
+ id?: string;
21
36
  };
22
37
  /**
23
38
  * Material 3 search bar with a list of suggestions under it. Pass `items`
24
39
  * and it filters them as you type. The typed text is `value` /
25
- * `defaultValue` / `onValueChange`. Children must be a function that renders
26
- * one suggestion.
40
+ * `defaultValue` / `onValueChange`. Children are a function that renders one
41
+ * suggestion; without them it's a plain search bar that never opens a list.
27
42
  *
28
43
  * @example
44
+ * <Search aria-label="Filter people" value={query} onValueChange={setQuery} />
29
45
  * <Search aria-label="Search mail" placeholder="Search mail" items={recent} value={query} onValueChange={setQuery}>
30
46
  * {(item: string) => <SearchItem key={item} value={item} startIcon="history">{item}</SearchItem>}
31
47
  * </Search>
32
48
  */
33
- export declare function Search<Item>({ children, placeholder, 'aria-label': ariaLabel, empty, clearLabel, className, ...props }: SearchProps<Item>): import("react").JSX.Element;
49
+ export declare function Search<Item>({ children, placeholder, 'aria-label': ariaLabel, empty, color, clearLabel, className, style, ref, id, ...allProps }: SearchProps<Item>): import("react").JSX.Element;
34
50
  export type SearchItemProps = BaseAutocomplete.Item.Props & {
35
51
  /** Material Symbol before the text, e.g. `history` for a recent search. */
36
52
  startIcon?: MaterialSymbol;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode, type Ref } from 'react';
2
2
  import { Select as BaseSelect } from '@base-ui/react/select';
3
3
  import '../Input/input.css';
4
4
  import '../Menu/menu.css';
@@ -15,6 +15,10 @@ export type SelectProps<Value, Multiple extends boolean | undefined = false> = B
15
15
  size?: 'small' | 'normal';
16
16
  /** Applied to the outer wrapper, so width and margins work as expected. */
17
17
  className?: string;
18
+ /** Applied to the outer wrapper, with `className`. */
19
+ style?: CSSProperties;
20
+ /** The field's button (the part that opens the list). */
21
+ ref?: Ref<HTMLButtonElement>;
18
22
  };
19
23
  /**
20
24
  * A dropdown to pick one option (or several, with `multiple`). Put
@@ -32,7 +36,7 @@ export type SelectProps<Value, Multiple extends boolean | undefined = false> = B
32
36
  * ))}
33
37
  * </Select>
34
38
  */
35
- export declare function Select<Value, Multiple extends boolean | undefined = false>({ label, placeholder, size, className, children, ...props }: SelectProps<Value, Multiple>): import("react").JSX.Element;
39
+ export declare function Select<Value, Multiple extends boolean | undefined = false>({ label, placeholder, size, className, style, ref, children, ...allProps }: SelectProps<Value, Multiple>): import("react").JSX.Element;
36
40
  export type SelectItemProps = BaseSelect.Item.Props;
37
41
  /** One option in a `Select`. Needs a `value`; children are its label. */
38
42
  export declare function SelectItem({ className, children, ...props }: SelectItemProps): import("react").JSX.Element;
@@ -7,7 +7,8 @@ export type SliderProps<Value extends number | readonly number[] = number | read
7
7
  showValue?: boolean;
8
8
  /**
9
9
  * Thin track with the selected part drawn as a moving wave, like a
10
- * squiggly `Progress`. Horizontal only. @default false
10
+ * squiggly `Progress`. Horizontal only. Changing it animates between the
11
+ * wave and the plain track, e.g. `squiggly={playing}`. @default false
11
12
  */
12
13
  squiggly?: boolean;
13
14
  } & ({
@@ -8,8 +8,6 @@ export type WaveSpan = {
8
8
  rest?: [number, number][];
9
9
  /** Draw the `rest` pieces as waves in step with the main one, not flat. */
10
10
  restWave?: boolean;
11
- /** Draw the stop dot at the far end. */
12
- dot?: boolean;
13
11
  /** Jump straight to `from`/`to` instead of easing toward them. */
14
12
  snap?: boolean;
15
13
  };
@@ -27,10 +25,34 @@ export type SquigglyWaveProps = {
27
25
  still?: boolean;
28
26
  /** Run top to bottom instead of left to right. @default false */
29
27
  vertical?: boolean;
28
+ /**
29
+ * Ease into a straight line as thick as `--avl-wave-flat-stroke`, ready
30
+ * to be swapped for the plain track. Needs `still` off. @default false
31
+ */
32
+ flat?: boolean;
33
+ /** Start out flat, to ease into a wave from the plain track. */
34
+ startFlat?: boolean;
35
+ /** Called once the wave has gone fully flat. */
36
+ onFlat?: () => void;
37
+ };
38
+ /**
39
+ * Keeps a squiggly part's wave mounted while it flattens out, so turning
40
+ * `squiggly` off eases into the plain track instead of jumping, and turning
41
+ * it on eases out of it. Spread `wave` onto SquigglyWave, and draw the plain
42
+ * track when `show` is false.
43
+ */
44
+ export declare function useWaveMorph(squiggly: boolean): {
45
+ show: boolean;
46
+ wave: {
47
+ flat: boolean;
48
+ startFlat: boolean;
49
+ onFlat: () => void;
50
+ };
30
51
  };
31
52
  /**
32
53
  * One continuous wave drawn to an exact length, so it has no seams and gets
33
- * round ends. Redrawn every frame to ripple and to ease toward its new span;
34
- * with reduced motion it holds still and jumps.
54
+ * round ends. Redrawn every frame to ripple, to ease toward its new span and
55
+ * to flatten out or back (`flat`); with reduced motion it holds still and
56
+ * jumps.
35
57
  */
36
58
  export declare function SquigglyWave(props: SquigglyWaveProps): import("react").JSX.Element;
@@ -1,8 +1,11 @@
1
- import type { ComponentProps, ReactNode } from 'react';
1
+ import type { ComponentProps, CSSProperties, ReactNode } from 'react';
2
2
  import { Input as BaseInput } from '@base-ui/react/input';
3
3
  import '../Input/input.css';
4
4
  import './textarea.css';
5
- export type TextareaProps = Omit<ComponentProps<'textarea'>, 'className'> & Pick<BaseInput.Props, 'onValueChange'> & {
5
+ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'className' | 'style'> & {
6
+ /** Applied to the outer wrapper, with `className`. */
7
+ style?: CSSProperties;
8
+ } & Pick<BaseInput.Props, 'onValueChange'> & {
6
9
  /** Floating label. Sits on the first line and moves onto the border once it has focus or a value. */
7
10
  label?: ReactNode;
8
11
  /**
@@ -21,4 +24,4 @@ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'className'> & Pick
21
24
  * @example
22
25
  * <Textarea label="Bio" rows={4} defaultValue="" />
23
26
  */
24
- export declare function Textarea({ label, size, className, placeholder, ...props }: TextareaProps): import("react").JSX.Element;
27
+ export declare function Textarea({ label, size, className, style, placeholder, ...props }: TextareaProps): import("react").JSX.Element;