wimui 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.
@@ -0,0 +1,2418 @@
1
+ # WIM UI — LLM guide (llms-full.txt)
2
+
3
+ > Machine-readable map of the wimui React component library for coding agents. Read this before generating any UI with wimui: it defines the required CSS/setup, the correct import paths, the full component list, and the composition rules that keep screens from looking AI-generated.
4
+
5
+ ## What this is
6
+
7
+ **wimui** v0.3.0 — a React 19 component library: 216 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
8
+
9
+ ## Install & required setup
10
+
11
+ ```bash
12
+ npm i wimui
13
+ ```
14
+
15
+ ```ts
16
+ // 1. CSS contract — styles.css is REQUIRED (design tokens + component styles).
17
+ import "wimui/styles.css";
18
+ import "wimui/reset.css"; // optional base reset
19
+
20
+ // 2. Components — import from the root barrel or a category subpath (tree-shakeable).
21
+ import { Button, Card } from "wimui";
22
+ import { Stack, Grid } from "wimui/layout";
23
+ ```
24
+
25
+ - **Theme**: wrap the app in `WimProvider` (recommended) or set `data-theme="light|dark"` on `<html>` (omit to follow OS).
26
+ - **Density**: `data-density="comfortable|compact"`, or `WimProvider` / `setWimDensity()`.
27
+ - **Never hardcode** colors / spacing / sizes in consumer code — use the `--wim-*` CSS custom properties (tokens) that styles.css defines.
28
+ - **Form + RHF** helpers live in `wimui/rhf` (react-hook-form + zod), not the root barrel.
29
+
30
+ ## Import paths
31
+
32
+ Every component works from the root barrel `"wimui"`. For smaller bundles, import from its category subpath instead:
33
+
34
+ - `wimui/layout`
35
+ - `wimui/form`
36
+ - `wimui/feedback`
37
+ - `wimui/navigation`
38
+ - `wimui/data-display`
39
+ - `wimui/overlay`
40
+ - `wimui/typography`
41
+ - `wimui/media`
42
+ - `wimui/charts`
43
+ - `wimui/ai`
44
+
45
+ ## Composition rules — build screens that don't look AI-generated
46
+
47
+ Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo.
48
+
49
+ **Before laying out**: pick exactly ONE visual protagonist for the screen. If every element has the same volume, it reads as AI-generated.
50
+
51
+ **Banned patterns (the "AI signature" — do not emit):**
52
+ - `linear-gradient(135deg, …)` hero backgrounds → use surface-hierarchy tokens (`surface` / `surface-raised`) to separate planes.
53
+ - The stock hero (badge → big heading → subtext → two solid/outline buttons) → asymmetric composition led by one protagonist.
54
+ - "Rule of three" equal feature cards (icon + short heading + one line, ×3) → let the count follow content (2 or 5 is fine); vary card size and copy length.
55
+ - Emoji used as UI icons (☰ ★ ✓) → use `src/icon/` components. (Emoji as functional markers in docs/README is fine; as UI icons it is not.)
56
+ - Skeleton used as anything but loading (fake screenshots) → real-looking content or an actual mini UI.
57
+ - Every section center-aligned → default to left-aligned; at most one centered section per page.
58
+ - Round numbers ("1000+", "99%") + generic copy ("Get started", "seamless/powerful/effortless") → jagged realistic numbers (4,281) and product-specific voice.
59
+ - Sequential/alphabetical dummy names (Alice/Bob/Charlie, User 1/2) → culturally diverse, unordered, real-feeling names.
60
+ - Rainbow color-per-category → color carries state only (success/warning/danger); everything else neutral.
61
+ - Perfectly even grids (2×2, 3×3 all same size) → break the grid (span the protagonist cell, size differences, hero+sidebar asymmetry).
62
+ - Filling every slot / uniform gaps everywhere → leave whitespace; group by proximity (tight within a group, loose between groups).
63
+
64
+ **Must rules:**
65
+ 1. One visual protagonist per screen (jump in size/weight/color creates the entry point).
66
+ 2. Contrast density: hero/showcase sparse, data regions (tables/lists) dense. Uniform "medium density" reads as AI.
67
+ 3. Never override a component's defaults via inline `style` (`padding:0`, `borderRadius:0`). Add a prop/token instead.
68
+ 4. Never hardcode gap/padding/size — use `--wim-spacing-*` tokens.
69
+ 5. Keep one radius stance per screen (`radius.component` / `radius.container` / `radius.overlay`); don't mix 0 and lg arbitrarily.
70
+ 6. Limit accent color: primary surfaces (solid buttons, emphasis backgrounds) 1–2 per view.
71
+ 7. Give demo content real substance (product-context copy, internally consistent numbers/dates/names — active ≤ total, dates not evenly spaced).
72
+ 8. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
73
+
74
+ ## Components
75
+
76
+ ### layout — `import { … } from "wimui/layout"`
77
+
78
+ - **AppShell** — Basic application shell layout
79
+ - `header: React.ReactNode` — Header component
80
+ - `sidebar: React.ReactNode` — Sidebar component
81
+ - `footer: React.ReactNode` — Footer component
82
+ - `navbar: React.ReactNode` — Navbar component (mobile bottom navigation)
83
+ - `padding: boolean` = true — Add padding to main content
84
+ - `centered: boolean` — Center main content horizontally
85
+ - `maxWidth: number | string` — Maximum width for centered content
86
+ - **AspectRatio** — Fixed ratio container
87
+ - `ratio: number` = 1 — Aspect ratio (e.g. 16 / 9, 1, 4 / 3)
88
+ - `children: React.ReactNode` (required) — Child content
89
+ - **BentoGrid** — Modern card grid
90
+ - `children: React.ReactNode` — Grid items (typically BentoGrid.Item elements)
91
+ - **Box** — Polymorphic box
92
+ - `as: C` — The component used for the root node. Either a string to use a HTML element or a component.
93
+ - `asChild: boolean` = false — If true, the box will be rendered as its child, merging its props onto that child.
94
+ - `p: number | WimSpacing` — Padding
95
+ - `pt: number | WimSpacing` — Padding top
96
+ - `pr: number | WimSpacing` — Padding right
97
+ - `pb: number | WimSpacing` — Padding bottom
98
+ - `pl: number | WimSpacing` — Padding left
99
+ - `px: number | WimSpacing` — Padding horizontal
100
+ - `py: number | WimSpacing` — Padding vertical
101
+ - `m: number | WimSpacing` — Margin
102
+ - `mt: number | WimSpacing` — Margin top
103
+ - `mr: number | WimSpacing` — Margin right
104
+ - `mb: number | WimSpacing` — Margin bottom
105
+ - `ml: number | WimSpacing` — Margin left
106
+ - `mx: number | WimSpacing` — Margin horizontal
107
+ - `my: number | WimSpacing` — Margin vertical
108
+ - `bg: T | (string & {})` — Background color
109
+ - `color: T | (string & {})` — Text color
110
+ - `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
111
+ - `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
112
+ - `radius: number | WimRadius` — Border radius
113
+ - `shadow: T | (string & {})` — Box shadow
114
+ - `display: React.CSSProperties["display"]` — Display
115
+ - `position: React.CSSProperties["position"]` — Position
116
+ - **Center** — Radial centering
117
+ - `inline: boolean` = false — Whether to use inline-flex
118
+ - `asChild: boolean` = false — If true, the box will be rendered as its child, merging its props onto that child.
119
+ - `p: number | WimSpacing` — Padding
120
+ - `pt: number | WimSpacing` — Padding top
121
+ - `pr: number | WimSpacing` — Padding right
122
+ - `pb: number | WimSpacing` — Padding bottom
123
+ - `pl: number | WimSpacing` — Padding left
124
+ - `px: number | WimSpacing` — Padding horizontal
125
+ - `py: number | WimSpacing` — Padding vertical
126
+ - `m: number | WimSpacing` — Margin
127
+ - `mt: number | WimSpacing` — Margin top
128
+ - `mr: number | WimSpacing` — Margin right
129
+ - `mb: number | WimSpacing` — Margin bottom
130
+ - `ml: number | WimSpacing` — Margin left
131
+ - `mx: number | WimSpacing` — Margin horizontal
132
+ - `my: number | WimSpacing` — Margin vertical
133
+ - `bg: T | (string & {})` — Background color
134
+ - `color: T | (string & {})` — Text color
135
+ - `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
136
+ - `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
137
+ - `radius: number | WimRadius` — Border radius
138
+ - `shadow: T | (string & {})` — Box shadow
139
+ - `display: React.CSSProperties["display"]` — Display
140
+ - `position: React.CSSProperties["position"]` — Position
141
+ - **Container** — Layout wrapper
142
+ - `size: "xs" | "sm" | "md" | "lg" | "xl" | number | string` = "lg" — Container max-width
143
+ - `fluid: boolean` = false — Whether the container should be fluid (100% width)
144
+ - `asChild: boolean` = false — If true, the box will be rendered as its child, merging its props onto that child.
145
+ - `p: number | WimSpacing` — Padding
146
+ - `pt: number | WimSpacing` — Padding top
147
+ - `pr: number | WimSpacing` — Padding right
148
+ - `pb: number | WimSpacing` — Padding bottom
149
+ - `pl: number | WimSpacing` — Padding left
150
+ - `px: number | WimSpacing` — Padding horizontal
151
+ - `py: number | WimSpacing` — Padding vertical
152
+ - `m: number | WimSpacing` — Margin
153
+ - `mt: number | WimSpacing` — Margin top
154
+ - `mr: number | WimSpacing` — Margin right
155
+ - `mb: number | WimSpacing` — Margin bottom
156
+ - `ml: number | WimSpacing` — Margin left
157
+ - `mx: number | WimSpacing` — Margin horizontal
158
+ - `my: number | WimSpacing` — Margin vertical
159
+ - `bg: T | (string & {})` — Background color
160
+ - `color: T | (string & {})` — Text color
161
+ - `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
162
+ - `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
163
+ - `radius: number | WimRadius` — Border radius
164
+ - `shadow: T | (string & {})` — Box shadow
165
+ - `display: React.CSSProperties["display"]` — Display
166
+ - `position: React.CSSProperties["position"]` — Position
167
+ - **Dashboard** — Arranges widgets in a configurable grid with an edit mode for adding, removing, and resizing them.
168
+ - `widgets: DashboardWidget[]` — Widget definitions to render.
169
+ - `editable: boolean` — Whether the dashboard is in edit mode (controlled).
170
+ - `defaultEditable: boolean` = false — Initial edit mode state (uncontrolled). Default: false.
171
+ - `onEditChange: (editable: boolean) => void` — Called when edit mode changes.
172
+ - `onRemove: (widgetId: string) => void` — Called when a widget is removed.
173
+ - `onAdd: () => void` — Called when the "Add Widget" button is clicked.
174
+ - `columns: number` = 3 — Number of columns. Default: 3.
175
+ - `gap: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Gap between widgets. Default: "md".
176
+ - `showEditToggle: boolean` = true — Show the edit toggle button in the header. Default: true.
177
+ - `label: string` — Dashboard heading label.
178
+ - **Divider** — Content separator
179
+ - `orientation: "horizontal" | "vertical"` = "horizontal" — Orientation of the divider
180
+ - `thickness: number` = 1 — Thickness of the line (px)
181
+ - **Flex** — Flexible layout
182
+ - `asChild: boolean` = false — If true, the flex will be rendered as its child, merging its props onto that child.
183
+ - `direction: "row" | "row-reverse" | "column" | "column-reverse"` = "row" — Flex direction
184
+ - `align: "start" | "center" | "end" | "stretch" | "baseline"` — Align-items
185
+ - `justify: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch"` — Justify-content
186
+ - `wrap: "nowrap" | "wrap" | "wrap-reverse"` — Flex-wrap
187
+ - `gap: number | WimSpacing` — Gap between children
188
+ - `inline: boolean` = false — Display inline-flex
189
+ - **Footer** — Lower navigation
190
+ - `bordered: boolean` — Border at the top
191
+ - `fluid: boolean` — Expand content to full width (disable the centered max-width container)
192
+ - `background: "primary" | "secondary" | "dark"` = "primary" — Background color
193
+ - **Grid** — Flexbox or CSS Grid system
194
+ - `asChild: boolean` = false — If true, the grid will be rendered as its child, merging its props onto that child.
195
+ The container-query wrapper div is preserved to maintain responsive column behaviour.
196
+ - `cols: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Number of columns (or a responsive object per breakpoint)
197
+ - `rows: number | string` — Number of rows or an explicit grid-template-rows value
198
+ - `gap: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Gap between cells (or a responsive object per breakpoint)
199
+ - `columnGap: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Gap between columns (or a responsive object per breakpoint)
200
+ - `rowGap: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Gap between rows (or a responsive object per breakpoint)
201
+ - `align: "start" | "center" | "end" | "stretch"` — Alignment of items along the block (vertical) axis
202
+ - `justify: "start" | "center" | "end" | "between" | "around" | "stretch"` — Justification of items along the inline (horizontal) axis
203
+ - `flow: "row" | "column" | "dense" | "row dense" | "column dense"` — Grid auto-flow direction
204
+ - `inline: boolean` = false — Whether to render as an inline grid
205
+ - **Group** — Flexible grouping
206
+ - `asChild: boolean` — If true, the group will be rendered as its child, merging its props onto that child.
207
+ - `align: "start" | "center" | "end" | "stretch" | "baseline"` = "center" — Vertical alignment
208
+ - `justify: "start" | "center" | "end" | "between" | "around" | "evenly"` = "start" — Horizontal alignment
209
+ - `gap: number | string` = 16 — Gap between elements
210
+ - `wrap: "nowrap" | "wrap" | "wrap-reverse"` = "wrap" — Whether to wrap children
211
+ - `grow: boolean` = false — Whether items should grow to fill available space
212
+ - **Header** — Upper navigation
213
+ - `fixed: boolean` — Fixed position at the top
214
+ - `sticky: boolean` — Sticky position at the top
215
+ - `bordered: boolean` — Border at the bottom
216
+ - `glass: boolean` — Glassmorphism effect
217
+ - `fluid: boolean` — Expand content to full width (disable the centered max-width container)
218
+ - `background: "primary" | "secondary" | "transparent"` = "primary" — Background color
219
+ - **InteractiveArea** — Interactive empty/drop zone area
220
+ - `title: ReactNode` — Area title
221
+ - `description: ReactNode` — Area description
222
+ - `icon: ReactNode` — Icon to display
223
+ - `actions: ReactNode` — Action elements (buttons, etc.)
224
+ - `variant: "dashed" | "solid" | "none"` = "dashed" — Border variant
225
+ - `bgVariant: "default" | "transparent" | "muted"` = "default" — Background variant
226
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size variation
227
+ - `isDragging: boolean` = false — Whether the area is currently in a dragging state (for dropzone)
228
+ - `isClickable: boolean` = false — Whether the area is clickable
229
+ - `disabled: boolean` = false — Whether the area is disabled
230
+ - `styles: { inner?: string; icon?: string; title?: string; description?: string; content?: string; actions?: string; }` — Custom styles for internal parts
231
+ - **Masonry** — Waterfall grid
232
+ - `columns: number` = 3 — Number of columns
233
+ - `spacing: number | string` = 16 — Spacing between items
234
+ - **Navbar** — Primary navigation
235
+ - `fixed: boolean` — Whether the navbar is fixed to the viewport
236
+ - `sticky: boolean` — Whether the navbar sticks to the top while scrolling
237
+ - `transparent: boolean` — Whether the navbar background is transparent
238
+ - `glass: boolean` — Whether to apply the frosted-glass effect
239
+ - `bordered: boolean` — Whether to show a bottom border
240
+ - `defaultMenuOpen: boolean` = false — Initial open state of the mobile menu (uncontrolled)
241
+ - `isMenuOpen: boolean` — Open state of the mobile menu (controlled)
242
+ - `onMenuOpenChange: (isOpen: boolean) => void` — Callback when the mobile menu open state changes
243
+ - **ScrollArea** — A custom scrollbar component that provides high-performance, cross-browser consistent themes while maintaining a native-like feel.
244
+ - `text: React.ReactNode` — Content to display (alternative to children)
245
+ - `children: React.ReactNode` — Content to display
246
+ - `scrollAxis: "x" | "y" | "both"` = "y" — Axis along which scrolling is allowed
247
+ - `maxHeight: string` — Maximum height before scrolling (a CSS value, so units other than px are supported)
248
+ - **Sidebar** — A collapsible navigation or informational panel on the side of the screen
249
+ - `fixed: boolean` — Fixed position
250
+ - `collapsed: boolean` — Collapsed state
251
+ - `width: number | string` = 260 — Width when expanded
252
+ - `bordered: boolean` = true — Border at the right
253
+ - `responsive: boolean` = true — Enable responsive behavior (mobile drawer)
254
+ - `mobileOpen: boolean` — Mobile drawer open state
255
+ - `onOverlayClick: () => void` — Callback when overlay is clicked
256
+ - **SimpleGrid** — Responsive fixed grid
257
+ - `cols: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` = 1 — Number of columns (or a responsive object per breakpoint)
258
+ - `spacing: number | string` = 16 — Spacing between cells
259
+ - `verticalSpacing: number | string` — Vertical spacing between rows (defaults to `spacing`)
260
+ - `minChildWidth: number | string` — Minimum width of each child; columns wrap automatically to fit
261
+ - **Splitter** — Split and resize panels
262
+ - `orientation: "horizontal" | "vertical"` = "horizontal" — The orientation of the splitter.
263
+ - `children: React.ReactNode` (required) — The components to render within the splitter. Usually a combination of `Splitter.Panel` and `Splitter.Handle`.
264
+ - **Stack** — Vertical/Horizontal alignment
265
+ - `asChild: boolean` = false — Whether to render as a child element.
266
+ - `gap: number | string` = "md" — Gap between children. Can be a number (px) or a spacing token (e.g., 'sm', 'md', 'lg').
267
+ - `direction: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` = "column" — Stack direction
268
+ - `align: "start" | "center" | "end" | "stretch" | "baseline" | ReactCSSProperties["alignItems"]` — Align-items
269
+ - `justify: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | ReactCSSProperties["justifyContent"]` — Justify-content
270
+ - `wrap: boolean | React.CSSProperties["flexWrap"]` — Whether children should wrap
271
+ - `p: number | WimSpacing` — Padding
272
+ - `pt: number | WimSpacing` — Padding top
273
+ - `pr: number | WimSpacing` — Padding right
274
+ - `pb: number | WimSpacing` — Padding bottom
275
+ - `pl: number | WimSpacing` — Padding left
276
+ - `px: number | WimSpacing` — Padding horizontal
277
+ - `py: number | WimSpacing` — Padding vertical
278
+ - `m: number | WimSpacing` — Margin
279
+ - `mt: number | WimSpacing` — Margin top
280
+ - `mr: number | WimSpacing` — Margin right
281
+ - `mb: number | WimSpacing` — Margin bottom
282
+ - `ml: number | WimSpacing` — Margin left
283
+ - `mx: number | WimSpacing` — Margin horizontal
284
+ - `my: number | WimSpacing` — Margin vertical
285
+ - `bg: T | (string & {})` — Background color
286
+ - `color: T | (string & {})` — Text color
287
+ - `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
288
+ - `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
289
+ - `radius: number | WimRadius` — Border radius
290
+ - `shadow: T | (string & {})` — Box shadow
291
+ - `display: React.CSSProperties["display"]` — Display
292
+ - `position: React.CSSProperties["position"]` — Position
293
+ - **Toolbar** — Action strip for IconButton, ToggleGroup, and related controls with toolbar keyboard navigation.
294
+ - `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
295
+ - `size: ComponentSizeBasic` = "md" — Visual density for padding and gap. Cascades to `--wim-toolbar-*` CSS variables.
296
+ @default "md"
297
+ - `orientation: "horizontal" | "vertical"` = "horizontal" — Layout axis of the toolbar.
298
+ @default "horizontal"
299
+ - **Transition** — Utilities for managing smooth enter and leave animations with CSS classes
300
+ - `show: boolean` (required) — Whether the content is shown (drives the enter/leave transitions)
301
+ - `children: React.ReactNode` (required) — Content to transition
302
+ - `preset: "fade" | "scale" | "slide-right" | "slide-left" | "slide-top" | "slide-bottom"` — Preset transition (fade, scale, slide-*)
303
+ - `enter: string` = "" — Class applied during the enter transition
304
+ - `enterFrom: string` = "" — Class applied at the start of the enter transition
305
+ - `enterTo: string` = "" — Class applied at the end of the enter transition
306
+ - `leave: string` = "" — Class applied during the leave transition
307
+ - `leaveFrom: string` = "" — Class applied at the start of the leave transition
308
+ - `leaveTo: string` = "" — Class applied at the end of the leave transition
309
+ - `unmount: boolean` = true — Whether to unmount the content when hidden
310
+ - `appear: boolean` = false — Whether to run the enter transition on initial mount
311
+ - `className: string` — Additional class names
312
+ - **VisuallyHidden** — Hide content visually while keeping it accessible to screen readers
313
+ - `children: React.ReactNode` (required) — Content that is visually hidden but still read out by screen readers.
314
+ - **Watermark** — Translucent text or images overlaid on content to indicate ownership or status
315
+ - `content: string | string[]` — Text content of the watermark (a string or multiple lines)
316
+ - `image: string` — Image URL used as the watermark instead of text
317
+ - `width: number` — Width of a single watermark tile (px)
318
+ - `height: number` — Height of a single watermark tile (px)
319
+ - `rotate: number` — Rotation angle of the watermark (degrees)
320
+ - `zIndex: number` — z-index of the watermark layer
321
+ - `opacity: number` — Opacity of the watermark
322
+ - `gap: [number, number]` — Gap between watermark tiles [x, y] (px)
323
+ - `offset: [number, number]` — Offset of the watermark pattern [x, y] (px)
324
+ - `children: React.ReactNode` — Content overlaid by the watermark
325
+ - `className: string` — Additional class names
326
+
327
+ ### form — `import { … } from "wimui/form"`
328
+
329
+ - **Button** — Action triggers
330
+ - `asChild: boolean` = false — If true, the button will be rendered as its child, merging its props onto that child.
331
+ Useful for using the button styles with Link components (e.g. from React Router or Next.js).
332
+ - `backgroundColor: T | (string & {})` — Overrides the button background color with a design token. Usually the `variant` prop is enough; use this prop only as a last resort.
333
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
334
+ - `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
335
+ - `intent: ButtonIntent` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
336
+ - `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element
337
+ - `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label
338
+ - `loading: boolean` = false — Whether to show a loading indicator and disable interaction
339
+ - `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
340
+ - `animateWidth: boolean` = false — Whether to animate the width change when label changes
341
+ - `fullWidth: boolean` = false — Whether the button should take up the full width of its container
342
+ - `styles: { root?: string; loader?: string; icon?: string; }` — Custom styles for internal parts
343
+ - `className: string` — Additional class names
344
+ - **ButtonGroup** — Group of buttons
345
+ - `children: React.ReactNode` (required) — Buttons to group
346
+ - `gap: string` = "8px" — Gap between buttons (ignored when joined)
347
+ - `className: string` — Additional class names
348
+ - `joined: boolean` = false — Whether to join the buttons into a single connected unit
349
+ - `variant: "solid" | "outline" | "ghost"` — Variant applied to all child buttons
350
+ - `asChild: boolean` = false — Whether to render as a child element.
351
+ - **Cascader** — Hierarchical selection
352
+ - `options: CascaderOption[]` = [] — Hierarchical options to select from
353
+ - `value: string[]` — Selected value path (controlled)
354
+ - `onChange: (value: string[], selectedOptions: CascaderOption[]) => void` — Callback when the selection changes
355
+ - `placeholder: React.ReactNode` — Placeholder shown when nothing is selected
356
+ - `label: React.ReactNode` — Field label
357
+ - `error: string` — Error message
358
+ - `required: boolean` — Whether to show the required indicator
359
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
360
+ - `className: string` — Additional class names
361
+ - `disabled: boolean` = false — Whether the field is disabled
362
+ - `defaultValue: string[]` — Initially selected value path (uncontrolled)
363
+ - `id: string` — Unique ID for the component
364
+ - `expandTrigger: "click" | "hover"` = "click" — Expand trigger mode
365
+ - `separator: string` = " / " — Custom separator for the display value
366
+ - `allowClear: boolean` = false — Whether to show a clear button when a value is selected
367
+ - `aria-label: string` — Accessible label for the trigger when no visible label is provided
368
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
369
+ - `fullWidth: boolean` = false — Whether to take full width of parent
370
+ - **Checkbox** — Multiple choice
371
+ - `asChild: boolean` = false — Whether to render as a child element.
372
+ - `children: React.ReactNode` — Label content rendered next to the checkbox
373
+ - `indeterminate: boolean` = false — Whether to show the indeterminate (mixed) state
374
+ - `error: boolean` = false — Whether to display as an error state (aria-invalid is applied)
375
+ - **CheckboxGroup** — Shared state checkboxes
376
+ - `options: Option[]` (required) — List of checkbox options
377
+ - `value: string[]` — Selected values (controlled)
378
+ - `defaultValue: string[]` = [] — Initially selected values (uncontrolled)
379
+ - `onChange: (value: string[]) => void` — Callback when the selected values change
380
+ - `direction: "vertical" | "horizontal"` = "vertical" — Layout direction of the checkboxes
381
+ - `name: string` — Name attribute shared by the checkbox inputs
382
+ - `asChild: boolean` = false — Whether to render as a child element.
383
+ - `label: string` — Group label
384
+ - `error: string` — Error message
385
+ - `required: boolean` — Whether to show the required indicator
386
+ - `disabled: boolean` — Whether the whole group is disabled
387
+ - **ColorInput** — Input with color preview
388
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
389
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
390
+ - `fullWidth: boolean` = false — Whether to take full width of parent
391
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
392
+ - `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
393
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
394
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
395
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
396
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
397
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
398
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
399
+ - `rightIconClassName: string` — Additional class name for the right icon
400
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
401
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
402
+ - `label: React.ReactNode` — Field label
403
+ - `error: string` — Error message
404
+ - `required: boolean` — Whether to show the required indicator
405
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
406
+ - `inputClassName: string` — Additional class name for the inner input element
407
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
408
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
409
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
410
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
411
+ - `asChild: boolean` = false — Whether to render as a child element.
412
+ - **ColorPicker** — Color selection picker
413
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
414
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
415
+ - `fullWidth: boolean` = false — Whether to take full width of parent
416
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
417
+ - `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
418
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
419
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
420
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
421
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
422
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
423
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
424
+ - `rightIconClassName: string` — Additional class name for the right icon
425
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
426
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
427
+ - `label: React.ReactNode` — Field label
428
+ - `error: string` — Error message
429
+ - `required: boolean` — Whether to show the required indicator
430
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
431
+ - `inputClassName: string` — Additional class name for the inner input element
432
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
433
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
434
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
435
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
436
+ - `asChild: boolean` = false — Whether to render as a child element.
437
+ - **Combobox** — Select with search
438
+ - `options: ComboboxOption[]` = [] — List of suggestion options
439
+ - `onChange: (option: ComboboxOption) => void` — Callback when an option is selected
440
+ - `placeholder: string` — Placeholder for the input
441
+ - `label: React.ReactNode` — Field label
442
+ - `error: string` — Error message
443
+ - `required: boolean` — Whether to show the required indicator
444
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
445
+ - `showSearchIcon: boolean` = true — Whether to show the search icon
446
+ - `allowClear: boolean` = true — Whether to show a clear button when value is present
447
+ - `defaultValue: string` = "" — Initial input value (uncontrolled)
448
+ - `className: string` — Additional class names
449
+ - `disabled: boolean` = false — Whether the field is disabled
450
+ - `fullWidth: boolean` = false — Whether to take full width of parent
451
+ - `id: string` — Unique ID for the component
452
+ - `labels: { noResults?: React.ReactNode; }` = {} — Labels for internationalization
453
+ - **CopyButton** — Copy to clipboard
454
+ - `value: string` (required) — Text copied to the clipboard
455
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
456
+ - `className: string` — Additional class names
457
+ - `aria-label: string` — Accessible label for the button
458
+ - `copyLabel: string` — Tooltip label before copying
459
+ - `copiedLabel: string` — Tooltip label after copying
460
+ - `asChild: boolean` = false — Whether to render as a child element.
461
+ - `children: React.ReactNode` — Trigger content when `asChild` is true
462
+ - **CounterTextarea** — Textarea with character count display
463
+ - `asChild: boolean` — If true, the textarea element will be rendered as its child, merging its props onto that child.
464
+ - `intent: FieldIntent` — Semantic intent of the field (e.g. error state)
465
+ - `variant: "outline" | "ghost"` — Visual style variant of the field
466
+ - `fullWidth: boolean` = false — Whether to take full width of parent
467
+ - `fieldSizing: "fixed" | "content"` — Sizing behavior: "fixed" keeps the height, "content" grows with the text
468
+ - `label: string` — Field label
469
+ - `error: string` — Error message
470
+ - `required: boolean` — Whether to show the required indicator
471
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
472
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
473
+ - `showCount: boolean` = true — Whether to show the character count.
474
+ @default true
475
+ - `counterPosition: "bottom" | "overlay"` = "bottom" — Position of the counter.
476
+ "bottom" (default) shows it below the textarea.
477
+ "overlay" shows it inside the textarea (bottom-right).
478
+ @default "bottom"
479
+ - **CreditCardInput** — Payment card input with brand detection
480
+ - `onBrandChange: (brand: CreditCardBrand) => void` — Callback when the card brand is detected.
481
+ - `asChild: boolean` = false — Whether to render as a child component.
482
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
483
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
484
+ - `fullWidth: boolean` = false — Whether to take full width of parent
485
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
486
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
487
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
488
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
489
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
490
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
491
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
492
+ - `rightIconClassName: string` — Additional class name for the right icon
493
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
494
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
495
+ - `label: React.ReactNode` — Field label
496
+ - `error: string` — Error message
497
+ - `required: boolean` — Whether to show the required indicator
498
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
499
+ - `inputClassName: string` — Additional class name for the inner input element
500
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
501
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
502
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
503
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
504
+ - **DatePicker** — Date selection
505
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
506
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
507
+ - `fullWidth: boolean` = false — Whether to take full width of parent
508
+ - `value: Date | null` — Selected date value (`null` = cleared; omit/`undefined` = uncontrolled)
509
+ - `defaultValue: Date | null` — Default date value (uncontrolled)
510
+ - `onChange: (date: Date | null) => void` — Callback when date changes (`null` when cleared)
511
+ - `format: string` = "YYYY-MM-DD" — Date format for display (default: 'YYYY-MM-DD')
512
+ - `clearable: boolean` = true — Show clear button
513
+ - `placeholder: string` — Placeholder text
514
+ - `minDate: Date` — Minimum selectable date
515
+ - `maxDate: Date` — Maximum selectable date
516
+ - `disabledDates: Date[]` — Disabled dates
517
+ - `label: string` — Field label
518
+ - `error: string` — Error message
519
+ - `required: boolean` — Whether to show the required indicator
520
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
521
+ - `labels: { placeholder?: string; }` — Labels for manual translation
522
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
523
+ - `asChild: boolean` = false — Whether to render as a child element.
524
+ - **DateRangePicker** — Date range selection
525
+ - `startProps: React.ComponentProps<typeof DatePicker>` — Props passed to the start-date DatePicker
526
+ - `endProps: React.ComponentProps<typeof DatePicker>` — Props passed to the end-date DatePicker
527
+ - `className: string` — Additional class names
528
+ - `label: string` — Field label
529
+ - `error: string` — Error message
530
+ - `required: boolean` — Whether to show the required indicator
531
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
532
+ - **Dropzone** — Drag & drop files
533
+ - `label: React.ReactNode` — Field label.
534
+ - `description: React.ReactNode` — Description text shown in the drag-and-drop area.
535
+ - `accept: string` — Accepted file types (e.g. ".jpg,.png").
536
+ - `multiple: boolean` = false — Whether multiple files can be selected.
537
+ - `disabled: boolean` = false — Whether the component is disabled.
538
+ - `onChange: (files: FileList | null) => void` — Callback when files are selected.
539
+ - `className: string` — Additional class names.
540
+ - `iconName: React.ComponentProps<typeof Icon>["name"]` = "UploadIcon" — Icon name shown in the drop area.
541
+ - `error: string` — Error message
542
+ - `required: boolean` — Whether to show the required indicator
543
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
544
+ - `size: InteractiveAreaProps["size"]` = "md" — Size of the drop area
545
+ - **FieldError** — Validation messages
546
+ - `content: string` (required) — Error message text
547
+ - `className: string` — Additional class names
548
+ - `id: string` — ID of the error message element
549
+ - **Fieldset** — Form grouping
550
+ - `children: React.ReactNode` (required) — Form elements to group
551
+ - `disabled: boolean` = false — Whether all contained form elements are disabled
552
+ - `variant: "default" | "full-width"` = "default" — Visual variant of the fieldset
553
+ - `className: string` — Additional class names
554
+ - **FieldTemplate** — Standardizes label placement, required markings, and error message display for all form-related components.
555
+ - `asChild: boolean` = false — Whether to render as a child element.
556
+ - `label: React.ReactNode` — Label text of the field
557
+ - `error: string` — Error message
558
+ - `children: React.ReactNode` (required) — Main content of the field
559
+ - `required: boolean` — Whether to show the required indicator
560
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
561
+ @default "vertical"
562
+ - `labelId: string` — ID of the label element for accessibility
563
+ - `htmlFor: string` — ID of the element the label points to
564
+ - `errorId: string` — ID of the error message element
565
+ - `styles: { root?: string; labelWrapper?: string; label?: string; content?: string; error?: string; }` — Custom styles for internal parts
566
+ - **FileUpload** — File selection
567
+ - `label: React.ReactNode` — Field label
568
+ - `buttonLabel: React.ReactNode` — Label of the file selection button
569
+ - `noFileLabel: React.ReactNode` — Text shown when no file is selected
570
+ - `accept: string` — Accepted file types (e.g. ".jpg,.png")
571
+ - `multiple: boolean` = false — Whether multiple files can be selected
572
+ - `disabled: boolean` = false — Whether the component is disabled
573
+ - `onChange: (files: FileList | null) => void` — Callback when files are selected
574
+ - `className: string` — Additional class names
575
+ - `iconName: React.ComponentProps<typeof Icon>["name"]` — Icon name shown on the button
576
+ - `iconPosition: "left" | "right"` — Position of the icon relative to the button label
577
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
578
+ - `error: string` — Error message
579
+ - `required: boolean` — Whether to show the required indicator
580
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
581
+ - **FloatButton** — Floating action buttons
582
+ - `asChild: boolean` = false — If true, the button will be rendered as its child, merging its props onto that child.
583
+ - `iconName: "CircleIcon" | "SquareIcon" | "LoadingIcon" | "ExternalLinkIcon" | "ArrowUpIcon" | string` = "CircleIcon" — Icon name from the library
584
+ - `variant: "default" | "primary" | "glass"` — Variant of the button
585
+ - `intent: ButtonIntent` = "default" — Intent of the button (semantic meaning)
586
+ - `shape: "circle" | "square"` = "circle" — Shape of the button
587
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
588
+ - `label: React.ReactNode` — Label text for extended FAB
589
+ - `shrink: boolean` = false — Whether to shrink the extended FAB (hide label)
590
+ - `position: "bottom-right" | "bottom-left" | "bottom-center" | "top-right" | "top-left" | "static"` = "bottom-right" — Position of the button
591
+ - `description: React.ReactNode` — Description for tooltip
592
+ - `badge: number | boolean` — Badge content (number or dot)
593
+ - `backTop: boolean` = false — If true, the button will scroll to the top of the page when clicked
594
+ - `visibilityHeight: number` = 400 — Visibility threshold for backTop (in pixels)
595
+ - `className: string` — Additional class names
596
+ - `style: React.CSSProperties` — Style attribute
597
+ - `aria-label: string` — Aria label for accessibility
598
+ - **IconButton** — Icon-only button
599
+ - `iconName: React.ComponentProps<typeof Icon>["name"]` (required) — Icon name to display
600
+ - `aria-label: string` (required) — Accessible label for the icon-only button
601
+ - **ImageCropper** — Front-end image crop and rotate tool
602
+ - `src: string` — URL or data URL of the image to crop
603
+ - `aspectRatio: number` = 1 — Aspect ratio (width / height); 1 produces a square
604
+ - `circular: boolean` = false — Whether to display a circular crop area (for profile images)
605
+ - `onCrop: (dataUrl: string) => void` — Callback when the crop result is finalized
606
+ - `showRotation: boolean` = true — Whether to show the rotation button
607
+ - `showZoom: boolean` = true — Whether to show the zoom slider
608
+ - `showApplyButton: boolean` = true — Whether to show the apply button
609
+ - `applyLabel: string` — Label of the apply button
610
+ - `onApply: (dataUrl: string) => void` — Callback when the crop is applied (after confirming in the dialog)
611
+ - **InlineEdit** — A component that allows users to switch between a view-only mode and an editable mode in-place.
612
+ - `value: string` — Current text (controlled)
613
+ - `defaultValue: string` — Initial text (uncontrolled)
614
+ - `onChange: (value: string) => void` — Callback when the text changes while editing
615
+ - `onSave: (value: string) => void` — Callback when the edit is confirmed
616
+ - `onCancel: () => void` — Callback when the edit is cancelled
617
+ - `onEdit: () => void` — Callback when editing starts
618
+ - `placeholder: string` — Placeholder shown when the text is empty
619
+ - `disabled: boolean` = false — Whether editing is disabled
620
+ - `fullWidth: boolean` = false — Whether to take full width of parent
621
+ - `label: React.ReactNode` — Accessible label for the text and edit button
622
+ - **Input** — Single-line input fields for text, numbers, or emails
623
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
624
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
625
+ - `fullWidth: boolean` = false — Whether to take full width of parent
626
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
627
+ - `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
628
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
629
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
630
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
631
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
632
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
633
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
634
+ - `rightIconClassName: string` — Additional class name for the right icon
635
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
636
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
637
+ - `label: React.ReactNode` — Field label
638
+ - `error: string` — Error message
639
+ - `required: boolean` — Whether to show the required indicator
640
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
641
+ - `inputClassName: string` — Additional class name for the inner input element
642
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
643
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
644
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
645
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
646
+ - `asChild: boolean` = false — Whether to render as a child element.
647
+ - **InputBase** — Standardizes the visual container, icon slots (Prefix/Suffix), and clear button behavior for text-based inputs.
648
+ - `children: React.ReactNode` (required) — Inner form control element(s) wrapped by the shell
649
+ - `intent: FieldIntent | WimIntent` = "default" — Semantic intent of the field (e.g. error state)
650
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
651
+ - `fullWidth: boolean` = false — Whether to take full width of parent
652
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
653
+ - `className: string` — Additional class names
654
+ - `disabled: boolean` — Whether the field is disabled
655
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
656
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
657
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
658
+ - `leftIconAriaLabel: string` — Aria label for the left icon button
659
+ - `rightIcons: InputBaseIcon[]` = [] — Icons to display on the right side
660
+ - `allowClear: boolean` — Whether to show a clear button when value is present
661
+ - `hasValue: boolean` — Whether the field currently has a value (controls clear button visibility)
662
+ - `onClear: () => void` — Callback when the clear button is clicked
663
+ - `clearAriaLabel: string` — Aria label for the clear button
664
+ - `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
665
+ - **InputGroup** — Inputs with icons/labels
666
+ - `children: React.ReactNode` (required) — Inputs, buttons, and add-ons to combine into one unit
667
+ - `fullWidth: boolean` = false — Whether to take full width of parent
668
+ - `className: string` — Additional class names
669
+ - **InputMask** — Formatted inputs
670
+ - `mask: string` (required) — Mask pattern ('9': digit, 'a': letter, '*': alphanumeric; other characters are shown as-is)
671
+ - `maskChar: string` = "_" — Placeholder character for unfilled mask positions
672
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
673
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
674
+ - `fullWidth: boolean` = false — Whether to take full width of parent
675
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
676
+ - `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
677
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
678
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
679
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
680
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
681
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
682
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
683
+ - `rightIconClassName: string` — Additional class name for the right icon
684
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
685
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
686
+ - `label: React.ReactNode` — Field label
687
+ - `error: string` — Error message
688
+ - `required: boolean` — Whether to show the required indicator
689
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
690
+ - `inputClassName: string` — Additional class name for the inner input element
691
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
692
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
693
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
694
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
695
+ - `asChild: boolean` = false — Whether to render as a child element.
696
+ - **LinkButton** — Anchor styled as button
697
+ - `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label
698
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
699
+ - `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
700
+ - `intent: ButtonIntent` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
701
+ - `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
702
+ - `fullWidth: boolean` = false — Whether the button should take up the full width of its container
703
+ - **Mentions** — @ / # suggestions
704
+ - `options: MentionOption[]` (required) — Mention candidates to suggest
705
+ - `trigger: string` = "@" — Character that triggers the suggestion list
706
+ - `onSelect: (option: MentionOption) => void` — Callback when a suggestion is selected
707
+ - `asChild: boolean` = false — Whether to render as a child element.
708
+ - **MultiSelect** — Multiple selection
709
+ - `options: MultiSelectOption[]` = [] — List of options
710
+ - `value: string[]` — Selected values (controlled)
711
+ - `onChange: (value: string[]) => void` — Callback when the selection changes
712
+ - `placeholder: string` — Placeholder shown when nothing is selected
713
+ - `label: string` — Field label
714
+ - `error: string` — Error message
715
+ - `required: boolean` — Whether to show the required indicator
716
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
717
+ - `className: string` — Additional class names
718
+ - `disabled: boolean` = false — Whether the field is disabled
719
+ - `defaultValue: string[]` = [] — Initially selected values (uncontrolled)
720
+ - `allowClear: boolean` = false — Whether to show a clear button to remove all selections
721
+ - `id: string` — Unique ID for the component
722
+ - `aria-label: string` — Accessible label for the trigger when no visible label is provided
723
+ - `aria-labelledby: string` — ID of the element that labels the field
724
+ - `aria-describedby: string` — ID of the element that describes the field
725
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
726
+ - `fullWidth: boolean` = false — Whether to take full width of parent
727
+ - **NumberInput** — Input with step adjustments
728
+ - `mode: "number" | "text"` = "number" — 'number': uses the native type="number" (e.g. quantity steppers)
729
+ 'text': uses type="text" + inputmode (e.g. card numbers or IDs where leading zeros must be kept)
730
+ - `hideSpinButton: boolean` = true — Whether to hide the spin buttons
731
+ - `allowDecimal: boolean` = false — Whether to allow decimal points (effective only when mode="number")
732
+ - `allowNegative: boolean` = false — Whether to allow negative numbers (effective only when mode="number")
733
+ - `asChild: boolean` = false — Whether to render as a child element.
734
+ - **OtpInput** — One-time password fields
735
+ - `length: number` = 6 — Number of digits
736
+ - `value: string` = "" — Current value (controlled)
737
+ - `onChange: (value: string) => void` — Callback when the value changes
738
+ - `disabled: boolean` = false — Whether the input is disabled
739
+ - `error: string` — Error message
740
+ - `required: boolean` — Whether to show the required indicator
741
+ - `label: React.ReactNode` — Field label
742
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
743
+ - `labels: { digitAriaLabel?: (index: number) => string; }` = {} — Labels for internationalization
744
+ - `asChild: boolean` = false — Whether to render as a child element.
745
+ - `fullWidth: boolean` = false — Whether to take full width of parent
746
+ - **PasswordInput** — Password with toggle
747
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
748
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
749
+ - `fullWidth: boolean` = false — Whether to take full width of parent
750
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
751
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
752
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
753
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
754
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
755
+ - `rightIconClassName: string` — Additional class name for the right icon
756
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
757
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
758
+ - `label: React.ReactNode` — Field label
759
+ - `error: string` — Error message
760
+ - `required: boolean` — Whether to show the required indicator
761
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
762
+ - `inputClassName: string` — Additional class name for the inner input element
763
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
764
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
765
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
766
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
767
+ - `asChild: boolean` = false — Whether to render as a child element.
768
+ - **PasswordStrength** — Visual meter to indicate password security level
769
+ - `password: string` = "" — Password string to evaluate
770
+ - `score: 0 | 1 | 2 | 3 | 4` — Strength score (the default calculation is used when omitted)
771
+ 0: very weak, 1: weak, 2: fair, 3: strong, 4: very strong
772
+ - `showLabel: boolean` = true — Whether to show the strength label
773
+ - `calculateLevel: (password: string) => PasswordStrengthLevel` = (password: string): PasswordStrengthLevel => {
774
+ if (!password) return 0;
775
+ let score = 0;
776
+ if (password.length >= 8) score++;
777
+ if (/[A-Z]/.test(password)) score++;
778
+ if (/[0-9]/.test(password)) score++;
779
+ if (/[^A-Za-z0-9]/.test(password)) score++;
780
+ return score as PasswordStrengthLevel;
781
+ } — Custom strength calculation function
782
+ - **PhoneInput** — International phone number input
783
+ - `value: string` = "" — Phone number value (the number part, excluding the country dial code).
784
+ - `onChange: (value: string) => void` — Callback when the phone number changes.
785
+ - `countryCode: string` = "US" — Selected country code (e.g. "JP", "US").
786
+ - `onCountryChange: (countryCode: string) => void` — Callback when the country code changes.
787
+ - `placeholder: string` = "000-0000-0000" — Placeholder for the phone number input.
788
+ - `disabled: boolean` = false — Whether the field is disabled.
789
+ - `error: string` — Error message.
790
+ - `required: boolean` = false — Whether to show the required indicator.
791
+ - `label: string` — Field label.
792
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field.
793
+ - `className: string` — Additional class names.
794
+ - `fullWidth: boolean` = false — Whether to take full width of parent.
795
+ - **QueryBuilder** — Visual builder for constructing complex search queries.
796
+ - `fields: QueryField[]` (required) — Field definitions
797
+ - `query: QueryGroup` — Current query state (controlled)
798
+ - `defaultQuery: QueryGroup` — Default query state (uncontrolled)
799
+ - `onChange: (query: QueryGroup) => void` — Callback when query changes
800
+ - `maxDepth: number` = 3 — Maximum nesting depth
801
+ - `className: string` — Additional class name
802
+ - `id: string` — Unique ID for the component
803
+ - `labels: QueryBuilderLabels` = {} — Labels for internationalization
804
+ - **Radio** — Single choice
805
+ - `asChild: boolean` = false — Whether to render as a child element.
806
+ - `children: React.ReactNode` — Label content rendered next to the radio
807
+ - `error: boolean` = false — Whether to display as an error state (aria-invalid is not supported on the radio role, so it is applied on the RadioGroup side)
808
+ - **RadioGroup** — Shared state radio buttons
809
+ - `options: Option[]` (required) — List of radio options
810
+ - `value: string` — Selected value (controlled)
811
+ - `defaultValue: string` — Initially selected value (uncontrolled)
812
+ - `onChange: (value: string) => void` — Callback when the selected value changes
813
+ - `direction: "vertical" | "horizontal"` = "vertical" — Layout direction of the radio buttons
814
+ - `name: string` — Name attribute shared by the radio inputs
815
+ - `asChild: boolean` = false — Whether to render as a child element.
816
+ - `label: string` — Group label
817
+ - `error: string` — Error message
818
+ - `required: boolean` — Whether to show the required indicator
819
+ - `disabled: boolean` — Whether the whole group is disabled
820
+ - **RangeSlider** — Range selection
821
+ - `value: [number, number]` — Current value [min, max] (controlled)
822
+ - `defaultValue: [number, number]` = [20, 80] — Default value [min, max] (uncontrolled)
823
+ - `min: number` = 0 — Minimum value
824
+ - `max: number` = 100 — Maximum value
825
+ - `step: number` = 1 — Step value
826
+ - `allowCross: boolean` = false — Whether both handles may hold the same value (they never cross)
827
+ - `disabled: boolean` = false — Whether the slider is disabled
828
+ - `onChange: (value: [number, number]) => void` — Callback when the value changes
829
+ - `onAfterChange: (value: [number, number]) => void` — Callback when dragging ends
830
+ - `className: string` — Additional class names
831
+ - `name: string` — Name attribute
832
+ - `label: string` — Accessible label
833
+ - `error: string` — Error message
834
+ - `required: boolean` — Whether to show the required indicator
835
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
836
+ - `id: string` — Custom ID
837
+ - `aria-label: string` — Accessible label when no visible label is provided
838
+ - `aria-labelledby: string` — ID of the element that labels the slider
839
+ - `asChild: boolean` = false — Whether to render as a child element.
840
+ - **Rating** — Star rating
841
+ - `value: number` — Current value (controlled)
842
+ - `defaultValue: number` = 0 — Default value (uncontrolled)
843
+ - `count: number` = 5 — Total number of stars
844
+ - `allowHalf: boolean` = false — Whether to allow half stars
845
+ - `disabled: boolean` = false — Whether the rating is disabled
846
+ - `readOnly: boolean` = false — Read-only flag (display only; unlike disabled it is not grayed out)
847
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the stars
848
+ - `onChange: (value: number) => void` — Callback when the value changes
849
+ - `className: string` — Additional class names
850
+ - `label: React.ReactNode` — Accessible label
851
+ - `error: string` — Error message
852
+ - `required: boolean` — Whether to show the required indicator
853
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
854
+ - `labels: { star?: (count: number) => string; readonly?: (value: number, max: number) => string; }` = {} — Labels for internationalization
855
+ - `asChild: boolean` = false — Whether to render as a child element.
856
+ - **RichTextEditor** — WYSIWYG rich text editor
857
+ - `value: string` — HTML content (controlled)
858
+ - `defaultValue: string` = "" — Initial HTML content (uncontrolled)
859
+ - `onChange: (value: string) => void` — Callback when the content changes
860
+ - `placeholder: string` — Placeholder shown when the editor is empty
861
+ - `disabled: boolean` — Whether the editor is disabled
862
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
863
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
864
+ - `fullWidth: boolean` = false — Whether to take full width of parent
865
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
866
+ - `minHeight: number | string` = 200 — Minimum height of the editing area
867
+ - `label: React.ReactNode` — Field label
868
+ - `error: string` — Error message
869
+ - `required: boolean` — Whether to show the required indicator
870
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
871
+ - `className: string` — Additional class names
872
+ - `id: string` — Unique ID for the component
873
+ - `toolbar: RichTextEditorToolbarItem[]` = [
874
+ "bold",
875
+ "italic",
876
+ "underline",
877
+ "strikethrough",
878
+ "separator",
879
+ "h1",
880
+ "h2",
881
+ "h3",
882
+ "separator",
883
+ "ul",
884
+ "ol",
885
+ "separator",
886
+ "link",
887
+ "unlink",
888
+ "separator",
889
+ "removeFormat",
890
+ ] — Toolbar items to display, in order
891
+ - `labels: { bold?: string; italic?: string; underline?: string; strikethrough?: string; h1?: string; h2?: string; h3?: string; ul?: string; ol?: string; link?: string; unlink?: string; removeFormat?: string; toolbar?: string; linkPrompt?: string; linkApply?: string; linkCancel?: string; }` = {} — Labels for internationalization
892
+ - `aria-label: string` — Accessible label when no visible label is provided
893
+ - `aria-labelledby: string` — ID of the element that labels the editor
894
+ - **SearchInput** — Search with clear button
895
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
896
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
897
+ - `fullWidth: boolean` = false — Whether to take full width of parent
898
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
899
+ - `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
900
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
901
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
902
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
903
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
904
+ - `allowClear: boolean` = false — Whether to show a clear button when value is present
905
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
906
+ - `rightIconClassName: string` — Additional class name for the right icon
907
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
908
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
909
+ - `label: React.ReactNode` — Field label
910
+ - `error: string` — Error message
911
+ - `required: boolean` — Whether to show the required indicator
912
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
913
+ - `inputClassName: string` — Additional class name for the inner input element
914
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
915
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
916
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
917
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
918
+ - `asChild: boolean` = false — Whether to render as a child element.
919
+ - **SegmentedControl** — Button-style controls for switching between a small set of mutually exclusive options
920
+ - `options: Option[]` (required) — List of segment options
921
+ - `value: string` (required) — Selected value
922
+ - `onChange: (value: string) => void` (required) — Callback when the selected value changes
923
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the control
924
+ - `fullWidth: boolean` = false — Whether to take full width of parent
925
+ - `className: string` — Additional class names
926
+ - `label: string` — Accessible label
927
+ - `error: string` — Error message
928
+ - `required: boolean` — Whether to show the required indicator
929
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
930
+ - `disabled: boolean` = false — Whether the control is disabled
931
+ - `asChild: boolean` = false — If true, merge radiogroup props onto the child element.
932
+ - `children: React.ReactNode` — Optional children used when asChild is true
933
+ - `id: string` — Unique ID for the component
934
+ - `styles: { root?: string; item?: string; slider?: string; label?: string; }` — Custom styles for internal parts
935
+ - **Select** — A dropdown menu for selecting one option from a predefined list
936
+ - `options: SelectOption[] | SelectOptionGroup[]` = [] — List of options (flat or grouped)
937
+ - `value: string` — Selected value (controlled)
938
+ - `onChange: (value: string) => void` — Callback when the selected value changes
939
+ - `placeholder: React.ReactNode` — Placeholder shown when nothing is selected
940
+ - `label: string` — Field label
941
+ - `disabled: boolean` = false — Whether the field is disabled
942
+ - `defaultValue: string` — Initially selected value (uncontrolled)
943
+ - `searchable: boolean` = false — Enable search/filtering functionality
944
+ - `searchPlaceholder: string` — Placeholder text for search input
945
+ - `filterOption: (option: SelectOption, searchValue: string) => boolean` — Custom filter function
946
+ - `grouped: boolean` = false — Whether options are grouped
947
+ - `allowClear: boolean` = false — Whether to show a clear button when a value is selected
948
+ - `fullWidth: boolean` = false — Whether to take full width of parent
949
+ - `id: string` — Unique ID for the component
950
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
951
+ - `error: string` — Error message
952
+ - `required: boolean` — Whether to show the required indicator
953
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
954
+ - `noOptionsFoundLabel: string` — Label shown when no options match the search
955
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
956
+ - `asChild: boolean` = false — Whether to render as a child element.
957
+ - `styles: { root?: string; trigger?: string; value?: string; dropdown?: string; list?: string; option?: string; search?: string; searchInput?: string; groupLabel?: string; separator?: string; empty?: string; inputBase?: React.ComponentProps<typeof InputBase>["styles"]; }` — Custom styles for internal parts
958
+ - **SignaturePad** — Handwritten signature input
959
+ - `width: number` = 400 — Width of the canvas
960
+ - `height: number` = 200 — Height of the canvas
961
+ - `penColor: string` = "var(--wim-color-text-primary)" — Color of the pen
962
+ - `penWidth: number` = 2 — Width of the pen stroke
963
+ - `onChange: (dataUrl: string | null) => void` — Callback when signature changes or is cleared
964
+ - `clearLabel: React.ReactNode` — Custom label for the clear button
965
+ - `disabled: boolean` = false — Whether the component is disabled
966
+ - `className: string` — CSS class name
967
+ - `style: React.CSSProperties` — Inline styles
968
+ - `label: React.ReactNode` — Field label
969
+ - `error: string` — Error message
970
+ - `required: boolean` — Whether to show the required indicator
971
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
972
+ - `canvasAriaLabel: string` — Aria label for the canvas
973
+ - **Slider** — An input to capture a numeric value from a specified range by dragging a knob
974
+ - `value: number` — Current value (controlled)
975
+ - `defaultValue: number` = 0 — Default value (uncontrolled)
976
+ - `min: number` = 0 — Minimum value
977
+ - `max: number` = 100 — Maximum value
978
+ - `step: number` = 1 — Step value
979
+ - `disabled: boolean` = false — Whether the slider is disabled
980
+ - `onChange: (value: number) => void` — Callback when the value changes
981
+ - `onAfterChange: (value: number) => void` — Callback when dragging ends
982
+ - `name: string` — Name attribute
983
+ - `label: React.ReactNode` — Accessible label
984
+ - `error: string` — Error message
985
+ - `required: boolean` — Whether to show the required indicator
986
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
987
+ - `id: string` — Custom ID
988
+ - `asChild: boolean` = false — Whether to render as a child element.
989
+ - `styles: React.ComponentPropsWithoutRef<typeof FieldTemplate>["styles"]` — Custom styles for internal parts
990
+ - **SmartSearchInput** — Smart search input enabling both traditional search and AI prompting.
991
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
992
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
993
+ - `fullWidth: boolean` = false — Whether to take full width of parent
994
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
995
+ - `label: React.ReactNode` — Field label
996
+ - `error: string` — Error message
997
+ - `required: boolean` — Whether to show the required indicator
998
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
999
+ - `maxRows: number` = 8 — Maximum number of rows the input grows to before scrolling
1000
+ - `allowClear: boolean` = true — Whether to show a clear button when value is present
1001
+ - `onClear: () => void` — Callback when the clear button is clicked
1002
+ - `onSubmit: (value: string) => void` — Callback when the value is submitted with the Enter key
1003
+ - `onChange: (value: string) => void` — Callback when the value changes
1004
+ - `defaultValue: string` = "" — Initial value (uncontrolled)
1005
+ - `maxLength: number` — Maximum number of characters
1006
+ - **Switch** — A binary switch for instantly toggling settings between on and off states
1007
+ - `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
1008
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the switch
1009
+ - `className: string` — Additional class names
1010
+ - `children: React.ReactNode` — Label content rendered next to the switch
1011
+ - `error: boolean` = false — Whether to display as an error state (aria-invalid is applied)
1012
+ - **SwitchGroup** — Shared state switches
1013
+ - `options: Option[]` (required) — List of switch options
1014
+ - `value: string[]` — Selected values (controlled)
1015
+ - `defaultValue: string[]` = [] — Initially selected values (uncontrolled)
1016
+ - `onChange: (value: string[]) => void` — Callback when the selected values change
1017
+ - `direction: "vertical" | "horizontal"` = "vertical" — Layout direction of the switches
1018
+ - `name: string` — Name attribute shared by the switch inputs
1019
+ - `asChild: boolean` = false — Whether to render as a child element.
1020
+ - `label: string` — Group label
1021
+ - `error: string` — Error message
1022
+ - `required: boolean` — Whether to show the required indicator
1023
+ - `disabled: boolean` — Whether the whole group is disabled
1024
+ - **TagInput** — Field for entering free-form text as tags
1025
+ - `value: string[]` — List of tags (controlled)
1026
+ - `defaultValue: string[]` = [] — Initial list of tags (uncontrolled)
1027
+ - `onChange: (tags: string[]) => void` — Callback when the tags change
1028
+ - `placeholder: string` — Placeholder for the input
1029
+ - `disabled: boolean` = false — Whether the input is disabled
1030
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
1031
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
1032
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1033
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
1034
+ - `label: React.ReactNode` — Field label
1035
+ - `error: string` — Error message
1036
+ - `required: boolean` — Whether to show the required indicator
1037
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
1038
+ - `allowDelete: boolean` = true — Whether tags can be deleted
1039
+ - `maxTags: number` — Maximum number of tags that can be entered
1040
+ - **Textarea** — Multi-line input fields for longer text entries like descriptions or comments
1041
+ - `asChild: boolean` = false — If true, the textarea element will be rendered as its child, merging its props onto that child.
1042
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
1043
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
1044
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1045
+ - `fieldSizing: "fixed" | "content"` = "fixed" — Sizing behavior: "fixed" keeps the height, "content" grows with the text
1046
+ - `label: string` — Field label
1047
+ - `error: string` — Error message
1048
+ - `required: boolean` — Whether to show the required indicator
1049
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
1050
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
1051
+ - **ThemeToggle** — Light / dark / system theme switcher
1052
+ - `value: "light" | "dark" | "system"` — Selected mode (controlled)
1053
+ - `defaultValue: "light" | "dark" | "system"` = "system" — Initially selected mode (uncontrolled)
1054
+ - `onChange: (mode: ThemeMode) => void` — Callback when the mode changes
1055
+ - `modes: ThemeMode[]` = ["light", "dark"] — Modes to offer, in cycle order
1056
+ - `variant: "icon" | "segmented"` = "icon" — "icon" cycles modes on a single button; "segmented" shows one button per mode
1057
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the control
1058
+ - `storageKey: string | null` = "wim-theme" — localStorage key used to persist the choice; pass null to disable persistence
1059
+ - `applyToDocument: boolean` = true — Whether to apply the selected mode to the document root as `data-theme`
1060
+ - `labels: { /** Label for the light mode */ light?: string; /** Label for the dark mode */ dark?: string; /** Label for the system (auto) mode */ system?: string; /** Accessible label / group label for the control */ toggle?: string; }` — Labels for internationalization
1061
+ - `className: string` — Additional class names
1062
+ - `asChild: boolean` = false — Whether to render as a child element.
1063
+ - **TimePicker** — Time selection
1064
+ - `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
1065
+ - `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
1066
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1067
+ - `allowClear: boolean` = true — Whether to show a clear button when value is present
1068
+ - `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
1069
+ - `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
1070
+ - `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
1071
+ - `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
1072
+ - `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
1073
+ - `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
1074
+ - `rightIconClassName: string` — Additional class name for the right icon
1075
+ - `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
1076
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
1077
+ - `label: React.ReactNode` — Field label
1078
+ - `error: string` — Error message
1079
+ - `required: boolean` — Whether to show the required indicator
1080
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
1081
+ - `inputClassName: string` — Additional class name for the inner input element
1082
+ - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1083
+ - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1084
+ - `rightIconAriaLabel: string` — Aria label for the right icon button
1085
+ - `styles: React.ComponentProps<typeof InputBase>["styles"]` — Custom styles for internal parts
1086
+ - `asChild: boolean` = false — Whether to render as a child element.
1087
+ - **ToggleGroup** — Toggleable buttons
1088
+ - `options: Option[]` (required) — List of toggle options
1089
+ - `value: string | string[]` — Selected value(s) (controlled)
1090
+ - `defaultValue: string | string[]` — Initially selected value(s) (uncontrolled)
1091
+ - `onChange: (value: string | string[]) => void` — Callback when the selection changes
1092
+ - `selectionMode: "single" | "multiple"` = "single" — Whether one or multiple options can be selected
1093
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the toggle buttons
1094
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1095
+ - `className: string` — Additional class names
1096
+ - `disabled: boolean` = false — Whether the group is disabled
1097
+ - `label: string` — Group label
1098
+ - `error: string` — Error message
1099
+ - `required: boolean` — Whether to show the required indicator
1100
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
1101
+ - `id: string` — Unique ID for the component
1102
+ - `asChild: boolean` = false — If true, merge group props onto the child element.
1103
+ - `children: React.ReactNode` — Optional children used when asChild is true
1104
+ - `aria-label: string` — Accessible label when no visible label is provided
1105
+ - `aria-labelledby: string` — ID of the element that labels the group
1106
+ - **Transfer** — Move items between lists
1107
+ - `dataSource: TransferItem[]` = [] — All items shown across the two lists
1108
+ - `targetKeys: string[]` — Keys of the items in the target (right) list
1109
+ - `onChange: ( targetKeys: string[], direction: "toLeft" | "toRight", moveKeys: string[], ) => void` — Callback when items are moved between the lists
1110
+ - `titles: [React.ReactNode, React.ReactNode]` = ["Source", "Target"] — Titles of the source and target lists
1111
+ - `className: string` — Additional class names
1112
+ - `style: React.CSSProperties` — Inline styles
1113
+ - `disabled: boolean` = false — Whether the component is disabled
1114
+ - `label: React.ReactNode` — Field label
1115
+ - `error: string` — Error message
1116
+ - `required: boolean` — Whether to show the required indicator
1117
+ - `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
1118
+ - `labels: { noData?: React.ReactNode; moveToTarget?: string; moveToSource?: string; statusMovedToTarget?: (count: number) => string; statusMovedToSource?: (count: number) => string; }` = {} — Labels for internationalization
1119
+ - **TreeSelect** — Select from tree structure
1120
+ - `treeData: TreeSelectNode[]` = [] — Tree nodes to select from
1121
+ - `value: string | string[]` — Selected value(s) (controlled)
1122
+ - `onChange: (value: string | string[]) => void` — Callback when the selection changes
1123
+ - `placeholder: React.ReactNode` — Placeholder shown when nothing is selected
1124
+ - `label: React.ReactNode` — Field label
1125
+ - `error: string` — Error message
1126
+ - `required: boolean` — Whether to show the required indicator
1127
+ - `layout: "vertical" | "horizontal"` — Layout direction of label and field
1128
+ - `className: string` — Additional class names
1129
+ - `disabled: boolean` = false — Whether the field is disabled
1130
+ - `multiple: boolean` = false — Whether multiple nodes can be selected
1131
+ - `searchable: boolean` = false — Whether to show a search input for filtering nodes
1132
+ - `defaultExpandedKeys: string[]` = [] — Keys of the nodes expanded initially
1133
+ - `allowClear: boolean` = false — Whether to show a clear button when a value is selected
1134
+ - `checkStrategy: "cascade" | "exclusive"` = "cascade" — Check selection behavior (effective when multiple).
1135
+ - cascade: checking a parent selects all children; partially checked children make the parent indeterminate (default)
1136
+ - exclusive: parent and children are mutually exclusive (selecting a parent deselects children and vice versa)
1137
+ - `id: string` — Unique ID for the component
1138
+ - `asChild: boolean` = false — If true, merge root props onto the child element.
1139
+ - `children: React.ReactNode` — Optional children used when asChild is true
1140
+ - `aria-label: string` — Accessible label for the trigger when no visible label is provided
1141
+ - `aria-labelledby: string` — ID of the element that labels the field
1142
+ - `aria-describedby: string` — ID of the element that describes the field
1143
+ - `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
1144
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1145
+
1146
+ ### feedback — `import { … } from "wimui/feedback"`
1147
+
1148
+ - **Alert** — Important messages
1149
+ - `title: React.ReactNode` — Title of the alert
1150
+ - `titleTag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"` = "h4" — HTML tag used for the alert title
1151
+ @default "h4"
1152
+ - `description: React.ReactNode` — Description text of the alert
1153
+ - `intent: FeedbackIntent` = "info" — Intent (semantic state) of the alert
1154
+ @default "info"
1155
+ - `icon: React.ReactNode` — Custom icon. When omitted, a default icon matching the intent is displayed.
1156
+ - `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
1157
+ - `className: string` — Additional CSS class name
1158
+ - `children: React.ReactNode` — Content of the alert (treated as the description)
1159
+ - **Autosave** — Inline status indicator for automatic save state
1160
+ - `status: "idle" | "saving" | "saved" | "error"` (required) — Save status
1161
+ - `savedAt: Date` — Time of the last save
1162
+ - `errorMessage: string` — Error message (a default message is used when omitted)
1163
+ - **Banner** — Top prominent messages
1164
+ - `title: React.ReactNode` — Title of the banner
1165
+ - `description: React.ReactNode` — Description text of the banner
1166
+ - `intent: FeedbackIntent` = "info" — Intent (semantic state) of the banner
1167
+ @default "info"
1168
+ - `icon: boolean | React.ReactNode` = true — Whether to show the icon, or a custom icon element
1169
+ @default true
1170
+ - `extra: React.ReactNode` — Action element (e.g. a Button component)
1171
+ - `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
1172
+ - `className: string` — Additional CSS class name
1173
+ - `children: React.ReactNode` — Content of the banner
1174
+ - **ErrorBoundary** — Runtime error fallback
1175
+ - `fallback: ReactNode | unknown` — Component or element displayed when an error occurs.
1176
+ When a function is passed, it is called as (error, errorInfo, reset) => ReactNode.
1177
+ - `onError: (error: Error, errorInfo: ErrorInfo) => void` — Called when an error occurs.
1178
+ - `onReset: () => void` — Called when the error is reset.
1179
+ - `labels: { title?: string; retry?: string; showDetails?: string; hideDetails?: string; }` — Labels for manual translation overrides.
1180
+ - `children: ReactNode` (required) — Content the boundary protects.
1181
+ - **Indicator** — Small status dots
1182
+ - `children: React.ReactNode` — Element the indicator dot is attached to. If omitted, only the dot is rendered.
1183
+ - `color: T | (string & {})` = "primary" — Color of the dot. Accepts a design token color name or any CSS color value.
1184
+ @default "primary"
1185
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the dot.
1186
+ @default "md"
1187
+ - `position: "top-right" | "top-left" | "bottom-right" | "bottom-left"` = "top-right" — Corner of the children the dot is placed at.
1188
+ @default "top-right"
1189
+ - `pulse: boolean` = false — If true, the dot pulses to draw attention.
1190
+ @default false
1191
+ - `inline: boolean` = false — If true, renders the dot inline instead of positioning it on a corner.
1192
+ @default false
1193
+ - `className: string` — Additional CSS class name.
1194
+ - `style: React.CSSProperties` — Inline styles for the container.
1195
+ - **Loader** — Animated indicators to show that data is loading or processing
1196
+ - `variant: "bars" | "dots" | "pulse"` = "bars" — Animation style of the loader.
1197
+ @default "bars"
1198
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg" | "xl">` = "md" — Size of the loader.
1199
+ @default "md"
1200
+ - `color: "currentColor" | WimColor` = "primary" — Color of the loader. Accepts a design token color name or "currentColor".
1201
+ @default "primary"
1202
+ - **LoadingOverlay** — Overlay with loading indicator
1203
+ - `visible: boolean` = false — Whether the overlay is shown.
1204
+ @default false
1205
+ - `loaderType: "spinner" | "bars" | "dots" | "pulse"` = "spinner" — Type of the loading indicator.
1206
+ @default "spinner"
1207
+ - `loaderSize: "sm" | "md" | "lg" | "xl"` = "lg" — Size of the loading indicator.
1208
+ @default "lg"
1209
+ - `loaderColor: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | "currentColor"` = "primary" — Color of the loading indicator.
1210
+ @default "primary"
1211
+ - `backdropVariant: "light" | "dark"` = "dark" — Background style of the overlay.
1212
+ @default "dark"
1213
+ - `blur: "none" | "sm" | "md" | "lg"` = "sm" — Strength of the backdrop blur effect.
1214
+ @default "sm"
1215
+ - `message: string` — Loading message displayed below the indicator.
1216
+ - `fixed: boolean` = false — Whether to use position: fixed (covers the whole screen).
1217
+ @default false
1218
+ - `zIndex: number` — z-index of the overlay.
1219
+ - `children: React.ReactNode` — Custom loading content, replacing the default indicator.
1220
+ - **Notification** — Rich notification card
1221
+ - `id: string` — The unique identifier of notification
1222
+ - `title: ReactNode` (required) — The title of notification
1223
+ - `description: ReactNode` — The description of notification
1224
+ - `icon: ReactNode` — The icon of notification
1225
+ - `intent: FeedbackIntent` — The intent of notification
1226
+ - `onClose: (id?: string) => void` — Callback when notification is closed
1227
+ - `closable: boolean` = true — Whether to show close button
1228
+ - `className: string` — Additional class name
1229
+ - **Progress** — Progress bar
1230
+ - `value: number` = 0 — Current value of the progress bar.
1231
+ @default 0
1232
+ - `max: number` = 100 — Maximum value of the progress bar.
1233
+ @default 100
1234
+ - `intent: IndicatorIntent` = "primary" — Intent (semantic color) of the bar.
1235
+ @default "primary"
1236
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the bar.
1237
+ @default "md"
1238
+ - `label: string` — Text label displayed above the bar.
1239
+ - `showValue: boolean` = false — Whether to display the current value as a percentage.
1240
+ @default false
1241
+ - `indeterminate: boolean` = false — If true, shows an indeterminate animation instead of a value.
1242
+ @default false
1243
+ - **Result** — Task status indicator
1244
+ - `intent: Extract<WimIntent, "success" | "danger" | "info" | "warning">` = "info" — Semantic intent — determines the icon and color.
1245
+ - `status: "404" | "403" | "500"` — HTTP error status — adds a status-specific CSS class and shows a neutral icon.
1246
+ Use for error pages (404, 403, 500).
1247
+ - `title: ReactNode` — The title
1248
+ - `description: ReactNode` — The description
1249
+ - `extra: ReactNode` — Operating area
1250
+ - `icon: ReactNode` — Custom icon
1251
+ - `className: string` — Custom class name
1252
+ - `children: ReactNode` — The children
1253
+ - **ScrollProgress** — Reading progress indicator
1254
+ - `color: "primary" | "secondary" | "success" | "warning" | "danger"` = "primary" — Color of the progress bar.
1255
+ @default "primary"
1256
+ - `target: React.RefObject<HTMLElement | null>` — Element whose scroll position is tracked. Defaults to `window`.
1257
+ - **Skeleton** — Placeholder for content loading states.
1258
+ - `variant: "text" | "rect" | "circle"` = "text" — Shape of the skeleton.
1259
+ - `text`: shaped like a line of text.
1260
+ - `rect`: rectangle.
1261
+ - `circle`: circle.
1262
+ @default "text"
1263
+ - `animation: "pulse" | "wave" | "none"` = "pulse" — Type of animation.
1264
+ - `pulse`: slow fade in and out.
1265
+ - `wave`: wave moving from left to right.
1266
+ - `none`: no animation.
1267
+ @default "pulse"
1268
+ - `width: string | number` — Width, including a CSS unit (px, %, rem, etc.).
1269
+ - `height: string | number` — Height, including a CSS unit (px, %, rem, etc.).
1270
+ - **Snackbar** — Bottom notifications
1271
+ - `message: string` (required) — Message displayed in the snackbar
1272
+ - `open: boolean` = false — Whether the snackbar is shown
1273
+ @default false
1274
+ - `intent: FeedbackIntent` = "info" — Intent (semantic state)
1275
+ @default "info"
1276
+ - `position: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"` = "bottom-center" — Position on the screen
1277
+ @default "bottom-center"
1278
+ - `autoHideDuration: number` = 5000 — Time in milliseconds before the snackbar closes automatically. Set 0 to disable auto-close.
1279
+ @default 5000
1280
+ - `showCloseButton: boolean` = false — Whether to show a close button
1281
+ @default false
1282
+ - `actionLabel: string` — Label of the action button
1283
+ - `onAction: () => void` — Called when the action button is clicked
1284
+ - `onClose: () => void` — Called when the snackbar is closed
1285
+ - `className: string` — Additional CSS class name
1286
+ - **Spinner** — A rotating icon indicating background activity or data fetching
1287
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg" | "xl">` = "md" — Size of the spinner.
1288
+ @default "md"
1289
+ - `color: "currentColor" | WimColor` = "primary" — Color of the spinner. Accepts a design token color name or "currentColor".
1290
+ @default "primary"
1291
+ - `label: string` — Text label displayed next to the spinner.
1292
+ - `labelPosition: "right" | "bottom"` = "right" — Position of the label relative to the spinner.
1293
+ @default "right"
1294
+ - **Toast** — Non-intrusive floating messages that provide feedback on system operations
1295
+ - `id: string` — Identifier of the toast, passed to onClose. Used by ToastProvider to manage a stack.
1296
+ - `title: string` — Title of the toast.
1297
+ - `description: string` — Description text displayed below the title.
1298
+ - `intent: FeedbackIntent` = "info" — Intent (semantic state) of the toast.
1299
+ @default "info"
1300
+ - `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. Set 0 to disable auto-close.
1301
+ @default 3000
1302
+ - `open: boolean` = true — Whether the toast is shown.
1303
+ @default true
1304
+ - `onClose: (id?: string) => void` — Called with the toast id when the toast is closed.
1305
+ - `className: string` — Additional CSS class name.
1306
+ - **Tour** — Sequential guided walkthroughs to onboard users or highlight features
1307
+ - `steps: TourStep[]` (required) — Steps of the tour. Each step targets an element via a CSS selector.
1308
+ - `open: boolean` (required) — Whether the tour is shown.
1309
+ - `onClose: () => void` (required) — Called when the tour is dismissed before completion.
1310
+ - `onFinish: () => void` — Called when the last step is completed.
1311
+
1312
+ ### navigation — `import { … } from "wimui/navigation"`
1313
+
1314
+ - **Affix** — Sticky elements
1315
+ - `offsetTop: number` — Offset distance from the top of the window (in pixels)
1316
+ - `offsetBottom: number` — Offset distance from the bottom of the window (in pixels)
1317
+ - `onChange: (lastAffixed: boolean) => void` — Callback when the affix state changes
1318
+ - `target: () => HTMLElement | Window | null` = () => window — Target container that will be scrolled
1319
+ - `children: React.ReactNode` (required) — Children to be rendered inside the affix
1320
+ - `className: string` — Additional class names
1321
+ - `style: React.CSSProperties` — Style attribute
1322
+ - **Anchor** — Smooth scroll links
1323
+ - `items: AnchorLinkItem[]` = [] — Array of anchor link configurations
1324
+ - `bounds: number` = 5 — Bounding distance (in pixels) for triggering active state
1325
+ - `offset: number` = 0 — Offset (in pixels) from top when clicking to scroll
1326
+ - `direction: "vertical" | "horizontal"` = "vertical" — Orientation of the anchor links
1327
+ - `className: string` — Additional class names
1328
+ - `style: React.CSSProperties` — Style attribute
1329
+ - **BackTop** — Back to top button
1330
+ - `target: () => HTMLElement | Window | Document | null` = () => window — Target container that will be scrolled
1331
+ - `visibilityHeight: number` = 400 — Scroll height after which the button becomes visible
1332
+ - `onClick: (e: React.MouseEvent<HTMLDivElement>) => void` — Callback when clicked
1333
+ - `children: React.ReactNode` — Children to be rendered inside the button
1334
+ - `className: string` — Additional class names
1335
+ - `style: React.CSSProperties` — Style attribute
1336
+ - `aria-label: string` — Accessible label for the button
1337
+ - `asChild: boolean` = false — Whether to render as a child element.
1338
+ - **Breadcrumb** — Location trace
1339
+ - `items: BreadcrumbItem[]` (required) — Items to display, from the root to the current page.
1340
+ - `separator: React.ReactNode` — Separator displayed between items. Defaults to a chevron icon.
1341
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the breadcrumb.
1342
+ @default "md"
1343
+ - `className: string` — Additional CSS class name for the container.
1344
+ - `ariaLabel: string` — Accessible label of the navigation landmark. Defaults to a localized "breadcrumb" label.
1345
+ - `asChild: boolean` — If true, the breadcrumb will be rendered as its child, merging its props onto that child.
1346
+ - **CommandPalette** — Cmd+K search overlay
1347
+ - `children: ReactNode` (required) — Palette parts (CommandPaletteTrigger, CommandPaletteContent, etc.).
1348
+ - `open: boolean` — Controlled open state. Use together with onOpenChange.
1349
+ - `onOpenChange: (open: boolean) => void` — Called with the next state when the palette is opened or closed.
1350
+ - **HamburgerMenu** — Toggleable menu
1351
+ - `asChild: boolean` = false — If true, merge button props onto the child element.
1352
+ - `open: boolean` = false — Whether the menu is open
1353
+ - `onClick: React.MouseEventHandler<HTMLButtonElement>` — Callback function when the menu is toggled
1354
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the hamburger menu
1355
+ - `color: string` — Color of the bars
1356
+ - `visibleBelow: "xs" | "sm" | "md" | "lg" | "xl"` — Show only below the given breakpoint (e.g. "md" matches Sidebar's mobile drawer range)
1357
+ - `className: string` — Custom class name
1358
+ - **KeyboardShortcuts** — Display a structured list of keyboard shortcuts
1359
+ - `shortcuts: ShortcutItem[]` (required) — List of shortcuts to display
1360
+ - `title: string` — Section title
1361
+ - `separator: string` = "+" — Separator displayed between keys
1362
+ @default "+"
1363
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the list
1364
+ @default "md"
1365
+ - **Link** — Hyperlinks
1366
+ - `asChild: boolean` = false — If true, the link will be rendered as its child, merging its props onto that child.
1367
+ Useful for using the link styles with Link components from React Router or Next.js.
1368
+ - `label: React.ReactNode` — Link text or element. Alternative to children.
1369
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Font size of the link.
1370
+ @default "md"
1371
+ - `priority: "primary" | "secondary" | "tertiary"` = "primary" — Visual emphasis of the link.
1372
+ @default "primary"
1373
+ - `iconName: React.ComponentProps<typeof Icon>["name"]` — Name of the icon displayed alongside the label.
1374
+ - `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label.
1375
+ @default "left"
1376
+ - `external: boolean` = false — If true, opens the link in a new tab and shows an external-link icon.
1377
+ @default false
1378
+ - `styles: { root?: string; label?: string; inner?: string; externalIcon?: string; }` — Custom styles for internal parts
1379
+ - **Menubar** — Desktop-style application menu bar with floating File / Edit / View submenus.
1380
+ - `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
1381
+ - **Pagination** — Multi-page navigation
1382
+ - `total: number` (required) — Total number of items
1383
+ - `pageSize: number` = 10 — Number of items per page
1384
+ - `current: number` = 1 — Current page number (1-indexed)
1385
+ - `onChange: (page: number, pageSize: number) => void` — Callback function when page changes
1386
+ - `onPageSizeChange: (pageSize: number) => void` — Callback function when page size changes
1387
+ - `siblingCount: number` = 1 — Number of sibling pages to show around the current page
1388
+ - `className: string` — Additional class names
1389
+ - `asChild: boolean` = false — If true, merge nav props onto the child element.
1390
+ - `children: React.ReactNode` — Optional child used when asChild is true
1391
+ - `renderPage: (page: number, props: PaginationPageRenderProps) => React.ReactNode` — Custom renderer for page number controls. Defaults to PaginationPage.
1392
+ Useful for URL-based pagination (e.g. wrap with a Link via PaginationPage asChild).
1393
+ - `simple: boolean` = false — Whether to show a simplified version
1394
+ - `hideOnSinglePage: boolean` = false — Whether to hide the pagination if there is only one page
1395
+ - `showSizeChanger: boolean` = false — Whether to show the page size changer
1396
+ - `pageSizeOptions: number[]` = [10, 20, 50, 100] — Page size options for the page size changer
1397
+ - `showTotal: (total: number, range: [number, number]) => React.ReactNode` — Function to display the total count
1398
+ - `showQuickJumper: boolean` = false — Whether to show quick jumper
1399
+ - `labels: { prevPage?: string; nextPage?: string; pageAriaLabel?: (page: number) => string; itemsPerPage?: string; goTo?: string; go?: string; pageSizeAriaLabel?: string; jumpToPageAriaLabel?: string; navAriaLabel?: string; totalLabel?: string; }` = {} — Labels for internationalization
1400
+ - **SpeedDial** — Floating action button that expands sub-actions on hover or click.
1401
+ - `actions: SpeedDialAction[]` (required) — Actions to display when SpeedDial is open
1402
+ - `icon: keyof typeof ALL_ICONS` = "PlusIcon" — Icon name for the main button when closed
1403
+ - `activeIcon: keyof typeof ALL_ICONS` = "CloseIcon" — Icon name for the main button when open
1404
+ - `direction: "up" | "down" | "left" | "right"` = "up" — Direction in which actions expand
1405
+ - `trigger: "hover" | "click"` = "hover" — Trigger mode to open the SpeedDial
1406
+ - `open: boolean` — Controlled open state
1407
+ - `onOpenChange: (open: boolean) => void` — Callback when open state changes
1408
+ - **Stepper** — Visual sequence steps
1409
+ - `steps: Step[]` = [] — Array of step configurations
1410
+ - `current: number` = 0 — Index of the current active step (0-indexed)
1411
+ - `direction: "horizontal" | "vertical"` = "horizontal" — Direction of the stepper
1412
+ - `labelPlacement: "horizontal" | "vertical"` = "horizontal" — Placement of the labels
1413
+ - `intent: "wait" | "process" | "finish" | "error"` = "process" — Workflow intent shown on the current active step (default: "process")
1414
+ - `className: string` — Additional class names
1415
+ - `ariaLabel: string` — Accessibility label for the navigation
1416
+ - `onChange: (current: number) => void` — Callback function when a step is clicked (if applicable)
1417
+ - `asChild: boolean` — Whether to use the Radix Slot pattern
1418
+ - **TabBar** — Mobile bottom navigation
1419
+ - `fixed: boolean` = true — Fixed position at the bottom of the screen
1420
+ - `bordered: boolean` = true — Show top border
1421
+ - `glass: boolean` = false — Glassmorphism effect
1422
+ - **TabNavigation** — Tab-based navigation
1423
+ - `variant: "underline" | "pill" | "contained"` = "underline" — Visual style of the tabs
1424
+ - `align: "start" | "center" | "end" | "justify"` = "start" — Alignment of the tabs
1425
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the tabs
1426
+ - **Tabs** — A container to organize related content into switchable view panels
1427
+ - `asChild: boolean` = false — If true, the tabs root will be rendered as its child, merging its props onto that child.
1428
+ - `defaultValue: string` — Value of the tab selected initially, for uncontrolled usage.
1429
+ - `value: string` — Controlled value of the selected tab. Use together with onChange.
1430
+ - `onChange: (value: string) => void` — Called with the value of the newly selected tab.
1431
+ - `orientation: "horizontal" | "vertical"` = "horizontal" — Orientation of the tab list, affecting layout and arrow-key navigation.
1432
+ @default "horizontal"
1433
+
1434
+ ### data-display — `import { … } from "wimui/data-display"`
1435
+
1436
+ - **Accordion** — Collapsible panels
1437
+ - `type: "single" | "multiple"` = "single" — Whether one or multiple items can be open at a time
1438
+ - `defaultValue: string | string[]` — Initially open item value(s) (uncontrolled)
1439
+ - `value: string | string[]` — Open item value(s) (controlled)
1440
+ - `onChange: (value: string | string[]) => void` — Callback when the open items change
1441
+ - `collapsible: boolean` = true — Whether the open item can be collapsed (type="single")
1442
+ - `className: string` — Additional class names
1443
+ - `children: React.ReactNode` (required) — Accordion.Item elements
1444
+ - `id: string` — Unique ID for the component
1445
+ - `asChild: boolean` — Whether to render as a child element.
1446
+ - **Avatar** — Profile initials/pics
1447
+ - `src: string` — Image source URL
1448
+ - `alt: string` = "" — Alternative text for the image
1449
+ - `initials: string` — Initials shown as a fallback when no image is available
1450
+ - `icon: React.ReactNode` — Icon shown as a fallback when no image or initials are available
1451
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the avatar
1452
+ - `shape: "circle" | "rounded"` = "circle" — Shape of the avatar
1453
+ - `intent: IndicatorIntent` — Intent (semantic color) applied to the avatar
1454
+ - **AvatarGroup** — Stacked avatars
1455
+ - `children: React.ReactNode` (required) — Avatar elements to group
1456
+ - `max: number` — Maximum number of avatars to show before collapsing into a count
1457
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size applied to the avatars
1458
+ - `total: number` — Total number of avatars (used to compute the overflow count)
1459
+ - `className: string` — Additional class names
1460
+ - **Badge** — Indicators or counts
1461
+ - `asChild: boolean` — If true, the badge will be rendered as its child, merging its props onto that child.
1462
+ - `children: React.ReactNode` — Content to display
1463
+ - `content: React.ReactNode` — Content to display (alternative to children)
1464
+ - `icon: React.ReactNode` — Icon
1465
+ - `intent: IndicatorIntent` — Intent (semantic state)
1466
+ - `variant: "solid" | "outline" | "subtle"` — Visual style variant
1467
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` — Size
1468
+ - `interactive: boolean` = false — Whether to enable the interactive state
1469
+ - **Calendar** — Calendar view
1470
+ - `defaultValue: Date` — Default selected date (uncontrolled)
1471
+ - `value: Date` — Selected date (controlled)
1472
+ - `minDate: Date` — Earliest selectable date
1473
+ - `maxDate: Date` — Latest selectable date
1474
+ - `disabledDates: Date[]` — Dates that cannot be selected
1475
+ - `isDateDisabled: (date: Date) => boolean` — Function returning whether a given date is disabled
1476
+ - `weekStartsOn: 0 | 1` = 0 — First day of the week (0 = Sunday, 1 = Monday)
1477
+ - `className: string` — Additional class names
1478
+ - `disabled: boolean` = false — Whether the calendar is disabled
1479
+ - `onChange: (date: Date) => void` — Callback when a date is selected (single mode)
1480
+ - `rangeMode: boolean` = false — Whether to enable range selection mode
1481
+ - `range: { start: Date | null; end: Date | null; }` — Selected range (controlled, range mode)
1482
+ - `defaultRange: { start: Date | null; end: Date | null; }` — Default selected range (uncontrolled, range mode)
1483
+ - `onRangeChange: (range: CalendarRange) => void` — Callback when the range changes (range mode)
1484
+ - **CalendarHeatmap** — GitHub-style activity graph for visualizing continuity
1485
+ - `data: CalendarHeatmapData[]` = [] — Activity data array.
1486
+ - `year: number` = new Date().getFullYear() — The year to display.
1487
+ @default current year
1488
+ - `getColorLevel: (count: number) => 0 | 1 | 2 | 3 | 4` = (count) => {
1489
+ if (count === 0) return 0;
1490
+ if (count < 3) return 1;
1491
+ if (count < 6) return 2;
1492
+ if (count < 9) return 3;
1493
+ return 4;
1494
+ } — Function to map count to a level (0-4).
1495
+ - `className: string` — Custom class name for the root element.
1496
+ - `tooltipFormatter: (date: string, count: number) => React.ReactNode` — Custom tooltip formatter.
1497
+ - `asChild: boolean` = false — Whether to render as a child component.
1498
+ - `children: React.ReactNode` — Content to render inside.
1499
+ - **Card** — Information containers
1500
+ - `asChild: boolean` = false — If true, the card will be rendered as its child, merging its props onto that child.
1501
+ - `variant: "elevated" | "outline" | "flat" | "glass"` = "elevated" — Visual style variant of the card
1502
+ - `interactive: boolean` = false — Whether to enable hover animation and click effects
1503
+ - `padding: ComponentSize | "none"` = "md" — Padding size
1504
+ - `radius: ComponentSize | "none"` = "lg" — Corner radius size
1505
+ - **Carousel** — Content slideshow
1506
+ - `children: React.ReactNode` — Content of the carousel
1507
+ - `autoPlay: boolean` = false — Whether to auto-play
1508
+ - `interval: number` = 5000 — Auto-play interval (in milliseconds)
1509
+ - `showIndicators: boolean` = true — Whether to show the indicators
1510
+ - `showControls: boolean` = true — Whether to show the previous/next buttons
1511
+ - `loop: boolean` = true — Whether to loop infinitely (seamless transitions)
1512
+ - `slidesToShow: number | Breakpoints` = 1 — Number of slides to show at once. A number or an object per breakpoint.
1513
+ - `aspectRatio: string` — Aspect ratio (e.g. '16/9', '4/3', '1/1').
1514
+ - `objectFit: "fill" | "contain" | "cover" | "none" | "scale-down"` = "cover" — How the image fits. Effective when aspectRatio is set. (default: 'cover')
1515
+ - `labels: { slideLabel?: (number: number) => string; prevSlide?: string; nextSlide?: string; goToSlide?: (number: number) => string; }` — Labels for manual translation.
1516
+ - `className: string` — Additional class names
1517
+ - `asChild: boolean` — Whether to use the Radix Slot pattern
1518
+ - **Chip** — Filter/Selection tokens
1519
+ - `asChild: boolean` = false — If true, the chip will be rendered as its child, merging its props onto that child.
1520
+ - `children: React.ReactNode` — Content to display
1521
+ - `content: React.ReactNode` — Content to display (alternative to children)
1522
+ - `onClick: (e: React.MouseEvent<HTMLButtonElement | HTMLSpanElement>) => void` — Click event. When provided, the chip behaves as a button.
1523
+ - `onDelete: (e: React.SyntheticEvent) => void` — Delete event. When provided, a × button is shown.
1524
+ - `avatar: React.ReactNode` — Avatar (e.g. an image or initials)
1525
+ - `icon: React.ReactNode` — Icon
1526
+ - `selected: boolean` = false — Whether the chip is selected
1527
+ - `disabled: boolean` = false — Whether the chip is disabled
1528
+ - `intent: IndicatorIntent` = "primary" — Intent (semantic state)
1529
+ - `variant: "solid" | "outline" | "subtle"` = "solid" — Visual style variant
1530
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size
1531
+ - `deleteAriaLabel: string` — Accessible label for the delete button
1532
+ - `className: string` — Additional class names
1533
+ - **Countdown** — Display the remaining time until a target moment as a live ticking timer, for sale deadlines, OTP resend waits, and maintenance notices.
1534
+ - `target: Date | string | number` (required) — The moment the countdown ends, as a Date object, ISO 8601 string,
1535
+ or epoch milliseconds.
1536
+ - `baseDate: Date | string | number` — Reference point used as "now". When set, the countdown is frozen at
1537
+ that instant (useful for snapshots and tests).
1538
+ - `variant: "digital" | "units"` = "digital" — "digital" renders a compact colon-separated clock (04:12:33);
1539
+ "units" renders one labeled segment per unit (days / hours / min / sec).
1540
+ @default "digital"
1541
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the numbers and labels.
1542
+ @default "md"
1543
+ - `locale: string` — BCP 47 locale override for unit labels (e.g. "en", "ja", "pt-BR").
1544
+ @default current i18next language
1545
+ - `unitDisplay: "long" | "short" | "narrow"` = "short" — Length of the unit labels in the "units" variant.
1546
+ @default "short"
1547
+ - `paused: boolean` = false — Pauses the countdown while true. It resumes from the real remaining
1548
+ time (the target moment does not shift).
1549
+ @default false
1550
+ - `onComplete: () => void` — Called once when the remaining time reaches zero (also on mount if the
1551
+ target is already in the past). Not called when baseDate is set.
1552
+ - `completedContent: React.ReactNode` — Content shown instead of the zeroed digits once the countdown ends.
1553
+ - `fallback: React.ReactNode` — Content shown when the target cannot be parsed.
1554
+ - `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
1555
+ - **DataGrid** — Advanced data table and manipulation
1556
+ - `columns: DataGridColumn<T>[]` (required) — Column definitions
1557
+ - `data: T[]` (required) — Row data
1558
+ - `rowKey: string | ((record: T) => string)` = "id" — Row key: a field name or a function that derives the key from a record
1559
+ - `loading: boolean` = false — Whether the grid is in a loading state
1560
+ - `striped: boolean` = false — Whether to show striped (zebra) rows
1561
+ - `bordered: boolean` = false — Whether to show borders between cells
1562
+ - `hoverable: boolean` = true — Whether rows highlight on hover
1563
+ - `stickyHeader: boolean` = true — Whether the header sticks to the top while scrolling
1564
+ - `height: string | number` — Height of the grid (enables vertical scrolling)
1565
+ - `maxHeight: string | number` — Maximum height of the grid (enables vertical scrolling)
1566
+ - `emptyMessage: React.ReactNode` — Message or element to display when data is empty
1567
+ - `mobileCard: boolean` = false — Enable mobile card layout
1568
+ - `selection: boolean | SelectionConfig<T>` — Row selection: a boolean shorthand or a full configuration object
1569
+ - `selectedRowKeys: string[]` — Selected row keys (used with boolean `selection`)
1570
+ - `onSelectionChange: (keys: string[], records: T[]) => void` — Selection change callback (used with boolean `selection`)
1571
+ - `sortConfig: { key: string; direction: "asc" | "desc" | "none"; }` — Current sort configuration
1572
+ - `onSortChange: (key: string, direction: "asc" | "desc" | "none") => void` — Callback when the sort configuration changes
1573
+ - `pagination: object | false` — Pagination configuration, or false to disable pagination
1574
+ - `infiniteScroll: { hasMore: boolean; onLoadMore: () => void; threshold?: number; }` — Infinite-scroll configuration for dynamic loading
1575
+ - `className: string` — Additional class names
1576
+ - `ariaLabel: string` — Accessibility label for the grid
1577
+ - **DescriptionList** — Key-value pairs
1578
+ - `children: React.ReactNode` (required) — DescriptionListItem elements
1579
+ - `className: string` — Additional class names
1580
+ - `layout: "horizontal" | "vertical" | "compact"` = "horizontal" — Layout of terms and descriptions
1581
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the text
1582
+ - `border: boolean` = false — Whether to show borders (alias of bordered)
1583
+ - `bordered: boolean` = false — Whether to show borders
1584
+ - **EmptyState** — Missing data placeholder
1585
+ - `title: React.ReactNode` (required) — Title to display.
1586
+ - `description: React.ReactNode` — Description text to display.
1587
+ - `icon: React.ReactNode` — Icon to display.
1588
+ - `extra: React.ReactNode` — Element shown as an action (e.g. a button).
1589
+ - `variant: "default" | "simple"` = "default" — Design variant.
1590
+ - **FAQSection** — Frequently Asked Questions section
1591
+ - `items: FAQItem[]` (required) — FAQ items.
1592
+ - `title: React.ReactNode` — Main title of the section.
1593
+ - `description: React.ReactNode` — Supplementary description shown below the title.
1594
+ - `layout: "top" | "left"` = "top" — Layout.
1595
+ - top: title and description above the accordion.
1596
+ - left: title and description on the left, accordion on the right (desktop and up).
1597
+ - `accordionProps: Omit<AccordionProps, "children">` — Props passed to the inner Accordion component.
1598
+ - `className: string` — Additional class names.
1599
+ - **InfiniteScroll** — Infinite scroll control
1600
+ - `children: React.ReactNode` (required) — Content to display.
1601
+ - `hasMore: boolean` = false — Whether there is more data to load.
1602
+ - `loading: boolean` = false — Whether data is currently loading.
1603
+ - `onLoadMore: () => void` (required) — Callback to load the next batch of data.
1604
+ - `loader: React.ReactNode` — Element shown while loading.
1605
+ - `threshold: number` = 250 — Scroll threshold (px). onLoadMore is called when the scroll position gets this close to the bottom.
1606
+ - `className: string` — Additional class names.
1607
+ - `container: React.RefObject<HTMLElement | null>` — Target whose scroll events are observed (defaults to window).
1608
+ - **JsonDiffViewer** — Compares two JSON values as a formatted side-by-side or unified diff, built on top of CodeDiffViewer.
1609
+ - `before: unknown` (required) — JSON value before the change
1610
+ - `after: unknown` (required) — JSON value after the change
1611
+ - `indent: number` = 2 — Indentation spaces for JSON.stringify (default: 2)
1612
+ - `view: "split" | "unified"` — Display mode inherited from CodeDiffViewer
1613
+ - **JsonViewer** — Recursive tree viewer and editor for JSON data.
1614
+ - `data: unknown` (required) — The JSON data to display
1615
+ - `expandDepth: number` = 1 — Initial depth to expand
1616
+ - `showCopy: boolean` = true — If true, show copy button
1617
+ - `showToolbar: boolean` = true — If true, show toolbar
1618
+ - `editable: boolean` = false — If true, the data can be edited inline
1619
+ - `onChange: (data: unknown) => void` — Callback when data changes
1620
+ - **Kanban** — Drag-and-drop board for visualizing workflow stages
1621
+ - `columns: KanbanColumnData[]` — Kanban column data (for prop-driven usage).
1622
+ - `onMove: (itemId: string, fromColumnId: string, toColumnId: string) => void` — Callback when a card is moved.
1623
+ - `onCardMove: (itemId: string, fromColumnId: string, toColumnId: string) => void` — Callback when a card is moved (legacy / alternative name).
1624
+ - `forceMobileUI: boolean` = false — Whether to force the touch-device UI.
1625
+ - `asChild: boolean` = false — Whether to render as a child element.
1626
+ - **Leaderboard** — Display a ranked list of entries with scores and medal highlights for the top three positions.
1627
+ - `entries: LeaderboardEntry[]` (required) — List of ranking entries
1628
+ - `unit: string` — Label for the score unit
1629
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size
1630
+ - **List** — Structurally organized items in bullet points or numbered formats
1631
+ - `asChild: boolean` = false — Whether to render as a child element.
1632
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the list items
1633
+ - `spacing: "tight" | "normal" | "loose"` = "normal" — Spacing between items
1634
+ - `bordered: boolean` = false — Whether to show borders between items
1635
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1636
+ - `hoverable: boolean` = false — Whether items highlight on hover
1637
+ - **Markdown** — A component for safely rendering text in Markdown format.
1638
+ - `content: string` — Markdown string to render. Provide either `content` or `children`.
1639
+ - `children: string` — Markdown string to render (when passed as children).
1640
+ - `gfm: boolean` = true — Whether to enable GitHub Flavored Markdown (default: true).
1641
+ - `className: string` — Additional class names.
1642
+ - **Marquee** — Scrolling text animation
1643
+ - `duration: number` = 20 — Animation speed (in seconds). Defaults to `20`.
1644
+ - `reverse: boolean` = false — Whether to run the animation in reverse.
1645
+ - `pauseOnHover: boolean` = true — Whether to pause the animation on hover.
1646
+ - `vertical: boolean` = false — Whether to scroll vertically.
1647
+ - `repeat: number` = 2 — Number of times the content is repeated. May need adjusting for a seamless loop. Defaults to `2`.
1648
+ - **NodeGraph** — Interactive node-based flowchart and pipeline editor
1649
+ - `nodes: Node[]` (required) — Controlled nodes
1650
+ - `edges: Edge[]` (required) — Controlled edges
1651
+ - `onNodesChange: OnNodesChange` (required) — Called when nodes change (position, selection, removal)
1652
+ - `onEdgesChange: OnEdgesChange` (required) — Called when edges change
1653
+ - `onConnect: OnConnect` — Called when a new connection is made
1654
+ - `nodeTypes: NodeTypes` — Custom node type renderers
1655
+ - `edgeTypes: EdgeTypes` — Custom edge type renderers
1656
+ - `nodesDraggable: boolean` = true — Whether nodes can be dragged
1657
+ - `nodesConnectable: boolean` = true — Whether nodes can be connected
1658
+ - `deleteKeyCode: string | null` = "Backspace" — Whether elements can be deleted with Backspace/Delete
1659
+ - `showMiniMap: boolean` = false — Show the minimap panel
1660
+ - `showControls: boolean` = true — Show zoom/fit controls
1661
+ - `backgroundVariant: BackgroundVariant` = BackgroundVariant.Dots — Background grid style
1662
+ - `fitView: boolean` = true — Fit view options on mount
1663
+ - `fitViewOptions: FitViewOptions` — Options for the initial fit-view behavior
1664
+ - `defaultEdgeOptions: DefaultEdgeOptions` — Default options applied to new edges
1665
+ - `className: string` — Additional CSS class
1666
+ - `aria-label: string` = "Node graph" — Accessible label for the graph region
1667
+ - **PullToRefresh** — Pull-to-refresh utility for enhancing mobile user experience.
1668
+ - `onRefresh: () => Promise<void> | void` (required) — Callback when refresh is triggered. Should return a promise.
1669
+ - `refreshing: boolean` — Whether the refreshing is currently in progress (controlled)
1670
+ - `threshold: number` = 60 — Distance in pixels to pull before triggering refresh
1671
+ - `maxDistance: number` = 120 — Maximum distance in pixels the container can be pulled
1672
+ - `children: React.ReactNode` (required) — The content to be wrapped and pulled
1673
+ - `asChild: boolean` = false — If true, the content div will be rendered as its child
1674
+ - **QRCode** — QR generator
1675
+ - `value: string` (required) — Value encoded in the QR code
1676
+ - `size: number` = 128 — Size of the QR code in px
1677
+ - `level: "L" | "M" | "Q" | "H"` = "M" — Error correction level
1678
+ - `bgColor: string` = "var(--wim-color-surface)" — Background color
1679
+ - `fgColor: string` = "var(--wim-color-text-primary)" — Foreground (module) color
1680
+ - `marginSize: number` = 0 — Size of the quiet-zone margin, in modules
1681
+ - `renderAs: "svg" | "canvas"` = "svg" — Whether to render as an SVG or a canvas
1682
+ - `imageSettings: React.ComponentProps<typeof QRCodeSVG>["imageSettings"]` — Settings for an image embedded in the center of the QR code
1683
+ - `className: string` — Additional class names
1684
+ - `aria-label: string` — Accessible label describing what the QR code represents
1685
+ - **RangeCalendar** — Range calendar view
1686
+ - `value: [Date | null, Date | null]` — 現在選択されている範囲 [開始日, 終了日]。
1687
+ - `onChange: (value: RangeCalendarValue) => void` — 範囲が変更された時のコールバック。
1688
+ - `defaultValue: [Date | null, Date | null]` — 初期値。
1689
+ - `className: string` — 追加のクラス名。
1690
+ - `disabled: boolean` = false — 無効化。
1691
+ - `minDate: Date` — 選択可能な最小日付。
1692
+ - `maxDate: Date` — 選択可能な最大日付。
1693
+ - `disabledDates: Date[]` — 無効化する日付の配列。
1694
+ - `isDateDisabled: (date: Date) => boolean` — 特定の日付を無効化する関数。
1695
+ - `weekStartsOn: 0 | 1` — 週の開始曜日。0 = 日曜始まり、1 = 月曜始まり。デフォルトは 0。
1696
+ - **Reaction** — Display emoji reaction buttons with toggleable state and counts
1697
+ - `reactions: ReactionItem[]` (required) — List of reactions
1698
+ - `onReact: (emoji: string, active: boolean) => void` — Callback when a reaction is added or removed
1699
+ - `showAddButton: boolean` = false — Whether to show the add button
1700
+ - `onAdd: () => void` — Callback when the add button is clicked
1701
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size
1702
+ - `disabled: boolean` = false — Whether the component is disabled
1703
+ - **RelativeTime** — Display a timestamp as a localized relative phrase ("3 minutes ago", "yesterday") that updates automatically as time passes.
1704
+ - `date: Date | string | number` (required) — The date to display, as a Date object, ISO 8601 string, or epoch milliseconds.
1705
+ - `baseDate: Date | string | number` — Reference point used as "now". When set, live updates are disabled.
1706
+ @default current time
1707
+ - `locale: string` — BCP 47 locale override (e.g. "en", "ja", "pt-BR").
1708
+ @default current i18next language
1709
+ - `numeric: Intl.RelativeTimeFormatNumeric` = "auto" — "auto" allows idiomatic phrases like "yesterday"; "always" always uses numbers ("1 day ago").
1710
+ @default "auto"
1711
+ - `format: Intl.RelativeTimeFormatStyle` = "long" — Length of the formatted message ("long" | "short" | "narrow").
1712
+ @default "long"
1713
+ - `live: boolean` = true — Automatically re-render as time passes. Ignored when baseDate is set.
1714
+ @default true
1715
+ - `fallback: React.ReactNode` — Content shown when the date cannot be parsed.
1716
+ - `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
1717
+ - **ScheduleView** — Time-grid calendar with drag-and-drop scheduling
1718
+ - `events: ScheduleViewEvent[]` = [] — List of calendar events
1719
+ - `initialView: "timeGridWeek" | "timeGridDay" | "dayGridMonth"` = "timeGridWeek" — Initial view mode
1720
+ - `editable: boolean` = true — Whether events can be dragged to new times
1721
+ - `selectable: boolean` = true — Whether date ranges can be selected by clicking/dragging
1722
+ - `onEventClick: (arg: EventClickArg) => void` — Called when an event is clicked
1723
+ - `onEventDrop: (arg: EventDropArg) => void` — Called when an event is dropped to a new time
1724
+ - `onEventChange: (arg: EventChangeArg) => void` — Called when an event is resized
1725
+ - `onDateSelect: (arg: DateSelectArg) => void` — Called when a date/time range is selected
1726
+ - `slotMinTime: string` = "08:00:00" — First hour displayed in the time grid (e.g. "08:00:00")
1727
+ - `slotMaxTime: string` = "20:00:00" — Last hour displayed in the time grid (e.g. "20:00:00")
1728
+ - `slotDuration: string` = "00:30:00" — Duration of each time slot, e.g. "00:30:00"
1729
+ - `locale: string` = "en" — Locale string, e.g. "ja", "pt"
1730
+ - `unselectAuto: boolean` = true — Whether clicking elsewhere on the page will clear the current selection
1731
+ - `className: string` — Additional CSS class
1732
+ - `aria-label: string` = "Schedule" — Accessible label for the schedule region
1733
+ - **SortableList** — Item rearrangement and reordering
1734
+ - `asChild: boolean` = false — If true, the component will be rendered as its child.
1735
+ - `onSortEnd: (oldIndex: number, newIndex: number) => void` — Callback called when reordering is completed.
1736
+ - `disabled: boolean` = false — Whether the entire list is disabled.
1737
+ - **Stats** — A component to highlight key performance indicators and metrics
1738
+ - `variant: React.ComponentProps<typeof Card>["variant"]` = "elevated" — Visual style variant of the card
1739
+ - `asChild: boolean` = false — If true, the card will be rendered as its child, merging its props onto that child.
1740
+ - `interactive: boolean` = false — Whether to enable hover animation and click effects
1741
+ - `padding: ComponentSize | "none"` = "md" — Padding size
1742
+ - `radius: ComponentSize | "none"` = "lg" — Corner radius size
1743
+ - **SwipeAction** — Mobile-friendly swipe actions (delete, archive) for list items.
1744
+ - `as: React.ElementType` = "div" — The element to render as the root container. Default is 'div'.
1745
+ - `leftActions: SwipeActionItem[]` = [] — Actions revealed when swiping from left to right
1746
+ - `rightActions: SwipeActionItem[]` = [] — Actions revealed when swiping from right to left
1747
+ - `children: React.ReactNode` (required) — The content to be wrapped and swiped
1748
+ - `asChild: boolean` = false — If true, the content div will be rendered as its child
1749
+ - `id: string` — Unique ID for the item. Automatically generated if not provided.
1750
+ - `closeOnAction: boolean` = true — Whether to automatically close the actions when an action is clicked. Default is true.
1751
+ - **Table** — Rows and columns for displaying structured data efficiently
1752
+ - `asChild: boolean` = false — Whether to render as a child element.
1753
+ - `striped: boolean` = false — Whether to show striped (zebra) rows
1754
+ - `bordered: boolean` = false — Whether to show borders between cells
1755
+ - `hoverable: boolean` = false — Whether rows highlight on hover
1756
+ - `fullWidth: boolean` = false — Whether to take full width of parent
1757
+ - `stickyHeader: boolean` = false — Whether the header sticks to the top while scrolling
1758
+ - `scrollbar: "default" | "subtle" | "hidden"` = "default" — Scrollbar style of the container
1759
+ - `mobileCard: boolean` = false — Mobile view: Switch to card layout
1760
+ - `height: string | number` — Height of the container (enables vertical scrolling)
1761
+ - `maxHeight: string | number` — Maximum height of the container (enables vertical scrolling)
1762
+ - `containerClassName: string` — Additional class name for the scroll container
1763
+ - `card: boolean` = false — Add outer border and border-radius to the container (DataGrid look)
1764
+ - **Tag** — Compact visual descriptors used for labeling or categorizing content
1765
+ - `asChild: boolean` — If true, the tag will be rendered as its child, merging its props onto that child.
1766
+ - `children: React.ReactNode` — Content to display
1767
+ - `content: React.ReactNode` — Content to display (alternative to children)
1768
+ - `intent: IndicatorIntent` — Intent (semantic state)
1769
+ - `variant: "solid" | "outline" | "subtle"` — Visual style variant
1770
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` — Size
1771
+ - `icon: React.ReactNode` — Icon
1772
+ - `onDelete: (e: React.MouseEvent<HTMLButtonElement>) => void` — Delete event. When provided, a × button is shown.
1773
+ - `disabled: boolean` — Whether the tag is disabled
1774
+ - `interactive: boolean` = false — Whether to enable the interactive state
1775
+ - **Timeline** — A vertical list mapping events or history in chronological order
1776
+ - `children: React.ReactNode` (required) — Timeline items
1777
+ - `align: "left" | "right" | "alternate"` = "left" — Alignment of the items relative to the line
1778
+ - `className: string` — Additional class names
1779
+ - `asChild: boolean` — Whether to render as a child element.
1780
+ - **TreeView** — Hierarchical data
1781
+ - `children: React.ReactNode` — JSX-based items (children API). Use this when not using `nodes`.
1782
+ - `nodes: TreeViewNode[]` — Node array for data-driven mode.
1783
+ - `className: string` — Additional class names
1784
+ - `multiSelect: boolean` = false — Whether multiple nodes can be selected
1785
+ - `checkable: boolean` = false — Whether nodes show checkboxes
1786
+ - `checkStrategy: "cascade" | "exclusive"` = "cascade" — Check selection behavior.
1787
+ - cascade: checking a parent selects all children; partially checked children make the parent indeterminate
1788
+ - exclusive: parent and children are mutually exclusive
1789
+ - `searchable: boolean` = false — Whether to show a search input for filtering nodes
1790
+ - `defaultExpandedValues: string[]` = [] — Values of the nodes expanded initially
1791
+ - `defaultSelectedValues: string[]` = [] — Values of the nodes selected initially
1792
+ - `defaultCheckedValues: string[]` = [] — Values of the nodes checked initially
1793
+ - `onCheckedChange: (checked: string[]) => void` — Callback when the checked values change
1794
+ - `onSelectedChange: (selected: string[]) => void` — Callback when the selected values change
1795
+ - `width: string | number` — Width of the tree (CSS value or number in px)
1796
+ - `virtualThreshold: number` = 100 — Node count threshold at which virtualization kicks in.
1797
+ - `labels: { searchPlaceholder?: string; searchAriaLabel?: string; expandLabel?: (label: string) => string; collapseLabel?: (label: string) => string; treeAriaLabel?: string; }` = {} — Labels for internationalization
1798
+ - `labelId: string` — Accessibility label ID
1799
+ - `styles: { root?: string; item?: string; search?: string; searchInput?: string; labelContainer?: string; iconWrapper?: string; expandBtn?: string; checkbox?: string; icon?: string; }` — Custom styles for internal parts
1800
+ - **VirtualList** — Efficiently renders large lists by virtualizing off-screen items
1801
+ - `items: T[]` (required) — Array of items to display
1802
+ - `itemHeight: number` (required) — Height of each row (px)
1803
+ - `height: number | string` (required) — Total height of the list (px)
1804
+ - `renderItem: (item: T, index: number) => React.ReactNode` (required) — Render function for each item
1805
+ - `overscan: number` = 3 — Number of extra items to render outside the visible range
1806
+ - `className: string` — Additional class names
1807
+ - `itemRole: string` = "listitem" — Role of the element wrapping each item (for accessibility)
1808
+ - `role: string` = "list" — Role of the whole list (for accessibility)
1809
+ - `aria-label: string` — Accessible label
1810
+ - `aria-labelledby: string` — ID of the element that labels the list
1811
+
1812
+ ### overlay — `import { … } from "wimui/overlay"`
1813
+
1814
+ - **BottomSheet** — Mobile bottom overlay
1815
+ - `children: React.ReactNode` (required) — Bottom sheet parts (BottomSheetTrigger, BottomSheetContent, etc.).
1816
+ - `open: boolean` — Controlled open state. Use together with onOpenChange.
1817
+ - `defaultOpen: boolean` = false — Initial open state for uncontrolled usage.
1818
+ @default false
1819
+ - `onOpenChange: (open: boolean) => void` — Called with the next state when the sheet is opened or closed.
1820
+ - **ContextMenu** — Right-click menus
1821
+ - `children: ReactNode` (required) — Element that opens the context menu on right-click.
1822
+ - `menu: ReactNode` (required) — Menu items to display in the context menu
1823
+ - `className: string` — Additional CSS class name for the container.
1824
+ - `disabled: boolean` = false — Disable the context menu
1825
+ - `asChild: boolean` = false — If true, merge trigger props onto the child element.
1826
+ - **Dialog** — Focused task windows
1827
+ - `children: React.ReactNode` (required) — Dialog parts (Dialog.Trigger, Dialog.Content, etc.).
1828
+ - `open: boolean` — Controlled open state. Use together with onOpenChange.
1829
+ - `onOpenChange: (open: boolean) => void` — Called with the next state when the dialog is opened or closed.
1830
+ - `defaultOpen: boolean` = false — Initial open state for uncontrolled usage.
1831
+ @default false
1832
+ - `className: string` — Additional CSS class name.
1833
+ - `closeOnOverlayClick: boolean` = true — Whether clicking the overlay closes the dialog.
1834
+ @default true
1835
+ - **Drawer** — Slide-out detail panels
1836
+ - `children: React.ReactNode` (required) — Drawer parts (DrawerTrigger, DrawerContent, etc.).
1837
+ - `open: boolean` — Controlled open state. Use together with onOpenChange.
1838
+ - `onOpenChange: (open: boolean) => void` — Called with the next state when the drawer is opened or closed.
1839
+ - `defaultOpen: boolean` = false — Initial open state for uncontrolled usage.
1840
+ @default false
1841
+ - `side: "left" | "right" | "top" | "bottom"` = "right" — Edge of the screen the drawer slides in from.
1842
+ @default "right"
1843
+ - `slideIn: boolean` = true — Whether to animate the drawer when opening.
1844
+ @default true
1845
+ - `slideOut: boolean` = true — Whether to animate the drawer when closing.
1846
+ @default true
1847
+ - **Dropdown** — Overlay selection menu
1848
+ - `children: ReactNode` (required) — Dropdown parts (Dropdown.Trigger and Dropdown.Menu).
1849
+ - `asChild: boolean` = false — If true, the dropdown will be rendered as its child, merging its props onto that child.
1850
+ - **FocusTrap** — Focus management
1851
+ - `children: React.ReactNode` (required) — Content to trap focus within.
1852
+ - `active: boolean` = true — Whether the trap is active.
1853
+ @default true
1854
+ - `initialFocus: boolean` = true — Whether to focus the first focusable element on mount.
1855
+ - `className: string` — Additional CSS class name.
1856
+ - **HoverCard** — Rich content on hover
1857
+ - `children: ReactNode` (required) — Hover card parts (HoverCardTrigger and HoverCardContent).
1858
+ - `className: string` — Additional CSS class name for the container.
1859
+ - `openDelay: number` = 700 — Delay before showing the hover card in ms.
1860
+ - `closeDelay: number` = 300 — Delay before hiding the hover card in ms.
1861
+ - `open: boolean` — If provided, controls the open state.
1862
+ - `onOpenChange: (open: boolean) => void` — Callback when open state changes.
1863
+ - **Menu** — General menus
1864
+ - `children: ReactNode` (required) — Menu items (MenuItem, MenuItemGroup, SubMenu, MenuDivider).
1865
+ - `className: string` — Additional CSS class name for the container.
1866
+ - `asChild: boolean` = false — If true, the menu root will be rendered as its child, merging its props onto that child.
1867
+ - `mode: "vertical" | "horizontal" | "inline"` = "vertical" — Mode of the menu
1868
+ - `defaultSelectedKeys: string[]` — Default selected keys
1869
+ - `defaultOpenKeys: string[]` = [] — Default opened submenu keys
1870
+ - **Popconfirm** — Confirmation overlay
1871
+ - `title: ReactNode` (required) — The title of the confirmation box
1872
+ - `description: ReactNode` — The description of the confirmation box
1873
+ - `onConfirm: () => void` — Callback when the user clicks the confirm button
1874
+ - `onCancel: () => void` — Callback when the user clicks the cancel button
1875
+ - `okText: ReactNode` = "OK" — Text of the confirm button
1876
+ - `cancelText: ReactNode` = "Cancel" — Text of the cancel button
1877
+ - `okType: ButtonIntent` = "default" — Color role of the confirm button
1878
+ - `children: ReactNode` (required) — The target element which the Popconfirm will be attached to
1879
+ - `icon: ReactNode` — Customize the icon
1880
+ - `disabled: boolean` = false — Whether to show the popconfirm
1881
+ - **Popover** — Contextual overlay
1882
+ - `children: ReactNode` (required) — Popover parts (PopoverTrigger, PopoverContent, etc.).
1883
+ - `className: string` — Additional CSS class name for the container.
1884
+ - `defaultOpen: boolean` = false — If true, the popover component will manage its own open state.
1885
+ - `open: boolean` — If provided, controls the open state.
1886
+ - `onOpenChange: (open: boolean) => void` — Callback when open state changes.
1887
+ - `placement: Placement` = "bottom-start" — Preferred placement of the popover.
1888
+ - `variant: "default" | "glass"` = "default" — The variant of the popover content.
1889
+ - **Portal** — Out-of-hierarchy render
1890
+ - `children: React.ReactNode` (required) — The content to be rendered in the portal
1891
+ - `container: HTMLElement | null` — The container where the portal will be rendered. Defaults to document.body
1892
+ - **Tooltip** — Information on hover
1893
+ - `children: ReactNode` (required) — Tooltip parts (TooltipTrigger and TooltipContent).
1894
+ - `className: string` — Additional CSS class name for the container.
1895
+ - `delay: number` = 200 — Delay before showing the tooltip in ms.
1896
+ - `open: boolean` — If provided, controls the open state.
1897
+ - `onOpenChange: (open: boolean) => void` — Callback when open state changes.
1898
+ - `placement: Placement` = "top" — Preferred placement of the tooltip.
1899
+ - `variant: "default" | "glass"` = "default" — The variant of the tooltip content.
1900
+
1901
+ ### typography — `import { … } from "wimui/typography"`
1902
+
1903
+ - **Blockquote** — Visually separates external quotes or text to be emphasized.
1904
+ - `asChild: boolean` = false — If true, the blockquote will be rendered as its child, merging its props onto that child.
1905
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Font size of the quote.
1906
+ @default "md"
1907
+ - `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
1908
+ - `content: React.ReactNode` — Quoted content. Alternative to children.
1909
+ - `cite: React.ReactNode` — Source of the quote, rendered in a `<cite>` element.
1910
+ - `border: boolean` = true — Whether to show the left border.
1911
+ @default true
1912
+ - **Code** — Code snippets
1913
+ - `asChild: boolean` = false — If true, the code will be rendered as its child, merging its props onto that child.
1914
+ - `children: React.ReactNode` — Code to display. Ignored when `code` is set (unless asChild is true).
1915
+ - `code: string` — Code string to display. Takes precedence over children.
1916
+ - `block: boolean` = false — If true, renders as a block (`<pre>`) instead of inline.
1917
+ @default false
1918
+ - `language: string` — Language identifier appended as a `language-<lang>` class for syntax highlighters.
1919
+ - **Highlight** — Text highlighting
1920
+ - `children: React.ReactNode` (required) — The full text to highlight substrings in.
1921
+ - `highlight: string | string[]` (required) — Substring(s) to highlight.
1922
+ - `highlightClassName: string` — Custom class name for the highlighted `<mark>` element.
1923
+ - `highlightStyles: React.CSSProperties` — Custom styles for the highlighted `<mark>` element.
1924
+ - `as: React.ElementType` = "span" — The HTML tag or component to use for the container. Default is "span".
1925
+ - `asChild: boolean` = false — If true, the component will be rendered as its child.
1926
+ - **Kbd** — Keyboard shortcuts
1927
+ - `asChild: boolean` = false — If true, the Kbd will be rendered as its child, merging its props onto that child.
1928
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the key cap.
1929
+ @default "md"
1930
+ - `children: React.ReactNode` — Key label(s) to display.
1931
+ - **Label** — Descriptive text for input fields, including required/optional marks
1932
+ - `label: React.ReactNode` (required) — The main label text or element.
1933
+ - `required: boolean` = false — Whether the field is mandatory. If true, displays a required badge.
1934
+ - `requiredLabel: React.ReactNode` — Custom text or element for the required badge.
1935
+ Defaults to the localized `form.required` string.
1936
+ - `showOptional: boolean` = false — Whether to display an optional badge when `required` is false.
1937
+ @default false
1938
+ - `optionalLabel: React.ReactNode` — Custom text or element for the optional badge.
1939
+ Defaults to the localized `form.optional` string.
1940
+ - `className: string` — Additional CSS class name for the container.
1941
+ - `asChild: boolean` = false — If true, the Label will be rendered as its child, merging its props onto that child.
1942
+ - **Legend** — Group title
1943
+ - `label: React.ReactNode` (required) — The main label text or element.
1944
+ - `required: boolean` — Whether the field is mandatory. If true, displays a required badge.
1945
+ - `requiredLabel: React.ReactNode` — Custom text or element for the required badge.
1946
+ Defaults to the localized `form.required` string.
1947
+ - `showOptional: boolean` — Whether to display an optional badge when `required` is false.
1948
+ @default false
1949
+ - `optionalLabel: React.ReactNode` — Custom text or element for the optional badge.
1950
+ Defaults to the localized `form.optional` string.
1951
+ - `className: string` — Additional CSS class name for the container.
1952
+ - `asChild: boolean` = false — If true, the Legend will be rendered as its child, merging its props onto that child.
1953
+ - **Span** — Lightweight wrapper for inline text or short labels with icon support
1954
+ - `asChild: boolean` = false — If true, the span will be rendered as its child, merging its props onto that child.
1955
+ - `size: Extract<ComponentSize, "xs" | "sm" | "md" | "lg" | "xl">` = "md" — Font size of the text.
1956
+ @default "md"
1957
+ - `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
1958
+ - `weight: WimFontWeightKey` = "normal" — Font weight.
1959
+ @default "normal"
1960
+ - `fontStyle: "normal" | "italic"` = "normal" — Font style.
1961
+ @default "normal"
1962
+ - `decoration: "line-through" | "underline" | "highlight" | "none"` = "none" — Visual decoration applied to the text.
1963
+ @default "none"
1964
+ - `content: React.ReactNode` — Content of the span. Alternative to children.
1965
+ - `iconName: React.ComponentProps<typeof Icon>["name"]` = undefined — Name of the icon displayed alongside the text.
1966
+ - `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the text.
1967
+ @default "left"
1968
+ - **Spoiler** — Collapse long text such as reviews and comments to a fixed number of lines, with an accessible "show more" toggle that appears only when the text overflows.
1969
+ - `lines: number` = 3 — Number of text lines shown while collapsed.
1970
+ @default 3
1971
+ - `expanded: boolean` — Controlled expanded state. Use together with onExpandedChange.
1972
+ - `defaultExpanded: boolean` = false — Initial expanded state for uncontrolled usage.
1973
+ @default false
1974
+ - `onExpandedChange: (expanded: boolean) => void` — Called with the next state when the toggle is activated.
1975
+ - `showLabel: React.ReactNode` — Label of the toggle while collapsed.
1976
+ @default t("spoiler.show_more")
1977
+ - `hideLabel: React.ReactNode` — Label of the toggle while expanded.
1978
+ @default t("spoiler.show_less")
1979
+ - **Text** — Has appropriate line-height and spacing to ensure readability of long text.
1980
+ - `asChild: boolean` = false — If true, the text will be rendered as its child, merging its props onto that child.
1981
+ - `size: Extract<ComponentSize, "xs" | "sm" | "md" | "lg" | "xl">` = "md" — Font size of the text.
1982
+ @default "md"
1983
+ - `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
1984
+ - `weight: WimFontWeightKey` = "normal" — Font weight.
1985
+ @default "normal"
1986
+ - `lineHeight: T | (string & {})` — Line height. Accepts a design token name or any CSS line-height value.
1987
+ - `fontStyle: "normal" | "italic"` = "normal" — Font style.
1988
+ @default "normal"
1989
+ - `decoration: "line-through" | "underline" | "highlight" | "none"` = "none" — Visual decoration applied to the text.
1990
+ @default "none"
1991
+ - `content: React.ReactNode` — Content of the text. Alternative to children (children take precedence only with asChild).
1992
+ - **Title** — Possesses visual weight (boldness/size) to indicate page structure.
1993
+ - `asChild: boolean` = false — If true, the heading will be rendered as its child, merging its props onto that child.
1994
+ - `tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"` = "h1" — The semantic HTML tag to use.
1995
+ - `size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"` = "xl" — The visual size of the title.
1996
+ - `color: T | (string & {})` — Text color.
1997
+ - `align: "left" | "center" | "right"` = "left" — Text alignment.
1998
+ - `decoration: "underline" | "highlight" | "none"` = "none" — Visual decoration applied to the heading text.
1999
+ @default "none"
2000
+ - `children: React.ReactNode` (required) — The heading content.
2001
+
2002
+ ### media — `import { … } from "wimui/media"`
2003
+
2004
+ - **Audio** — Audio playback
2005
+ - `src: string | string[] | AudioTrack | AudioTrack[]` — Source: a URL, list of URLs, or track object(s)
2006
+ - `autoPlay: boolean` = false — Whether to start playing automatically
2007
+ - `loop: boolean` = false — Whether to loop playback
2008
+ - `muted: boolean` = false — Whether to start muted
2009
+ - `controls: boolean` = true — Whether to show playback controls
2010
+ - `preload: "auto" | "metadata" | "none"` — Preload behavior
2011
+ - `radius: "none" | "sm" | "md" | "lg" | "full"` = "none" — Corner radius size
2012
+ - `shadow: boolean` = false — Whether to show a shadow
2013
+ - `border: boolean` = false — Whether to show a border
2014
+ - `caption: React.ReactNode` — Caption shown below the player
2015
+ - `customControls: boolean` = false — Whether to use the custom control bar instead of native controls
2016
+ - `visualizer: boolean` = false — Whether to show the audio visualizer
2017
+ - `showMetadata: boolean` = false — Whether to show track metadata (title, artist, cover art)
2018
+ - `fadeIn: boolean | number` = false — Whether to fade in when playback starts (or the duration in seconds)
2019
+ - `fadeOut: boolean | number` = false — Whether to fade out when playback ends (or the duration in seconds)
2020
+ - `crossfade: boolean | number` = false — Whether to crossfade between tracks (or the duration in seconds)
2021
+ - `playbackRate: boolean` = false — Whether to show the playback-rate control
2022
+ - `hotkeys: boolean` = false — Whether to enable keyboard hotkeys
2023
+ - `presets: boolean` = false — Whether to show equalizer presets
2024
+ - `sleepTimer: boolean` = false — Whether to show the sleep timer
2025
+ - `loading: "eager" | "lazy"` = "lazy" — Loading behavior. With "lazy", an Intersection Observer is enabled.
2026
+ - `demoDelay: number` — Demo only: milliseconds to intentionally delay load completion
2027
+ - `labels: { seek?: string; mute?: string; unmute?: string; volume?: string; play?: string; pause?: string; next?: string; prev?: string; repeatMode0?: string; // Off repeatMode1?: string; // One repeatMode2?: string; // All shuffle?: string; playbackSpeed?: string; bassBoost?: string; sleepTimer?: string; unknownTitle?: string; unknownArtist?: string; }` = {} — Labels for manual translation
2028
+ - `tracks: React.ComponentPropsWithoutRef<"track">[]` — Subtitle/caption tracks passed as <track> elements (kind, src, srcLang, label).
2029
+ - **Gallery** — Displays a responsive image grid with configurable columns, aspect ratios, multi-select, and an optional lightbox.
2030
+ - `items: GalleryItem[]` (required) — Images to display in the gallery
2031
+ - `columns: number` = 3 — Number of grid columns. Default: 3.
2032
+ - `gap: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Gap between items. Default: "md".
2033
+ - `aspect: "square" | "landscape" | "portrait" | "auto"` = "square" — Aspect ratio for each image. Default: "square".
2034
+ - `selectable: boolean` = false — Enable multi-select with checkboxes.
2035
+ - `selected: string[]` — Controlled selected IDs.
2036
+ - `defaultSelected: string[]` = [] — Uncontrolled initial selected IDs.
2037
+ - `onSelectionChange: (ids: string[]) => void` — Called when selection changes.
2038
+ - `onItemClick: (item: GalleryItem, index: number) => void` — Called when an item is clicked (outside checkbox).
2039
+ - `renderActions: (params: { selectedIds: string[]; clearSelection: () => void; }) => React.ReactNode` — Render bulk-action toolbar when items are selected.
2040
+ - **Icon** — Visual symbols
2041
+ - `name: keyof typeof ALL_ICONS` — Icon name. Requires `import "wimui/icons"` once at the app entry to register icons.
2042
+ - `component: React.ComponentType<React.SVGProps<SVGSVGElement>>` — Icon component passed directly. Works without registration and is tree-shakable.
2043
+ - `size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl"` = "md" — Size of the icon
2044
+ - `spin: boolean` — Apply the loading rotation animation
2045
+ - `color: "danger" | "success" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "disabled"` — Semantic color of the icon
2046
+ - **Image** — Image content
2047
+ - `src: string` (required) — Source URL of the image
2048
+ - `alt: string` (required) — Alternative text for the image
2049
+ - `width: string | number` — Width of the image
2050
+ - `height: string | number` — Height of the image
2051
+ - `radius: "none" | "sm" | "md" | "lg" | "full"` = "none" — Corner radius size
2052
+ - `shadow: boolean` = false — Whether to show a shadow
2053
+ - `border: boolean` = false — Whether to show a border
2054
+ - `fit: "contain" | "cover" | "fill" | "none" | "scale-down"` = "cover" — How the image fits its box
2055
+ - `loading: "eager" | "lazy"` — Lazy-loading behavior
2056
+ - `caption: string` — Caption shown below the image
2057
+ - `filter: ImageFilterOptions` — Filter applied to the image itself
2058
+ - `hoverFilter: ImageFilterOptions` — Filter applied on hover (when omitted, `filter` is kept)
2059
+ - `backdropFilter: ImageFilterOptions` — Filter applied to the background (effective with transparent images)
2060
+ - `hoverBackdropFilter: ImageFilterOptions` — Filter applied to the background on hover
2061
+ - `transition: "none" | "fast" | "normal" | "slow"` = "normal" — Animation speed when switching filters
2062
+ - `noise: ComponentSize | "none"` — Intensity of the film-grain (noise) effect
2063
+ - `duotone: ImageDuotoneOptions` — Duotone settings
2064
+ - `overlay: ImageOverlayOptions` — Overlay settings
2065
+ - `zoom: boolean | number` = false — Zoom factor on hover (e.g. 1.1) or true (defaults to 1.05)
2066
+ - `tilt: boolean` = false — Tilt effect that follows the mouse
2067
+ - `fadeIn: boolean` = false — Whether to fade in when loading completes
2068
+ - `blendMode: React.CSSProperties["mixBlendMode"]` — Blend mode of the image itself
2069
+ - `bgColor: string` — Background color used for blending
2070
+ - `demoDelay: number` — Demo only: milliseconds to intentionally delay load completion
2071
+ - `priority: boolean` = false — Whether to raise loading priority (e.g. an LCP candidate; sets fetchpriority="high")
2072
+ - `fallback: React.ReactNode` — Custom element shown when loading fails
2073
+ - **ImageCompare** — ImageCompare overlays two images and reveals them with a draggable divider — a before/after slider for comparing edits, restorations, or AI-generated results against their source.
2074
+ - `before: string` (required) — Source URL of the "before" image (revealed on the leading side)
2075
+ - `after: string` (required) — Source URL of the "after" image (revealed on the trailing side)
2076
+ - `beforeAlt: string` = "" — Alternative text for the before image
2077
+ - `afterAlt: string` = "" — Alternative text for the after image
2078
+ - `beforeLabel: React.ReactNode` — Badge label overlaid on the before side
2079
+ - `afterLabel: React.ReactNode` — Badge label overlaid on the after side
2080
+ - `defaultPosition: number` = 50 — Initial divider position as a percentage 0–100 (uncontrolled)
2081
+ - `position: number` — Divider position as a percentage 0–100 (controlled)
2082
+ - `onPositionChange: (position: number) => void` — Callback when the divider position changes
2083
+ - `orientation: "horizontal" | "vertical"` = "horizontal" — Direction the divider slides along
2084
+ - `width: string | number` — Width of the component
2085
+ - `height: string | number` — Height of the component
2086
+ - `radius: "none" | "sm" | "md" | "lg" | "full"` = "md" — Corner radius size
2087
+ - `labels: { /** Accessible label for the drag handle */ handleAriaLabel?: string; }` — Labels for internationalization
2088
+ - `className: string` — Additional class names
2089
+ - **Lightbox** — A high-quality overlay component for displaying images and media with gallery and zoom functionality.
2090
+ - `children: React.ReactNode` (required) — Lightbox parts (Lightbox.Trigger, Lightbox.Content, etc.)
2091
+ - `open: boolean` — Controlled open state
2092
+ - `onOpenChange: (open: boolean) => void` — Callback when the open state changes
2093
+ - `defaultOpen: boolean` = false — Initial open state for uncontrolled usage
2094
+ - `defaultIndex: number` = 0 — Index of the item shown first
2095
+ - **Video** — A component for embedding and controlling local or remote video content
2096
+ - `src: string` — Source URL of the video
2097
+ - `width: string | number` — Width of the video
2098
+ - `height: string | number` — Height of the video
2099
+ - `autoPlay: boolean` = false — Whether to start playing automatically
2100
+ - `loop: boolean` = false — Whether to loop playback
2101
+ - `muted: boolean` = false — Whether to start muted
2102
+ - `controls: boolean` = true — Whether to show playback controls
2103
+ - `poster: string` — Poster image shown before playback
2104
+ - `radius: "none" | "sm" | "md" | "lg" | "full"` = "none" — Corner radius size
2105
+ - `shadow: boolean` = false — Whether to show a shadow
2106
+ - `border: boolean` = false — Whether to show a border
2107
+ - `fit: "contain" | "cover" | "fill" | "none" | "scale-down"` = "cover" — How the video fits its box
2108
+ - `preload: "auto" | "metadata" | "none"` — Preload behavior
2109
+ - `caption: React.ReactNode` — Caption shown below the video
2110
+ - `customControls: boolean` = false — Whether to use the custom control bar instead of native controls
2111
+ - `advancedControls: boolean` = false — Whether to enable advanced controls (quality, playback rate, etc.)
2112
+ - `videoId: string` — Unique ID used to persist and resume playback position
2113
+ - `resumePlayback: boolean` = false — Whether to resume playback from the last saved position
2114
+ - `playlist: { src: string; title?: string; poster?: string }[]` — Playlist of videos to play in sequence
2115
+ - `autoPlayNext: boolean` = false — Whether to automatically play the next playlist item
2116
+ - `qualities: { label: string; src: string }[]` — Selectable quality sources
2117
+ - `loading: "eager" | "lazy"` = "lazy" — Loading behavior. With "lazy", an Intersection Observer is enabled.
2118
+ - `fadeIn: boolean` = false — Whether to fade in when loading completes
2119
+ - `demoDelay: number` — Demo only: milliseconds to intentionally delay load completion
2120
+ - `labels: { playlist?: string; skipBackward?: string; skipForward?: string; play?: string; pause?: string; nextTrack?: string; seek?: string; mute?: string; unmute?: string; volume?: string; settings?: string; pip?: string; fullscreen?: string; exitFullscreen?: string; quality?: string; playbackRate?: string; aspectRatio?: string; standard?: string; back?: string; auto?: string; fit?: string; fill?: string; contain?: string; cover?: string; scaleDown?: string; none?: string; videoAriaLabel?: string; seconds?: string; // e.g. "seconds" or "秒" }` = {} — Labels for manual translation
2121
+ - `tracks: React.ComponentPropsWithoutRef<"track">[]` — Subtitle/caption tracks passed as <track> elements (kind, src, srcLang, label).
2122
+
2123
+ ### charts — `import { … } from "wimui/charts"`
2124
+
2125
+ - **AreaChart** — Area charts
2126
+ - `data: ChartDataPoint[]` (required) — Data to display in the chart.
2127
+ - `keys: string[]` (required) — Keys in the data objects to render as areas (series).
2128
+ - `xAxisKey: string` (required) — The key in the data objects used for the X axis labels.
2129
+ - `stacked: boolean` = false — If true, series are stacked on top of each other.
2130
+ @default false
2131
+ - `height: number` = 300 — The height of the chart in pixels.
2132
+ @default 300
2133
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2134
+ @default "100%"
2135
+ - `title: string` — Optional title displayed above the chart.
2136
+ - `smooth: boolean` = true — If true, draws smooth (monotone) curves instead of straight lines.
2137
+ @default true
2138
+ - `animated: boolean` = false — If true, animates the chart on mount.
2139
+ @default false
2140
+ - **BarChart** — Bar charts
2141
+ - `data: ChartDataPoint[]` (required) — Data to display in the chart.
2142
+ - `keys: string[]` (required) — Keys in the data objects to render as bars (series).
2143
+ - `xAxisKey: string` (required) — The key in the data objects used for the X axis labels.
2144
+ - `stacked: boolean` = false — If true, series are stacked on top of each other.
2145
+ @default false
2146
+ - `height: number` = 300 — The height of the chart in pixels.
2147
+ @default 300
2148
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2149
+ @default "100%"
2150
+ - `title: string` — Optional title displayed above the chart.
2151
+ - `animated: boolean` = false — If true, animates the chart on mount.
2152
+ @default false
2153
+ - **FunnelChart** — Process stage abandonment chart
2154
+ - `data: ChartDataPoint[]` (required) — Data to display in the chart. Each entry represents one funnel stage.
2155
+ - `dataKey: string` (required) — The key in the data objects that represents the value of each stage.
2156
+ - `nameKey: string` (required) — The key in the data objects used for the stage labels.
2157
+ - `height: number` = 300 — The height of the chart in pixels.
2158
+ @default 300
2159
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2160
+ @default "100%"
2161
+ - `title: string` — Optional title displayed above the chart.
2162
+ - `animated: boolean` = false — If true, animates the chart on mount.
2163
+ @default false
2164
+ - **GanttChart** — Project schedule and timeline visualization
2165
+ - `tasks: GanttTask[]` (required) — Tasks to render as bars in the chart.
2166
+ - `startDate: Date` — Start of the visible date range. Defaults to the earliest task start date.
2167
+ - `endDate: Date` — End of the visible date range. Defaults to the latest task end date.
2168
+ - `viewMode: "day" | "week" | "month"` = "day" — Granularity of the time axis.
2169
+ @default "day"
2170
+ - `columnWidth: number` — Width of one time column in pixels. Defaults to a value suited to the view mode.
2171
+ - `rowHeight: number` = 40 — Height of one task row in pixels.
2172
+ @default 40
2173
+ - `onTaskClick: (task: GanttTask) => void` — Called when a task bar is clicked.
2174
+ - `className: string` — Additional CSS class name for the container.
2175
+ - `labels: { ariaChart?: string; ariaTaskBar?: (label: string, start: string, end: string) => string; }` — Labels for manual translation overrides.
2176
+ - **GaugeChart** — KPI goal achievement chart
2177
+ - `value: number` (required) — Current value displayed by the gauge. Clamped between min and max.
2178
+ - `min: number` = 0 — Minimum value of the gauge.
2179
+ @default 0
2180
+ - `max: number` = 100 — Maximum value of the gauge.
2181
+ @default 100
2182
+ - `height: number` = 200 — The height of the chart in pixels.
2183
+ @default 200
2184
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2185
+ @default "100%"
2186
+ - `title: string` — Optional title displayed above the chart.
2187
+ - `label: string` — Text label displayed with the value inside the gauge.
2188
+ - `color: string` — Color of the gauge arc. Defaults to the first chart color.
2189
+ - `animated: boolean` = false — If true, animates the chart on mount.
2190
+ @default false
2191
+ - **Heatmap** — Graphical representation of data where individual values are contained in a matrix as colors.
2192
+ - `data: { x: string; y: string; value: number }[]` (required) — Cells to display. Each entry maps an x/y category pair to a value.
2193
+ - `xAxisKey: string[]` (required) — Ordered list of X axis category labels.
2194
+ - `yAxisKey: string[]` (required) — Ordered list of Y axis category labels.
2195
+ - `height: number` = 300 — The height of the chart in pixels.
2196
+ @default 300
2197
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2198
+ @default "100%"
2199
+ - `title: string` — Optional title displayed above the chart.
2200
+ - `colorRange: [string, string]` = ["var(--wim-color-surface-variant)", "var(--wim-color-primary)"] — Colors used for the lowest and highest values.
2201
+ @default ["var(--wim-color-surface-variant)", "var(--wim-color-primary)"]
2202
+ - `animated: boolean` = false — Whether to animate the cells on mount.
2203
+ @default false
2204
+ - **LineChart** — Line charts
2205
+ - `data: ChartDataPoint[]` (required) — Data to display in the chart.
2206
+ - `keys: string[]` (required) — Keys in the data objects to render as lines (series).
2207
+ - `xAxisKey: string` (required) — The key in the data objects used for the X axis labels.
2208
+ - `height: number` = 300 — The height of the chart in pixels.
2209
+ @default 300
2210
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2211
+ @default "100%"
2212
+ - `title: string` — Optional title displayed above the chart.
2213
+ - `smooth: boolean` = false — If true, draws smooth (monotone) curves instead of straight lines.
2214
+ @default false
2215
+ - `animated: boolean` = false — If true, animates the chart on mount.
2216
+ @default false
2217
+ - **PieChart** — Proportional parts of a whole chart
2218
+ - `data: { name: string; value: number }[]` (required) — Slices to display. Each entry has a name (label) and a value.
2219
+ - `height: number` = 300 — The height of the chart in pixels.
2220
+ @default 300
2221
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2222
+ @default "100%"
2223
+ - `title: string` — Optional title displayed above the chart.
2224
+ - `donut: boolean` = false — If true, renders as a donut chart with a hollow center.
2225
+ @default false
2226
+ - `animated: boolean` = false — If true, animates the chart on mount.
2227
+ @default false
2228
+ - **RadarChart** — Multivariate data on concentric axes chart
2229
+ - `data: ChartDataPoint[]` (required) — Data to display in the chart.
2230
+ - `keys: string[]` (required) — Keys in the data objects to render as radar areas (series).
2231
+ - `indexKey: string` (required) — The key in the data objects used for the axis (category) labels.
2232
+ - `height: number` = 300 — The height of the chart in pixels.
2233
+ @default 300
2234
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2235
+ @default "100%"
2236
+ - `title: string` — Optional title displayed above the chart.
2237
+ - `animated: boolean` = false — If true, animates the chart on mount.
2238
+ @default false
2239
+ - **ScatterChart** — Scatter plots
2240
+ - `data: { x: number; y: number; z?: number; name: string }[]` (required) — Points to plot. `z` optionally controls the point size.
2241
+ - `xAxisName: string` = "X" — Name of the X axis, shown in the tooltip.
2242
+ @default "X"
2243
+ - `yAxisName: string` = "Y" — Name of the Y axis, shown in the tooltip.
2244
+ @default "Y"
2245
+ - `height: number` = 300 — The height of the chart in pixels.
2246
+ @default 300
2247
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2248
+ @default "100%"
2249
+ - `title: string` — Optional title displayed above the chart.
2250
+ - `animated: boolean` = false — If true, animates the chart on mount.
2251
+ @default false
2252
+ - **Sparkline** — Tiny inline trend chart
2253
+ - `data: number[]` (required) — Sequence of values to plot, in order
2254
+ - `type: "line" | "area" | "bar"` = "line" — Visual form of the sparkline
2255
+ - `width: number | string` = 100 — Width of the sparkline (number in px, or a CSS value such as "100%")
2256
+ - `height: number` = 24 — Height of the sparkline in px
2257
+ - `color: string` = "var(--wim-color-primary)" — Stroke/fill color (defaults to the primary chart color)
2258
+ - `strokeWidth: number` = 2 — Stroke width for line and area types
2259
+ - `showLastDot: boolean` = false — Whether to emphasize the last data point with a dot (line and area only)
2260
+ - `min: number` — Lower bound of the y-axis domain (defaults to the data minimum)
2261
+ - `max: number` — Upper bound of the y-axis domain (defaults to the data maximum)
2262
+ - `ariaLabel: string` — Accessible label describing the trend; when omitted the sparkline is hidden from assistive tech
2263
+ - `className: string` — Additional class names
2264
+ - **Treemap** — Hierarchical data area-based display
2265
+ - `data: ChartDataPoint[]` (required) — Data to display in the treemap.
2266
+ - `dataKey: string` (required) — The key in the data objects that represents the size of the rectangle.
2267
+ - `aspectRatio: number` = 4 / 3 — The aspect ratio of the rectangles.
2268
+ @default 4/3
2269
+ - `height: number` = 300 — The height of the chart in pixels.
2270
+ @default 300
2271
+ - `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500).
2272
+ @default "100%"
2273
+ - `title: string` — Optional title displayed above the chart.
2274
+
2275
+ ### ai — `import { … } from "wimui/ai"`
2276
+
2277
+ - **AgentStatus** — Real-time agent state indicator (thinking / running / waiting)
2278
+ - `status: "idle" | "thinking" | "running" | "waiting" | "done" | "error"` (required) — Current state of the agent
2279
+ - `message: string` — Optional description of what the agent is doing; falls back to the localized status label
2280
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size variant
2281
+ - `showLabel: boolean` = true — Whether to show the text label next to the indicator
2282
+ - `className: string` — Additional CSS class
2283
+ - **AIResponseFeedback** — Thumbs-up/down feedback controls and regenerate button for AI responses.
2284
+ - `feedback: AIFeedbackValue | null` — Currently selected feedback value (controlled)
2285
+ - `defaultFeedback: AIFeedbackValue | null` = null — Default feedback value (uncontrolled)
2286
+ - `onFeedback: (value: AIFeedbackValue | null) => void` — Called when user clicks a feedback button. Passes null when deselected.
2287
+ - `showRegenerate: boolean` = false — Whether to show the regenerate button
2288
+ - `onRegenerate: () => void` — Called when the regenerate button is clicked
2289
+ - `disabled: boolean` = false — Whether all buttons are disabled
2290
+ - **ArtifactsOverlay** — ArtifactsOverlay is a specialized side-panel for displaying large AI-generated content (Artifacts) without interrupting the main chat context.
2291
+ - `open: boolean` (required) — Whether the overlay is open
2292
+ - `onOpenChange: (open: boolean) => void` (required) — Callback when open state changes
2293
+ - `title: string` (required) — Title of the artifact
2294
+ - `subtitle: string` — Subtitle or version info
2295
+ - `children: React.ReactNode` (required) — Main content
2296
+ - `showFullscreenToggle: boolean` = false — Whether to show a full-screen toggle (default: false)
2297
+ - `className: string` — Additional CSS class
2298
+ - **ChatUI** — A comprehensive set of components for building chat interfaces with support for messages, avatars, timestamps, and interactive input.
2299
+ - **CodeBlock** — Syntax-highlighted code block with copy button, line numbers, and collapsible overflow.
2300
+ - `code: string` (required) — The code string to display
2301
+ - `language: string` — Programming language label shown in the header (e.g. "tsx", "bash")
2302
+ - `filename: string` — Optional filename shown in the header instead of the language label
2303
+ - `showCopy: boolean` = true — Whether to show the copy-to-clipboard button (default: true)
2304
+ - `showLineNumbers: boolean` = false — Whether to show line numbers (default: false)
2305
+ - `maxLines: number` — Maximum visible height before the block becomes scrollable.
2306
+ Pass a CSS value (e.g. "300px") or a number of lines (e.g. 20).
2307
+ When set, an expand/collapse toggle is shown.
2308
+ - `className: string` — Additional CSS class
2309
+ - **CodeDiffViewer** — Displays code changes as a side-by-side or unified diff, with line-level highlighting and Apply/Reject actions.
2310
+ - `before: string` (required) — Code before the change
2311
+ - `after: string` (required) — Code after the change
2312
+ - `language: string` — Language label shown in header
2313
+ - `filename: string` — Filename shown in header (takes precedence over language)
2314
+ - `view: "split" | "unified"` = "split" — Display mode
2315
+ - `onApply: () => void` — Called when user clicks Apply
2316
+ - `onReject: () => void` — Called when user clicks Reject
2317
+ - `className: string` — Additional CSS class
2318
+ - `isApplying: boolean` = false — Whether the change is currently being applied
2319
+ - `isApplied: boolean` = false — Whether the change has been successfully applied
2320
+ - **InteractiveGraph** — InteractiveGraph provides a canvas for visualizing node-based data. Ideal for RAG knowledge bases, agent workflows, or state machines.
2321
+ - `nodes: Node[]` (required) — Initial nodes
2322
+ - `edges: Edge[]` (required) — Initial edges
2323
+ - `height: string | number` — Height of the container
2324
+ - `width: string | number` — Width of the container
2325
+ - `className: string` — Additional CSS class
2326
+ - `showGrid: boolean` — Whether to show the background grid
2327
+ - `showMiniMap: boolean` — Whether to show the minimap
2328
+ - `showControls: boolean` — Whether to show controls
2329
+ - **MarkdownRenderer** — MarkdownRenderer converts a markdown string into WIM UI components. It uses react-markdown under the hood and applies WIM's typography system.
2330
+ - `content: string` (required) — The markdown string to render
2331
+ - `className: string` — Additional CSS class for the root element
2332
+ - `withAnchors: boolean` — Whether to render titles with anchor links (default: false)
2333
+ - **ModelSelector** — ModelSelector is a dropdown for switching between AI models, surfacing the metadata that matters when choosing one — context window size and per-token pricing.
2334
+ - `models: ModelOption[]` (required) — List of selectable models
2335
+ - `value: string` — Selected model id (controlled)
2336
+ - `defaultValue: string` — Initially selected model id (uncontrolled)
2337
+ - `onChange: (id: string, model: ModelOption) => void` — Callback when the selected model changes
2338
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the trigger
2339
+ - `disabled: boolean` = false — Whether the selector is disabled
2340
+ - `fullWidth: boolean` = false — Whether to take full width of parent
2341
+ - `showPricing: boolean` = true — Whether to show pricing metadata in the dropdown
2342
+ - `showContext: boolean` = true — Whether to show the context-length metadata in the dropdown
2343
+ - `labels: { /** Placeholder shown when nothing is selected */ placeholder?: string; /** Prefix for the context-length meta (default "Context") */ contextLabel?: string; /** Prefix for the input price meta (default "In") */ inputLabel?: string; /** Prefix for the output price meta (default "Out") */ outputLabel?: string; /** Suffix appended to prices (default "/1M") */ perTokensLabel?: string; /** Accessible label for the trigger button */ triggerAriaLabel?: string; }` — Labels for internationalization
2344
+ - `className: string` — Additional class names
2345
+ - **PromptInput** — Auto-resizing prompt input with send and attachment actions
2346
+ - `value: string` — Current text value (controlled)
2347
+ - `defaultValue: string` = "" — Default value (uncontrolled)
2348
+ - `onChange: (value: string) => void` — Callback when value changes
2349
+ - `onSubmit: (value: string) => void` — Callback when user submits (Enter or button click)
2350
+ - `placeholder: string` — Placeholder text
2351
+ - `maxLength: number` — Maximum number of characters
2352
+ - `disabled: boolean` = false — Whether the input is disabled
2353
+ - `loading: boolean` = false — Whether the input is in a loading state
2354
+ - `showAttach: boolean` = false — Whether to show the attachment button
2355
+ - `onAttach: () => void` — Callback when attachment button is clicked
2356
+ - `maxRows: number` = 8 — Maximum number of rows to show before scrolling
2357
+ - `fullWidth: boolean` = false — Whether the input should take up the full width of its container
2358
+ - `className: string` — Additional CSS class
2359
+ - `label: React.ReactNode` — Label for the field
2360
+ - `error: string` — Error message
2361
+ - `required: boolean` — Whether the field is required
2362
+ - `layout: "vertical" | "horizontal"` — Layout of the field
2363
+ - **SourceCitation** — Displays cited sources with title, domain, and external link for AI-generated content.
2364
+ - `title: string` (required) — Title of the source
2365
+ - `url: string` — Source URL. When provided, renders as a clickable link.
2366
+ - `description: string` — Brief excerpt or description of the source
2367
+ - `index: number` — Numeric citation index shown as a badge (e.g. 1, 2, 3)
2368
+ - `domain: string` — Domain label shown below the title (auto-derived from url when omitted)
2369
+ - `className: string` — Additional CSS class
2370
+ - **StreamingText** — Streaming Markdown renderer for AI-generated responses
2371
+ - `content: string` (required) — The markdown text content to render
2372
+ - `isStreaming: boolean` = false — When true, a blinking cursor is shown at the end of the content
2373
+ - `components: Components` — Override the default markdown component renderers
2374
+ - `className: string` — Additional CSS class
2375
+ - **Terminal** — Renders terminal-style output with ANSI color support, prompt prefixes, and copy/clear controls.
2376
+ - `lines: TerminalLine[]` = [] — Lines to display
2377
+ - `title: string` — Window title shown in header bar
2378
+ - `height: string | number` — Explicit height; omit to let the terminal grow with content
2379
+ - `autoScroll: boolean` = true — Scroll to bottom when lines change
2380
+ - `prompt: string` = "$" — Prompt prefix for input lines
2381
+ - `showCopy: boolean` = true — Whether to show the copy button
2382
+ - `onClear: () => void` — Whether to show the clear button; fires onClear when clicked
2383
+ - `className: string` — Additional CSS class
2384
+ - **ThoughtProcess** — Visualizes AI reasoning steps and execution states in a timeline format.
2385
+ - `children: React.ReactNode` (required) — Reasoning steps to display (typically ThoughtStep elements)
2386
+ - `title: string` = "Thinking Process" — Header title
2387
+ - `className: string` — Additional CSS class
2388
+ - `isCollapsible: boolean` = true — Whether the body can be collapsed
2389
+ - `defaultExpanded: boolean` = true — Initial expanded state (only relevant when isCollapsible is true)
2390
+ - `isThinking: boolean` = false — Whether the AI is currently thinking (shows a pulsating background)
2391
+ - **ThreadList** — ThreadList renders a conversation-history sidebar for AI chat apps — a scrollable list of past threads with an optional new-conversation action and per-thread deletion.
2392
+ - `threads: Thread[]` (required) — Conversations to display, ordered newest first
2393
+ - `activeId: string` — Id of the currently active thread
2394
+ - `onSelect: (id: string) => void` — Callback when a thread is selected
2395
+ - `onDelete: (id: string) => void` — Callback when a thread's delete button is clicked (shows the button when set)
2396
+ - `onNewThread: () => void` — Callback when the new-conversation button is clicked (shows the button when set)
2397
+ - `labels: { /** Label of the new-conversation button */ newThread?: string; /** Text shown when there are no threads */ empty?: string; /** Accessible label for each delete button */ delete?: string; /** Accessible label for the list */ listAriaLabel?: string; }` — Labels for internationalization
2398
+ - `className: string` — Additional class names
2399
+ - **UsageMeter** — UsageMeter (also exported as TokenCounter) visualizes token consumption against a budget such as a model's context window — a labeled bar plus a numeric readout that shifts to warning and danger colors near the limit.
2400
+ - `used: number` (required) — Number of tokens used so far
2401
+ - `max: number` — Maximum available tokens (e.g. the context window). Omit for a counter-only display.
2402
+ - `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the meter
2403
+ - `showBar: boolean` = true — Whether to render the progress bar (requires `max`)
2404
+ - `showPercentage: boolean` = false — Whether to show the percentage instead of the raw count in the readout
2405
+ - `warnThreshold: number` = 0.75 — Fraction (0–1) at which the meter turns to the warning color
2406
+ - `dangerThreshold: number` = 0.9 — Fraction (0–1) at which the meter turns to the danger color
2407
+ - `labels: { /** Leading label (default "Tokens") */ label?: string; /** Unit appended to the raw counts (default "tokens") */ unit?: string; /** Accessible label describing the meter */ ariaLabel?: string; }` — Labels for internationalization
2408
+ - `className: string` — Additional class names
2409
+ - **VoiceVisualizer** — Animated voice-level indicator (bars / waveform)
2410
+ - `mode: "bars" | "waveform"` = "bars" — Visualization style
2411
+ - `data: unknown` — Normalized amplitude values (0–1) per slot.
2412
+ When omitted, a looping idle animation plays.
2413
+ For bars: one value per bar. For waveform: time-domain samples.
2414
+ - `isActive: boolean` = true — Whether the component is in an active (recording/playing) state
2415
+ - `barCount: number` = 24 — Number of bars — bars mode only (default 24)
2416
+ - `height: number` = 40 — Rendered height in pixels (default 40)
2417
+ - `className: string` — Additional CSS class
2418
+ - `sentiment: "neutral" | "positive" | "caution" | "negative" | "informative"` = "neutral" — Sentiment context for coloring (default 'neutral')