@wirecore/wirelayer-native 0.2.2 → 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.
package/llms-full.txt ADDED
@@ -0,0 +1,4646 @@
1
+ # WireLayer for React Native (@wirecore/wirelayer-native) – full API
2
+
3
+ > React Native (Expo) components with Uniwind: same prop names and values as the React components where they fit on a phone – pickers open as bottom sheets, touch targets are at least 44 pt, no hover, gestures always with accessibility actions. Forms with TanStack Form via `@wirecore/wirelayer-native/form`; DataTable (no TanStack; table or cards per row) via `@wirecore/wirelayer-native/data-table`; charts drawn with react-native-svg (no Chart.js) via `@wirecore/wirelayer-native/chart`; PdfViewer on react-native-pdf (development build, not Expo Go) via `@wirecore/wirelayer-native/pdf`; CodeHighlight with Shiki via `@wirecore/wirelayer-native/code`; file pickers via `@wirecore/wirelayer-native/expo-document-picker` and `@wirecore/wirelayer-native/expo-image-picker`, `useClipboard` via `@wirecore/wirelayer-native/expo-clipboard`, `shareFile`/`shareUri` (DataTable export, PDFs) via `@wirecore/wirelayer-native/expo-sharing` (optional peer dependencies). Overlays: Dialog, Drawer (from every edge), Menu and ContextMenu as sheets, Popover next to its trigger; `toast()`, `confirm()`, `prompt()` and `openDialog()` need `<Toaster />`, `<ConfirmDialog />` and `<DialogHost />` once at the root.
4
+
5
+
6
+
7
+ ## Components
8
+
9
+ ### Accordion (React Native)
10
+
11
+ Sections that open and close; each heading is a button with aria-expanded
12
+
13
+ - Import: `import { Accordion } from '@wirecore/wirelayer-native'`
14
+ - Category: Layout
15
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-accordion--playground
16
+ - Also takes: ViewProps
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | value? | `string[]` | Open items |
21
+ | defaultValue? | `string[]` | |
22
+ | onValueChange? | `(value: string[]) => void` | |
23
+ | multiple? | `boolean` | Several items open at once |
24
+ | collapsible? | `boolean` | The open item can be closed again (single mode, default true) |
25
+ | className? | `string` | |
26
+ | children? | `ReactNode` | |
27
+
28
+ ### AccordionItem (React Native)
29
+
30
+ One section of an Accordion: a heading with a button (aria-expanded) and its content; own actions beside it
31
+
32
+ - Import: `import { AccordionItem } from '@wirecore/wirelayer-native'`
33
+ - Category: Layout
34
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-accordion--playground
35
+ - Also takes: ViewProps
36
+
37
+ | Prop | Type | Description |
38
+ | --- | --- | --- |
39
+ | value | `string` | |
40
+ | title | `string` | |
41
+ | icon? | `IconComponent` | Icon component before the title |
42
+ | disabled? | `boolean` | |
43
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | Level of the heading around the trigger, to fit the screen outline (default 3) |
44
+ | actions? | `ReactNode` | Own controls next to the heading (e.g. an IconButton) – beside the trigger, not inside it |
45
+ | className? | `string` | |
46
+ | children? | `ReactNode` | |
47
+
48
+ ### ActionBar (React Native)
49
+
50
+ Bar with the actions for selected items (e.g. in a list): the count is announced when it changes
51
+
52
+ - Import: `import { ActionBar } from '@wirecore/wirelayer-native'`
53
+ - Category: Data
54
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-actionbar--playground
55
+ - Also takes: ViewProps
56
+
57
+ | Prop | Type | Description |
58
+ | --- | --- | --- |
59
+ | count | `number` | Number of selected items – the bar shows while it is above 0 |
60
+ | open? | `boolean` | Shows the bar independently of `count` |
61
+ | label? | `string` | Accessible name of the toolbar (default "Actions for the selection") |
62
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
63
+ | placement? | `'fixed' \| 'inline'` | `fixed` (default) floats above the bottom of the screen, `inline` stays in the layout |
64
+ | onClear? | `() => void` | Clears the selection – shows the clear button |
65
+ | className? | `string` | |
66
+ | children? | `ReactNode` | The actions, e.g. Buttons or IconButtons |
67
+
68
+ ### AiLabel (React Native)
69
+
70
+ Marks content made by AI, with an explanation behind an info button
71
+
72
+ - Import: `import { AiLabel } from '@wirecore/wirelayer-native'`
73
+ - Category: Data
74
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-ailabel--playground
75
+ - Also takes: ViewProps
76
+
77
+ | Prop | Type | Description |
78
+ | --- | --- | --- |
79
+ | label? | `string` | Text of the label (default "AI-generated") |
80
+ | explanation? | `ReactNode \| false` | Text behind the (i) button; `false` hides the button |
81
+ | size? | `'sm' \| 'md'` | |
82
+ | className? | `string` | |
83
+ | children? | `ReactNode` | Content of the explanation instead of `explanation` |
84
+
85
+ ### Alert (React Native)
86
+
87
+ Message box with status icon and colour, title and text; announced when it appears (alert for warn/danger, status otherwise)
88
+
89
+ - Import: `import { Alert } from '@wirecore/wirelayer-native'`
90
+ - Category: Feedback
91
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-alert--playground
92
+ - Also takes: ViewProps
93
+
94
+ | Prop | Type | Description |
95
+ | --- | --- | --- |
96
+ | status? | `AlertStatus` | |
97
+ | variant? | `AlertVariant` | `box` (default) or `simple`: only icon and text in the status colour, e.g. for a field error |
98
+ | size? | `'sm' \| 'md'` | |
99
+ | title? | `ReactNode` | |
100
+ | dismissible? | `boolean` | Shows a close button that calls `onDismiss` |
101
+ | dismissLabel? | `string` | Accessible name of the close button |
102
+ | onDismiss? | `() => void` | |
103
+ | duration? | `number` | Calls `onDismiss` after this many milliseconds |
104
+ | children? | `ReactNode` | |
105
+
106
+ ### AppShell (React Native)
107
+
108
+ Frame of an app screen without a router: header with menu button (when there is a navbar), content and an optional bottom bar; the navbar opens as a drawer. Header and footer stay, the content fills the rest.
109
+
110
+ - Import: `import { AppShell } from '@wirecore/wirelayer-native'`
111
+ - Category: Layout
112
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-appshell--playground
113
+ - Also takes: ViewProps
114
+
115
+ | Prop | Type | Description |
116
+ | --- | --- | --- |
117
+ | header? | `ReactNode` | Content of the header bar, e.g. the title and actions |
118
+ | navbar? | `ReactNode` | The navigation (e.g. a SidebarNav) – in a drawer from the left behind the menu button of the header |
119
+ | footer? | `ReactNode` | Bar at the bottom, e.g. a BottomNavigation with `inline` |
120
+ | navbarOpen? | `boolean` | |
121
+ | onNavbarOpenChange? | `(open: boolean) => void` | |
122
+ | navbarLabel? | `string` | Title of the navigation drawer (default "Navigation") |
123
+ | className? | `string` | |
124
+ | children | `ReactNode` | The screen's content (wrap it in a ScrollView when it scrolls) |
125
+
126
+ ### AspectRatio (React Native)
127
+
128
+ Keeps the ratio of width and height, e.g. for images, videos and maps
129
+
130
+ - Import: `import { AspectRatio } from '@wirecore/wirelayer-native'`
131
+ - Category: Layout
132
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-aspectratio--playground
133
+ - Also takes: ViewProps
134
+
135
+ | Prop | Type | Description |
136
+ | --- | --- | --- |
137
+ | ratio? | `number` | Width ÷ height (default 16/9) |
138
+ | className? | `string` | |
139
+
140
+ ### Autocomplete (React Native)
141
+
142
+ Free text with suggestions below the field (in the page flow, no overlay): typing filters them, a tap takes one; on the web the arrow keys move and Enter takes the highlighted one. Any other text is allowed, too.
143
+
144
+ - Import: `import { Autocomplete } from '@wirecore/wirelayer-native'`
145
+ - Category: Forms
146
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-autocomplete--playground
147
+
148
+ | Prop | Type | Description |
149
+ | --- | --- | --- |
150
+ | items | `readonly T[]` | Suggestions while typing – any other text is allowed, too; strings or objects (read with itemLabel) |
151
+ | value? | `string` | The text |
152
+ | defaultValue? | `string` | |
153
+ | onValueChange? | `(value: string) => void` | |
154
+ | multiple? | `boolean` | Several entries as chips (a TagsInput with these suggestions) – use values/onValuesChange |
155
+ | values? | `string[]` | The entries with `multiple` |
156
+ | defaultValues? | `string[]` | |
157
+ | onValuesChange? | `(values: string[]) => void` | |
158
+ | max? | `number` | Most entries with `multiple` |
159
+ | filter? | `boolean` | Filters the suggestions by the typed text (ignores case and accents, default true) |
160
+ | manualFilter? | `boolean` | The suggestions are filtered elsewhere (server): no local filtering, listen to onFilterChange |
161
+ | onFilterChange? | `(text: string) => void` | Typed text – e.g. to load matching suggestions from a server (manualFilter) |
162
+ | itemLabel? | `ItemAccessor<T, string>` | Text of a suggestion: property name or function (default: `label`, or the item itself) |
163
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of a suggestion: property name or function (default: `disabled`) |
164
+ | clearable? | `boolean` | Button that clears the text |
165
+ | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
166
+ | loadingText? | `string` | Text of the loading row in the list |
167
+ | size? | `Size` | |
168
+ | hasMore? | `boolean` | More suggestions can be loaded: "Load more" calls onLoadMore |
169
+ | onLoadMore? | `() => void` | |
170
+ | dataSource? | `DataSource<T>` | Loads the suggestions for the typed text (after a typing pause, outdated answers dropped) |
171
+ | minSearchLength? | `number` | Fewest characters typed before the data source is asked |
172
+ | pageSize? | `number` | Suggestions per request of the data source (default 50) |
173
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of a suggestion (instead of its text) |
174
+ | placeholder? | `string` | |
175
+ | invalid? | `boolean` | |
176
+ | disabled? | `boolean` | |
177
+ | aria-label? | `string` | Accessible name without a surrounding Field |
178
+ | className? | `string` | |
179
+
180
+ ### Avatar (React Native)
181
+
182
+ Image, initials (from the name) or an icon – one image named by `name` for screen readers
183
+
184
+ - Import: `import { Avatar } from '@wirecore/wirelayer-native'`
185
+ - Category: Data
186
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-avatar--playground
187
+ - Also takes: Omit<ViewProps, 'children'>
188
+
189
+ | Prop | Type | Description |
190
+ | --- | --- | --- |
191
+ | name? | `string` | Person or organisation – accessible name of the avatar and source of the initials |
192
+ | src? | `string` | Image URL; initials (or the icon) are shown while it loads or if it fails |
193
+ | icon? | `IconComponent` | Icon shown when there is neither an image nor a name (default: user icon) |
194
+ | variant? | `AvatarVariant` | |
195
+ | size? | `AvatarSize` | |
196
+ | shape? | `AvatarShape` | |
197
+ | color? | `AvatarColor \| 'auto'` | Tinted background in a token colour; `auto` picks one from the name, so the same person always gets the same colour |
198
+
199
+ ### Badge (React Native)
200
+
201
+ Small label for a state or count, optionally with an icon or round (`circle`)
202
+
203
+ - Import: `import { Badge } from '@wirecore/wirelayer-native'`
204
+ - Category: Data
205
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-badge--playground
206
+ - Also takes: ViewProps
207
+
208
+ | Prop | Type | Description |
209
+ | --- | --- | --- |
210
+ | variant? | `BadgeVariant` | |
211
+ | icon? | `IconComponent` | Icon component rendered before the text |
212
+ | circle? | `boolean` | Round shape for a count or a single character (grows into a pill for longer content) |
213
+ | children? | `ReactNode` | |
214
+
215
+ ### Banner (React Native)
216
+
217
+ Notice across the screen or above the content, e.g. maintenance or a missing confirmation: the text is a live region (danger: alert, else status). Without `storageKey` of the web – the app remembers the dismissal itself.
218
+
219
+ - Import: `import { Banner } from '@wirecore/wirelayer-native'`
220
+ - Category: Feedback
221
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-banner--playground
222
+ - Also takes: ViewProps
223
+
224
+ | Prop | Type | Description |
225
+ | --- | --- | --- |
226
+ | variant? | `BannerVariant` | |
227
+ | title? | `string` | Bold text before the message |
228
+ | position? | `BannerPosition` | `inline` (default) in the layout, `top`/`bottom` over that edge of the screen |
229
+ | dismissible? | `boolean` | Shows a close button |
230
+ | open? | `boolean` | Controlled visibility |
231
+ | onOpenChange? | `(open: boolean) => void` | |
232
+ | onDismiss? | `() => void` | The close button was pressed – e.g. to remember the dismissal in the app's storage |
233
+ | icon? | `IconComponent` | Own icon component instead of the one of the variant |
234
+ | hideIcon? | `boolean` | |
235
+ | dismissLabel? | `string` | Accessible name of the close button (default "Dismiss notice") |
236
+ | actions? | `ReactNode` | Buttons after the message |
237
+ | className? | `string` | |
238
+ | children? | `ReactNode` | The message |
239
+
240
+ ### BarChart (React Native)
241
+
242
+ Bars per category for one or more series – vertical or horizontal, grouped or stacked – drawn with react-native-svg. An image named by the title and the trend of each series; tapping shows the values of a category, the data list below is the text alternative.
243
+
244
+ - Import: `import { BarChart } from '@wirecore/wirelayer-native/chart'`
245
+ - Category: Data
246
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-barchart--playground
247
+ - Also takes: Omit<ViewProps, 'children'>
248
+
249
+ | Prop | Type | Description |
250
+ | --- | --- | --- |
251
+ | data | `ChartRow[]` | The rows: one object per category with a value per series |
252
+ | categoryKey | `string` | Property of each row with the category (x axis) |
253
+ | series | `ChartSeries[]` | The series: key of the value, label, colour, stack, dashed … (one value axis – `axis: 'end'` and `type` of the web's CompositeChart are not drawn) |
254
+ | title | `string` | Title of the chart, also the start of its accessible name |
255
+ | hideTitle? | `boolean` | Keep the title for screen readers only |
256
+ | height? | `number` | Height of the plot in pt (default 220) |
257
+ | table? | `boolean` | The data as a list below the chart (opens on demand) – the text alternative (default true) |
258
+ | formatValue? | `(value: number) => string` | Formats values in the axis, legend and data list (default: numbers in the locale) |
259
+ | references? | `ChartReference[]` | Reference lines (`value`) and areas (`from`–`to`) on the value axis, or with `axis: 'x'` on the categories (index of the row); also listed as text below the chart |
260
+ | legend? | `boolean` | Legend (default: with more than one series) |
261
+ | className? | `string` | |
262
+ | horizontal? | `boolean` | Bars from the start edge instead of from the bottom |
263
+ | stacked? | `boolean` | Stack all series |
264
+
265
+ ### BarsList (React Native)
266
+
267
+ A list of labels and values; the bars behind the labels show the values as lengths
268
+
269
+ - Import: `import { BarsList } from '@wirecore/wirelayer-native'`
270
+ - Category: Data
271
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-barslist--playground
272
+ - Also takes: Omit<ViewProps, 'children'>
273
+
274
+ | Prop | Type | Description |
275
+ | --- | --- | --- |
276
+ | items | `BarsListItem[]` | |
277
+ | label | `string` | Accessible name of the list (visible with `showTitle`) |
278
+ | showTitle? | `boolean` | |
279
+ | max? | `number` | Value of a full bar (default: the largest value) |
280
+ | tone? | `VisualTone` | Colour of the bars (default primary) |
281
+ | labelHeader? | `string` | Column headings above the list, e.g. "Page" and "Views" |
282
+ | valueHeader? | `string` | |
283
+ | formatValue? | `(value: number) => string` | Formats the values (default: numbers in the locale) |
284
+ | className? | `string` | |
285
+
286
+ ### BottomNavigation (React Native)
287
+
288
+ Tab bar at the bottom of the screen for the main destinations of an app: screen readers hear tabs with the selected one ("Tab, 2 of 4"), badges are part of the name. No router dependency – `onNavigate` navigates.
289
+
290
+ - Import: `import { BottomNavigation } from '@wirecore/wirelayer-native'`
291
+ - Category: Navigation
292
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-bottomnavigation--playground
293
+ - Also takes: ViewProps
294
+
295
+ | Prop | Type | Description |
296
+ | --- | --- | --- |
297
+ | items | `BottomNavigationItem[]` | 3–5 destinations |
298
+ | label? | `string` | Accessible name of the tab bar (default "Navigation") |
299
+ | currentHref? | `string` | href of the current screen |
300
+ | isCurrent? | `(item: BottomNavigationItem) => boolean` | Own check for the current item, e.g. with the router's state |
301
+ | onNavigate? | `(item: BottomNavigationItem) => void` | A tap on a destination – navigate with the app's router |
302
+ | inline? | `boolean` | In the layout instead of docked to the bottom of the screen |
303
+ | bottomInset? | `number` | Space below the items for the home indicator, e.g. `useSafeAreaInsets().bottom` |
304
+ | className? | `string` | |
305
+
306
+ ### Breadcrumb (React Native)
307
+
308
+ Path to the current screen: scrolls sideways (to its end) when it is too long, the middle can collapse into a menu
309
+
310
+ - Import: `import { Breadcrumb } from '@wirecore/wirelayer-native'`
311
+ - Category: Navigation
312
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-breadcrumb--playground
313
+ - Also takes: ViewProps
314
+
315
+ | Prop | Type | Description |
316
+ | --- | --- | --- |
317
+ | items | `BreadcrumbEntry[]` | |
318
+ | label? | `string` | Accessible name (default "Breadcrumb") |
319
+ | onNavigate? | `(item: BreadcrumbEntry) => void` | A tap on an entry with href (also the hidden ones in the "…" menu) |
320
+ | maxItems? | `number` | At most this many entries – the middle ones go into a "…" menu |
321
+ | itemsBeforeCollapse? | `number` | Entries before the "…" (default 1) |
322
+ | itemsAfterCollapse? | `number` | Entries after the "…" (default 1) |
323
+ | moreLabel? | `string` | Accessible name of the "…" button (default "Ausgeblendete Ebenen") |
324
+ | className? | `string` | |
325
+
326
+ ### BulletChart (React Native)
327
+
328
+ A meter (role meter) with the value, the end of the scale and the target as its text
329
+
330
+ - Import: `import { BulletChart } from '@wirecore/wirelayer-native'`
331
+ - Category: Data
332
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-bulletchart--playground
333
+ - Also takes: Omit<ViewProps, 'children'>
334
+
335
+ | Prop | Type | Description |
336
+ | --- | --- | --- |
337
+ | label | `string` | Name of the measure, e.g. "Revenue" – the accessible name |
338
+ | description? | `string` | Smaller text below the name, e.g. the unit |
339
+ | value | `number` | |
340
+ | max | `number` | End of the scale |
341
+ | min? | `number` | Start of the scale (default 0) |
342
+ | target? | `number` | Target value: a marker across the bar |
343
+ | ranges? | `number[]` | Upper limits of the qualitative bands (e.g. poor, fair, good), shown as shades behind the bar |
344
+ | tone? | `VisualTone` | Colour of the bar (default primary) |
345
+ | formatValue? | `(value: number) => string` | Formats the values (default: numbers in the locale) |
346
+ | className? | `string` | |
347
+
348
+ ### Button (React Native)
349
+
350
+ Button with variants and colours, sizes, icons, loading state (busy, still focusable) and an optional counter
351
+
352
+ - Import: `import { Button } from '@wirecore/wirelayer-native'`
353
+ - Category: Buttons
354
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_buttons-button--playground
355
+ - Also takes: Omit<PressableProps, 'children'>
356
+
357
+ | Prop | Type | Description |
358
+ | --- | --- | --- |
359
+ | variant? | `ButtonVariant` | |
360
+ | color? | `ButtonColor` | Colour combined with the variant: with `outline`, `text`, `soft` and `link` it colours that style (e.g. a danger text button), with a filled variant it replaces the fill |
361
+ | size? | `Size` | |
362
+ | shape? | `ButtonShape` | Corner shape: `pill` (default), `rounded` or `square` |
363
+ | block? | `boolean` | Full width of the container |
364
+ | leadingIcon? | `IconComponent` | Icon component rendered before the label |
365
+ | trailingIcon? | `IconComponent` | Icon component rendered after the label |
366
+ | loading? | `boolean` | Shows a spinner and ignores presses; stays focusable (busy, not disabled) |
367
+ | badge? | `number \| boolean` | Counter (number > 0) or dot (true) after the label |
368
+ | badgeLabel? | `(count: string \| null) => string` | Added to the accessible name while a badge is shown, e.g. "Notifications 4 new" (the visible counter stays part of it) |
369
+ | className? | `string` | |
370
+ | children? | `ReactNode` | |
371
+ | ref? | `Ref<ComponentRef<typeof Pressable>>` | |
372
+
373
+ ### ButtonGroup (React Native)
374
+
375
+ Buttons joined into one control (role "group"): only the outer corners stay round, also stacked
376
+
377
+ - Import: `import { ButtonGroup } from '@wirecore/wirelayer-native'`
378
+ - Category: Buttons
379
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_buttons-buttongroup--playground
380
+ - Also takes: ViewProps
381
+
382
+ | Prop | Type | Description |
383
+ | --- | --- | --- |
384
+ | label? | `string` | Accessible name of the group (role "group"), e.g. "View" |
385
+ | orientation? | `'horizontal' \| 'vertical'` | Buttons side by side (default) or stacked |
386
+ | block? | `boolean` | Full width of the container; the buttons share it |
387
+ | children? | `ReactNode` | Button or IconButton elements |
388
+
389
+ ### Calendar (React Native)
390
+
391
+ Month view: the days of the month are a radio group named by the month; every day is named with its weekday and full date. Previous/next switch the month.
392
+
393
+ - Import: `import { Calendar } from '@wirecore/wirelayer-native'`
394
+ - Category: Forms
395
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-calendar--playground
396
+ - Also takes: ViewProps
397
+
398
+ | Prop | Type | Description |
399
+ | --- | --- | --- |
400
+ | min? | `DateLike` | Earliest selectable date (ISO or Date) |
401
+ | max? | `DateLike` | Latest selectable date (ISO or Date) |
402
+ | isDateUnavailable? | `(date: string) => boolean` | Dates that cannot be chosen, e.g. weekends – receives the ISO date |
403
+ | excludeDates? | `DateLike[]` | Single dates that cannot be chosen (holidays, booked days) |
404
+ | showWeekNumbers? | `boolean` | Column with the ISO calendar weeks ("Wk") |
405
+ | showButtonBar? | `boolean` | "Today" and "Clear" below the calendar |
406
+ | highlightToday? | `boolean` | Today is bold and underlined (default true) |
407
+ | hideOutsideDays? | `boolean` | Leaves the days of the previous and next month empty |
408
+ | firstDayOfWeek? | `number` | First day of the week: 0 = Sunday … 6 = Saturday; default from the locale |
409
+ | timeZone? | `string` | IANA zone that decides which day is today |
410
+ | value? | `T \| null` | ISO date, e.g. "2026-10-20" (a Date is accepted too) |
411
+ | defaultValue? | `T \| null` | |
412
+ | onValueChange? | `(value: T \| null) => void` | |
413
+ | valueType? | `DateValueType` | What onValueChange gets: ISO strings (default) or Date objects |
414
+ | defaultMonth? | `string` | Month shown first (ISO) – default: the value or today |
415
+ | allowDeselect? | `boolean` | Choosing the selected day again clears it |
416
+ | className? | `string` | |
417
+
418
+ ### Card (React Native)
419
+
420
+ Surface for grouped content – with title, subtitle, media and footer, or any children; pressable with `onPress`
421
+
422
+ - Import: `import { Card } from '@wirecore/wirelayer-native'`
423
+ - Category: Data
424
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-card--playground
425
+ - Also takes: ViewProps
426
+
427
+ | Prop | Type | Description |
428
+ | --- | --- | --- |
429
+ | onPress? | `PressableProps['onPress']` | Makes the whole card pressable (role "button" unless set otherwise) |
430
+ | title? | `string` | Heading of the card |
431
+ | subtitle? | `string` | Line below the title |
432
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | Level of the title heading – pick the one that fits the screen outline (default 3) |
433
+ | media? | `ReactNode` | Image or video above the content (beside it when horizontal) – reaches the edges of the card |
434
+ | orientation? | `'vertical' \| 'horizontal'` | `horizontal`: media at the start, the content beside it |
435
+ | header? | `ReactNode` | Extra content in the header, after the title (e.g. a Badge or an IconButton) |
436
+ | footer? | `ReactNode` | Actions at the end of the card |
437
+
438
+ ### Carousel (React Native)
439
+
440
+ Slides to swipe through (FlatList with paging): arrow buttons, dots, autoplay with pause (WCAG 2.2.2), the arrow keys on the web. Slides outside the page are hidden from screen readers; iOS and Android announce the new slide.
441
+
442
+ - Import: `import { Carousel } from '@wirecore/wirelayer-native'`
443
+ - Category: Media
444
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_media-carousel--playground
445
+
446
+ | Prop | Type | Description |
447
+ | --- | --- | --- |
448
+ | items | `T[]` | |
449
+ | label | `string` | Accessible name of the carousel |
450
+ | children | `(item: T, index: number) => ReactNode` | Renders one slide |
451
+ | slidesPerPage? | `number` | Slides visible at once (default 1); fractions show part of the next one |
452
+ | slidesToScroll? | `number \| 'auto'` | Slides per step (default a page) |
453
+ | breakpoints? | `CarouselBreakpoint[]` | Settings by the width of the carousel |
454
+ | spacing? | `number \| string` | Space between the slides in pt (default 16) |
455
+ | loop? | `boolean` | After the last page comes the first |
456
+ | autoplay? | `boolean \| { delay: number }` | Turns the pages by itself (default every 4 s) – always with a pause button, not with reduced motion |
457
+ | indicators? | `boolean` | Dots, one per page (default true) |
458
+ | page? | `number` | |
459
+ | defaultPage? | `number` | |
460
+ | onPageChange? | `(page: number) => void` | |
461
+ | className? | `string` | |
462
+
463
+ ### CascadeSelect (React Native)
464
+
465
+ Select with cascading levels: the trigger shows the whole path and opens a sheet with one level at a time – a radio group per level, an option with children opens the next level, "Back" goes up; the path is the subtitle. With `filter` a search lists the hits with their path.
466
+
467
+ - Import: `import { CascadeSelect } from '@wirecore/wirelayer-native'`
468
+ - Category: Forms
469
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-cascadeselect--playground
470
+
471
+ | Prop | Type | Description |
472
+ | --- | --- | --- |
473
+ | items | `CascadeOption<V>[]` | |
474
+ | value? | `V \| null` | Chosen value; any type (see `valueKey`) |
475
+ | defaultValue? | `V \| null` | |
476
+ | onValueChange? | `(value: V \| null) => void` | |
477
+ | placeholder? | `string` | |
478
+ | title? | `string` | Title of the sheet – default: the Field label or the placeholder |
479
+ | separator? | `string` | Separator of the path shown in the field and in the sheet ("Germany › Bavaria › Munich") |
480
+ | disabled? | `boolean` | |
481
+ | invalid? | `boolean` | |
482
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
483
+ | changeOnSelect? | `boolean` | The levels in between can be chosen, too (first entry of each level: "Choose <level>") |
484
+ | filter? | `boolean` | Search field in the sheet: the hits are listed with their whole path |
485
+ | clearable? | `boolean` | Button next to the field that clears the value |
486
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
487
+ | loading? | `boolean` | Shows a spinner in the field (busy) |
488
+ | size? | `'sm' \| 'md' \| 'lg'` | Height of the field: 32, 40 (default) or 48 pt |
489
+ | loadChildren? | `(option: CascadeOption<V>, request: { signal: AbortSignal }) => Promise<CascadeOption<V>[]>` | Loads the options of a level (`hasChildren: true`) when it opens; the signal aborts it |
490
+ | onLoadChildren? | `(option: CascadeOption<V>) => void` | A lazy level opened and there is no loadChildren/dataSource: add its options to the items |
491
+ | dataSource? | `DataSource<CascadeOption<V>>` | Source of the options of lazy levels (`getChildren`) |
492
+ | aria-label? | `string` | Accessible name without a surrounding Field |
493
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
494
+ | className? | `string` | |
495
+
496
+ ### Center (React Native)
497
+
498
+ Centres its content horizontally and vertically
499
+
500
+ - Import: `import { Center } from '@wirecore/wirelayer-native'`
501
+ - Category: Layout
502
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-center--playground
503
+ - Also takes: ViewProps
504
+
505
+ | Prop | Type | Description |
506
+ | --- | --- | --- |
507
+ | inline? | `boolean` | Only as wide as the content (inline) instead of the full width |
508
+ | className? | `string` | |
509
+
510
+ ### ChatMessage (React Native)
511
+
512
+ A message: author and time (only for screen readers when grouped), the bubble, the delivery status
513
+
514
+ - Import: `import { ChatMessage } from '@wirecore/wirelayer-native'`
515
+ - Category: Data
516
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
517
+ - Also takes: Omit<ViewProps, 'children'>
518
+
519
+ | Prop | Type | Description |
520
+ | --- | --- | --- |
521
+ | text? | `string` | Text of the message – Markdown unless `markdown` is false (children replace it) |
522
+ | markdown? | `boolean` | Render the text as Markdown (default true); otherwise plain text with its line breaks |
523
+ | author? | `string` | Name of the author, above the message |
524
+ | avatar? | `string` | Avatar image (default: the initials of the author) |
525
+ | time? | `string \| number \| Date` | Time sent: ISO text, timestamp or Date (shown as the time of day) |
526
+ | status? | `ChatStatus` | Delivery status of an own message: sending, sent, read, error (shown as icon and text) |
527
+ | attachments? | `ChatAttachment[]` | Files of the message: name and size, a tap opens them |
528
+ | onAttachmentPress? | `(attachment: ChatAttachment) => void` | A tap on an attachment (default: opens its `href` with Linking) |
529
+ | align? | `'start' \| 'end' \| 'center'` | start (others, default), end (own messages) or center (system notes) |
530
+ | grouped? | `boolean` | Follows a message of the same author: avatar and name only for screen readers |
531
+ | streaming? | `boolean` | The text is still being written: a cursor while it grows, aria-busy until it is complete |
532
+ | headingLevel? | `number` | Heading level of `#` in the Markdown (default 3) |
533
+ | children? | `ReactNode` | Own content instead of the text |
534
+ | before? | `ReactNode` | Above the bubble, e.g. ChatThinking or ChatToolCall |
535
+ | after? | `ReactNode` | Below the bubble, e.g. ChatSources |
536
+ | actions? | `ReactNode` | Buttons next to the status (copy, retry …) |
537
+ | className? | `string` | |
538
+
539
+ ### ChatMessages (React Native)
540
+
541
+ Message list: an inverted FlatList (newest at the bottom) with date lines and grouped messages. It is no live region – new messages of others are announced, streamed ones once complete; aria-busy while a reply is written. Scrolled up, a button leads to the new messages; the top loads older ones.
542
+
543
+ - Import: `import { ChatMessages } from '@wirecore/wirelayer-native'`
544
+ - Category: Data
545
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
546
+ - Also takes: Omit<ViewProps, 'children'>
547
+
548
+ | Prop | Type | Description |
549
+ | --- | --- | --- |
550
+ | messages | `T[]` | The messages, oldest first |
551
+ | label? | `string` | Accessible name of the list (default "Messages") |
552
+ | groupWithin? | `number` | Messages of the same author within this many minutes are grouped (default 5) |
553
+ | separators? | `boolean` | A date line before the first message of each day (default true) |
554
+ | now? | `string \| number \| Date` | Today's date – the date lines then say "Today" and "Yesterday" |
555
+ | markdown? | `boolean` | Message texts are Markdown (default true) |
556
+ | announce? | `boolean` | Announces new messages of others – streamed ones once they are complete (default true) |
557
+ | hasMore? | `boolean` | Older messages can be loaded: reaching the top (or the button there) calls onLoadMore |
558
+ | loading? | `boolean` | Older messages are loading |
559
+ | onLoadMore? | `() => void` | Load older messages (they are added at the top, the view stays where it is) |
560
+ | emptyText? | `string` | Text without messages |
561
+ | renderMessage? | `(message: T, state: { grouped: boolean }) => ReactNode` | A message (default: ChatMessage) |
562
+ | onAttachmentPress? | `(attachment: ChatAttachment, message: T) => void` | A tap on an attachment of a message (default: opens its `href` with Linking) |
563
+ | className? | `string` | |
564
+
565
+ ### ChatPrompt (React Native)
566
+
567
+ Prompt of a chat: a text field that grows up to `maxRows` lines, attached files with a remove button each, a send button – and a stop button instead while a reply is written.
568
+
569
+ - Import: `import { ChatPrompt } from '@wirecore/wirelayer-native'`
570
+ - Category: Data
571
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
572
+ - Also takes: Omit<ViewProps, 'children'>
573
+
574
+ | Prop | Type | Description |
575
+ | --- | --- | --- |
576
+ | value? | `string` | The text (controlled) |
577
+ | defaultValue? | `string` | |
578
+ | onValueChange? | `(text: string) => void` | |
579
+ | label? | `string` | Accessible name of the field (default "Message") |
580
+ | placeholder? | `string` | |
581
+ | disabled? | `boolean` | |
582
+ | responding? | `boolean` | A reply is being written: the send button becomes a stop button (calls onStop) |
583
+ | attachments? | `boolean` | A button to attach files from the `pickers` |
584
+ | pickers? | `FilePicker[]` | Sources of attachments: documentPicker() from `@wirecore/wirelayer-native/expo-document-picker`, imageLibraryPicker() … or own – several open a choice |
585
+ | files? | `NativeFile[]` | Attached files (controlled) |
586
+ | onFilesChange? | `(files: NativeFile[]) => void` | |
587
+ | accept? | `string \| string[]` | Accepted file types for attachments, passed to the pickers, e.g. ["image/*", "application/pdf"] |
588
+ | maxRows? | `number` | Lines the field grows to before it scrolls (default 8) |
589
+ | sendOn? | `'enter' \| 'mod-enter'` | Web with a hardware keyboard: `enter` (default) sends with Enter, Shift+Enter adds a line; `mod-enter` sends with Ctrl/Cmd+Enter. On iOS and Android only the send button sends (Enter adds a line). |
590
+ | hint? | `boolean` | Web: shows how to send and add a line (default true) |
591
+ | onSubmit? | `(message: { text: string; files: NativeFile[] }) => void` | Send: the text (trimmed) and the attached files; the field is cleared afterwards |
592
+ | onStop? | `() => void` | Stop the reply that is being written |
593
+ | className? | `string` | |
594
+
595
+ ### ChatSources (React Native)
596
+
597
+ Sources of an answer: a button (aria-expanded) that shows a list of links with their host names
598
+
599
+ - Import: `import { ChatSources } from '@wirecore/wirelayer-native'`
600
+ - Category: Data
601
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
602
+ - Also takes: Omit<ViewProps, 'children'>
603
+
604
+ | Prop | Type | Description |
605
+ | --- | --- | --- |
606
+ | sources | `ChatSource[]` | |
607
+ | title? | `string` | Text of the button (default "3 sources") |
608
+ | defaultOpen? | `boolean` | Open at first |
609
+ | onLinkPress? | `(href: string) => void` | A tap on a source (default: Linking.openURL) |
610
+ | className? | `string` | |
611
+
612
+ ### ChatThinking (React Native)
613
+
614
+ The reasoning of an answer: collapsed by default, "Thinking …" while it is being written
615
+
616
+ - Import: `import { ChatThinking } from '@wirecore/wirelayer-native'`
617
+ - Category: Data
618
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
619
+ - Also takes: Omit<ViewProps, 'children'>
620
+
621
+ | Prop | Type | Description |
622
+ | --- | --- | --- |
623
+ | active? | `boolean` | Still thinking: "Thinking …" with a spinner, aria-busy |
624
+ | text? | `string` | The reasoning (plain text; children replace it) |
625
+ | duration? | `number` | Seconds it took – shown when done |
626
+ | defaultOpen? | `boolean` | Open at first |
627
+ | children? | `ReactNode` | |
628
+ | className? | `string` | |
629
+
630
+ ### ChatToolCall (React Native)
631
+
632
+ A tool call of an assistant: name and status on the button (aria-expanded), arguments and result inside
633
+
634
+ - Import: `import { ChatToolCall } from '@wirecore/wirelayer-native'`
635
+ - Category: Data
636
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-chat--playground
637
+ - Also takes: Omit<ViewProps, 'children'>
638
+
639
+ | Prop | Type | Description |
640
+ | --- | --- | --- |
641
+ | name | `string` | Name of the tool, e.g. "Get weather" |
642
+ | status? | `'running' \| 'done' \| 'error'` | running, done or error – shown as icon and text |
643
+ | input? | `unknown` | Arguments of the call (objects are shown as JSON) |
644
+ | output? | `unknown` | Result of the call (objects are shown as JSON) |
645
+ | defaultOpen? | `boolean` | Open at first |
646
+ | children? | `ReactNode` | More content inside |
647
+ | className? | `string` | |
648
+
649
+ ### Checkbox (React Native)
650
+
651
+ Checkbox with label (also indeterminate): the whole row is the control; Space toggles on the web; works in a CheckboxGroup
652
+
653
+ - Import: `import { Checkbox } from '@wirecore/wirelayer-native'`
654
+ - Category: Forms
655
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-checkbox--playground
656
+ - Also takes: Omit<PressableProps, 'children'>
657
+
658
+ | Prop | Type | Description |
659
+ | --- | --- | --- |
660
+ | checked? | `CheckedState` | |
661
+ | defaultChecked? | `CheckedState` | |
662
+ | onCheckedChange? | `(checked: CheckedState) => void` | |
663
+ | invalid? | `boolean` | |
664
+ | value? | `string` | Value inside a CheckboxGroup – the group holds the state |
665
+ | className? | `string` | |
666
+ | children? | `ReactNode` | Label – pressing it toggles the checkbox |
667
+
668
+ ### CheckboxCard (React Native)
669
+
670
+ A large card that is one checkbox: title (name), description and price (description), icon
671
+
672
+ - Import: `import { CheckboxCard } from '@wirecore/wirelayer-native'`
673
+ - Category: Forms
674
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-checkbox--playground
675
+
676
+ | Prop | Type | Description |
677
+ | --- | --- | --- |
678
+ | title | `string` | Title – the accessible name of the control |
679
+ | description? | `string` | Text below the title – read as the description |
680
+ | icon? | `IconComponent` | Icon component at the start |
681
+ | price? | `string` | Price or other figure, e.g. "$29 / month" – part of the description |
682
+ | children? | `ReactNode` | More content below the description |
683
+ | className? | `string` | |
684
+ | value? | `string` | Value inside a CheckboxGroup (the group holds the state) |
685
+ | checked? | `CheckedState` | Controlled state (alone; in a CheckboxGroup the group holds the value) |
686
+ | defaultChecked? | `CheckedState` | |
687
+ | onCheckedChange? | `(checked: CheckedState) => void` | |
688
+ | invalid? | `boolean` | |
689
+ | disabled? | `boolean` | |
690
+
691
+ ### CheckboxGroup (React Native)
692
+
693
+ A named group (role "group") of checkboxes or checkbox cards; helper and error text describe it
694
+
695
+ - Import: `import { CheckboxGroup } from '@wirecore/wirelayer-native'`
696
+ - Category: Forms
697
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-checkboxgroup--playground
698
+ - Also takes: ViewProps
699
+
700
+ | Prop | Type | Description |
701
+ | --- | --- | --- |
702
+ | value? | `string[]` | Values of the ticked checkboxes (controlled) |
703
+ | defaultValue? | `string[]` | |
704
+ | onValueChange? | `(value: string[]) => void` | |
705
+ | label? | `string` | Visible label of the group (names it); otherwise pass aria-label |
706
+ | helperText? | `string` | |
707
+ | error? | `string` | Error message – also marks the group and its checkboxes invalid |
708
+ | invalid? | `boolean` | |
709
+ | required? | `boolean` | Shows the required mark after the label |
710
+ | disabled? | `boolean` | |
711
+ | max? | `number` | At most this many can be ticked – the others are disabled until one is unticked (announced) |
712
+ | orientation? | `'vertical' \| 'horizontal'` | vertical (default) or horizontal |
713
+ | columns? | `number` | Cards in a grid with this many columns – for CheckboxCard |
714
+ | children? | `ReactNode` | Checkbox or CheckboxCard elements with a `value` |
715
+
716
+ ### Chip (React Native)
717
+
718
+ A compact label with optional icon or image and a remove button (44 pt touch area) – e.g. a chosen filter
719
+
720
+ - Import: `import { Chip } from '@wirecore/wirelayer-native'`
721
+ - Category: Forms
722
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-chip--playground
723
+
724
+ | Prop | Type | Description |
725
+ | --- | --- | --- |
726
+ | label? | `string` | Text of the chip (or the children); also names its remove button |
727
+ | icon? | `IconComponent` | Icon component before the label |
728
+ | avatar? | `string` | Small round image before the label (decorative) |
729
+ | removable? | `boolean` | Shows a remove button that calls `onRemove` |
730
+ | removeLabel? | `string` | Accessible name of the remove button (default: "Remove <label>") |
731
+ | onRemove? | `() => void` | |
732
+ | onPress? | `PressableProps['onPress']` | Makes the chip itself a button |
733
+ | size? | `ChipSize` | |
734
+ | disabled? | `boolean` | |
735
+ | className? | `string` | |
736
+ | children? | `ReactNode` | |
737
+
738
+ ### ChipGroup (React Native)
739
+
740
+ Filter chips: checkboxes (several) or radio buttons (single); a checked chip shows a check mark too
741
+
742
+ - Import: `import { ChipGroup } from '@wirecore/wirelayer-native'`
743
+ - Category: Forms
744
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-chipgroup--playground
745
+ - Also takes: ViewProps
746
+
747
+ | Prop | Type | Description |
748
+ | --- | --- | --- |
749
+ | items | `ChipGroupItem[]` | |
750
+ | value? | `string[]` | |
751
+ | defaultValue? | `string[]` | |
752
+ | onValueChange? | `(value: string[]) => void` | |
753
+ | single? | `boolean` | Only one chip at a time (radio buttons instead of checkboxes) |
754
+ | multiple? | `boolean` | Several chips at once (default, same as the web); false is the same as `single` |
755
+ | label | `string` | Name of the group, e.g. "Filter locations" |
756
+ | disabled? | `boolean` | |
757
+ | className? | `string` | |
758
+
759
+ ### CodeHighlight (React Native)
760
+
761
+ Code in monospace with line numbers, marked and diff lines, wrapping and a copy button. Colours come from Shiki (`shiki` is an optional peer dependency of `@wirecore/wirelayer-native/code`: shiki/core with the JavaScript RegExp engine – no WebAssembly, no native module); until it has loaded, or when a grammar cannot run, the code shows uncoloured.
762
+
763
+ - Import: `import { CodeHighlight } from '@wirecore/wirelayer-native/code'`
764
+ - Category: Data
765
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-codehighlight--playground
766
+ - Also takes: Omit<ViewProps, 'children'>
767
+
768
+ | Prop | Type | Description |
769
+ | --- | --- | --- |
770
+ | code | `string` | |
771
+ | language? | `string` | Language id or alias, e.g. "ts", "vue", "json", "bash" (default: from `fileName`, else plain text) |
772
+ | title? | `string` | Title above the code |
773
+ | fileName? | `string` | File name in the header; also sets the language when `language` is not given |
774
+ | lineNumbers? | `boolean` | Line numbers before the lines (not read by screen readers) |
775
+ | highlightLines? | `number[]` | Lines to mark (1-based) |
776
+ | copyable? | `boolean` | Copy button in the header (default true): calls `onCopy` – e.g. `copy` of `useClipboard()` from `@wirecore/wirelayer-native/expo-clipboard`; without `onCopy` only the web copies (navigator.clipboard) |
777
+ | onCopy? | `(code: string) => void \| Promise<void>` | Copies the code (the app's clipboard) – the button announces "Copied to clipboard" |
778
+ | header? | `boolean` | The header with title and buttons (default true) |
779
+ | maxHeight? | `number` | Height limit in dp; longer code scrolls – or, with `expandable`, opens with "Show all code" |
780
+ | expandable? | `boolean` | With `maxHeight`: the code is cut off there and a button shows all of it |
781
+ | wrap? | `boolean` | Long lines wrap instead of scrolling sideways (controlled) |
782
+ | defaultWrap? | `boolean` | Wrapping at the start (uncontrolled) |
783
+ | onWrapChange? | `(wrap: boolean) => void` | |
784
+ | wrapToggle? | `boolean` | A button in the header switches line wrapping |
785
+ | diff? | `boolean` | Marks lines starting with "+" as added and "-" as removed (e.g. a patch) |
786
+ | addedLines? | `number[]` | Added lines (1-based) |
787
+ | removedLines? | `number[]` | Removed lines (1-based) |
788
+ | languages? | `CodeLanguageInput[]` | More grammars than the built-in ones (Shiki registrations or loaders, e.g. `() => import('shiki/langs/ruby.mjs')`) – their licence is the responsibility of the app |
789
+ | className? | `string` | |
790
+
791
+ ### Collapse (React Native)
792
+
793
+ Shows and hides its content with a height animation (none with reduced motion). Hidden content is not rendered – the button that toggles it carries `aria-expanded`.
794
+
795
+ - Import: `import { Collapse } from '@wirecore/wirelayer-native'`
796
+ - Category: Layout
797
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-collapse--playground
798
+ - Also takes: ViewProps
799
+
800
+ | Prop | Type | Description |
801
+ | --- | --- | --- |
802
+ | open? | `boolean` | Shown (default false) |
803
+ | className? | `string` | |
804
+
805
+ ### ColorPicker (React Native)
806
+
807
+ Colour field: the button shows the colour and its hex value and opens a sheet with a preview, sliders for hue, saturation and brightness (adjustable with the screen reader's gestures), a hex field and presets. Simplified compared with the web: no area, no alpha, hex only.
808
+
809
+ - Import: `import { ColorPicker } from '@wirecore/wirelayer-native'`
810
+ - Category: Forms
811
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-colorpicker--playground
812
+
813
+ | Prop | Type | Description |
814
+ | --- | --- | --- |
815
+ | value? | `string` | Colour as hex, e.g. "#1e66f5" |
816
+ | defaultValue? | `string` | |
817
+ | onValueChange? | `(value: string) => void` | |
818
+ | onValueChangeEnd? | `(value: string) => void` | Called once the user lets go of a slider or picks a swatch |
819
+ | swatches? | `string[]` | Preset colours below the sliders |
820
+ | withPicker? | `boolean` | Sliders and hex field (default true); false: only the `swatches` (a palette) |
821
+ | disabled? | `boolean` | |
822
+ | invalid? | `boolean` | |
823
+ | aria-label? | `string` | Accessible name without a surrounding Field |
824
+ | closeLabel? | `string` | |
825
+ | className? | `string` | |
826
+
827
+ ### ColorSwatchPicker (React Native)
828
+
829
+ Colours as a radio group: every swatch is named by its colour name (44 pt touch target), the chosen one has a tick
830
+
831
+ - Import: `import { ColorSwatchPicker } from '@wirecore/wirelayer-native'`
832
+ - Category: Forms
833
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-colorswatchpicker--playground
834
+
835
+ | Prop | Type | Description |
836
+ | --- | --- | --- |
837
+ | items | `ColorSwatch[]` | The colours to choose from |
838
+ | value? | `string \| null` | Chosen colour (its value, controlled) |
839
+ | defaultValue? | `string \| null` | |
840
+ | onValueChange? | `(value: string \| null) => void` | |
841
+ | label? | `string` | Visible label of the group (default "Color") |
842
+ | showLabels? | `boolean` | Shows the names below the swatches (otherwise only for screen readers) |
843
+ | size? | `'sm' \| 'md' \| 'lg'` | |
844
+ | disabled? | `boolean` | |
845
+ | invalid? | `boolean` | |
846
+ | className? | `string` | |
847
+
848
+ ### Combobox (React Native)
849
+
850
+ Picker for long lists: the sheet starts with a search field that filters the options while typing (accent- and case-blind); with `dataSource` the search asks the server. Same props as Select.
851
+
852
+ - Import: `import { Combobox } from '@wirecore/wirelayer-native'`
853
+ - Category: Forms
854
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-combobox--playground
855
+
856
+ | Prop | Type | Description |
857
+ | --- | --- | --- |
858
+ | items | `readonly T[]` | Options: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
859
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
860
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
861
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
862
+ | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
863
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
864
+ | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
865
+ | onFilterChange? | `(text: string) => void` | Text of the search field – e.g. to load matching items from a server (manualFilter) |
866
+ | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
867
+ | loadingText? | `string` | Text of the loading row in the list |
868
+ | hasMore? | `boolean` | More items can be loaded: the end of the list (or "Load more") calls onLoadMore |
869
+ | onLoadMore? | `() => void` | The end of the list was reached (FlatList onEndReached) or "Load more" pressed |
870
+ | dataSource? | `DataSource<T>` | Loads the options when the list opens (pages at the end of the list, the search asks it after a typing pause); `getItemsByKeys` gives the labels of chosen values that are not loaded |
871
+ | minSearchLength? | `number` | Fewest characters the search needs before the data source is asked |
872
+ | pageSize? | `number` | Options per request of the data source (default 50) |
873
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an option (instead of icon and label) |
874
+ | value? | `V \| null` | Selected value; any type (string, number, boolean, object) |
875
+ | defaultValue? | `V \| null` | |
876
+ | onValueChange? | `(value: V \| null) => void` | |
877
+ | placeholder? | `string` | |
878
+ | title? | `string` | Title of the sheet – default: the Field label or the placeholder |
879
+ | aria-label? | `string` | Accessible name without a surrounding Field |
880
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
881
+ | disabled? | `boolean` | |
882
+ | invalid? | `boolean` | |
883
+ | clearable? | `boolean` | Button next to the field that clears the value |
884
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
885
+ | size? | `'sm' \| 'md' \| 'lg'` | Height of the field: 32, 40 (default) or 48 pt |
886
+ | renderValue? | `(item: T) => ReactNode` | Content of the field for the selected item (the accessible name stays its label) |
887
+ | className? | `string` | |
888
+ | emptyText? | `string` | Shown when nothing matches |
889
+
890
+ ### CommandPalette (React Native)
891
+
892
+ Search over pages and actions: a bottom sheet with a search field at the top and the matching items as buttons in groups. The number of results is announced; the keyboard's search key runs the first one. Strg+K / ⌘K opens it on the web.
893
+
894
+ - Import: `import { CommandPalette } from '@wirecore/wirelayer-native'`
895
+ - Category: Navigation
896
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-commandpalette--playground
897
+
898
+ | Prop | Type | Description |
899
+ | --- | --- | --- |
900
+ | items | `CommandItem[]` | |
901
+ | open? | `boolean` | |
902
+ | onOpenChange? | `(open: boolean) => void` | |
903
+ | onSelect? | `(value: string) => void` | An item was chosen |
904
+ | onFilterChange? | `(query: string) => void` | The search text changed – for results from the server (`filter={false}`, `loading`) |
905
+ | onSearch? | `(query: string) => void` | |
906
+ | dataSource? | `DataSource<CommandItem>` | Results from a server: asked with the search text after a typing pause (outdated answers dropped); they come after the matching `items` |
907
+ | minSearchLength? | `number` | Fewest characters the search needs before the data source is asked (default 0) |
908
+ | hotkey? | `boolean` | Web only: Strg+K / ⌘K anywhere on the page opens and closes it (default true); `false` switches it off |
909
+ | placeholder? | `string` | |
910
+ | limit? | `number` | At most this many results |
911
+ | filter? | `((item: CommandItem, query: string) => number \| boolean) \| false` | Own matching: a score per item (higher first, `false`/0 hides it) – or `false` to show the items as they are (results from the server, see `onFilterChange`) |
912
+ | highlight? | `boolean` | Marks the searched text in the labels (default true) |
913
+ | clearQueryOnClose? | `boolean` | Empties the search field when it closes (default true) |
914
+ | closeOnSelect? | `boolean` | Closes after running an item (default true) |
915
+ | loading? | `boolean` | Results are being loaded (e.g. after `onFilterChange`) |
916
+ | emptyText? | `string` | Text when nothing matches |
917
+
918
+ ### ConditionBuilder (React Native)
919
+
920
+ Nested and/or groups of rules as cards (the mobile layout of the web ConditionBuilder): field, operator and a value editor matching the field type, each a WireLayer control; adding and removing is announced. Same JSON as the web.
921
+
922
+ - Import: `import { ConditionBuilder } from '@wirecore/wirelayer-native'`
923
+ - Category: Forms
924
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-conditionbuilder--playground
925
+
926
+ | Prop | Type | Description |
927
+ | --- | --- | --- |
928
+ | fields | `ConditionField[]` | Fields the rules can test: id, label, type (text, number, date, select, boolean), options of a select |
929
+ | value? | `ConditionGroup` | The condition tree (JSON: groups with combinator and children, rules with field, operator, value) – controlled |
930
+ | defaultValue? | `ConditionGroup` | |
931
+ | onValueChange? | `(value: ConditionGroup) => void` | |
932
+ | label? | `string` | Name of the whole tree (default "Conditions") |
933
+ | maxDepth? | `number` | How deep groups can be nested (default 3) |
934
+ | disabled? | `boolean` | |
935
+ | negatable? | `boolean` | A "Not" checkbox per group negates it (`not` in the JSON) |
936
+ | className? | `string` | |
937
+
938
+ ### ConfirmDialog (React Native)
939
+
940
+ Place once at the root of the app; then `await confirm({ title })` and `await prompt({ title, label })` ask from anywhere. An alertdialog: a press outside does not answer, the back button and Escape cancel.
941
+
942
+ - Import: `import { ConfirmDialog } from '@wirecore/wirelayer-native'`
943
+ - Category: Overlays
944
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-confirm--playground
945
+
946
+ | Prop | Type | Description |
947
+ | --- | --- | --- |
948
+ | closeLabel? | `string` | Accessible name of the close button |
949
+
950
+ ### Container (React Native)
951
+
952
+ Centres the content with a largest width and side padding (tablets, the web)
953
+
954
+ - Import: `import { Container } from '@wirecore/wirelayer-native'`
955
+ - Category: Layout
956
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-container--playground
957
+ - Also takes: ViewProps
958
+
959
+ | Prop | Type | Description |
960
+ | --- | --- | --- |
961
+ | size? | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'` | Largest width: sm 672, md 768, lg 1024 (default), xl 1280, full |
962
+ | flush? | `boolean` | Without the side padding |
963
+ | className? | `string` | |
964
+
965
+ ### ContextMenu (React Native)
966
+
967
+ Long press on the area opens its actions in a sheet. Screen readers get the actions as an accessibility action (VoiceOver: swipe up/down, TalkBack: actions menu); on the web the context menu key, Shift+F10 and a right click. Offer the actions another way, too (e.g. an IconButton) – a long press is hard to find.
968
+
969
+ - Import: `import { ContextMenu } from '@wirecore/wirelayer-native'`
970
+ - Category: Overlays
971
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-contextmenu--playground
972
+
973
+ | Prop | Type | Description |
974
+ | --- | --- | --- |
975
+ | onSelect? | `(value: string) => void` | |
976
+ | onCheckedChange? | `(value: string, checked: boolean) => void` | A checkbox item was switched |
977
+ | onValueChange? | `(name: string, value: string) => void` | A radio item was chosen: the `name` of its group and its value |
978
+ | items | `MenuEntry[]` | The same entries as Menu (items, checkbox and radio items, groups, submenus) |
979
+ | label? | `string` | Title of the sheet and name of the screen reader action (default "Actions") |
980
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
981
+ | children | `ReactElement<Record<string, unknown>>` | The area, e.g. a list row or card – gets onLongPress |
982
+
983
+ ### Countdown (React Native)
984
+
985
+ Time left until a point (role timer): counts every second, not announced on every tick
986
+
987
+ - Import: `import { Countdown } from '@wirecore/wirelayer-native'`
988
+ - Category: Data
989
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-countdown--playground
990
+ - Also takes: Omit<ViewProps, 'children'>
991
+
992
+ | Prop | Type | Description |
993
+ | --- | --- | --- |
994
+ | target | `string \| number \| Date` | End point |
995
+ | label | `string` | Accessible name of the timer, e.g. "Until launch" |
996
+ | units? | `CountdownUnit[]` | Shown units – the largest takes everything above it (default all) |
997
+ | variant? | `'boxed' \| 'plain'` | |
998
+ | size? | `'sm' \| 'md' \| 'lg'` | |
999
+ | onComplete? | `() => void` | The end point was reached (once) |
1000
+ | className? | `string` | |
1001
+
1002
+ ### DataList (React Native)
1003
+
1004
+ Facts as label and value pairs, e.g. the details of an order (a list; each item reads label, then value)
1005
+
1006
+ - Import: `import { DataList } from '@wirecore/wirelayer-native'`
1007
+ - Category: Data
1008
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-datalist--playground
1009
+ - Also takes: ViewProps
1010
+
1011
+ | Prop | Type | Description |
1012
+ | --- | --- | --- |
1013
+ | orientation? | `'vertical' \| 'horizontal'` | Label above (default) or beside the value |
1014
+ | divided? | `boolean` | Lines between the items |
1015
+ | className? | `string` | |
1016
+ | children? | `ReactNode` | DataListItem elements |
1017
+
1018
+ ### DataListItem (React Native)
1019
+
1020
+ One label and value of a DataList
1021
+
1022
+ - Import: `import { DataListItem } from '@wirecore/wirelayer-native'`
1023
+ - Category: Data
1024
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-datalist--playground
1025
+ - Also takes: ViewProps
1026
+
1027
+ | Prop | Type | Description |
1028
+ | --- | --- | --- |
1029
+ | label | `string` | The term |
1030
+ | className? | `string` | |
1031
+ | children? | `ReactNode` | The value – a string or own content |
1032
+
1033
+ ### DataTable (React Native)
1034
+
1035
+ Data table for phones and tablets, without a table library: a table that scrolls sideways (sort by tapping a header) or one card per row (`layout`, automatic below `cardsBelow`). Search, a sort sheet and a filter sheet, selection, pages or infinite loading, server data (`dataSource`, `manual`), groups, totals, row actions in a sheet and the export as CSV or Excel (`onExport`, `generateCsv`, `generateXlsx`). In the web build the table is a complete ARIA table; on iOS and Android every row is a named group and every cell is read with its header.
1036
+
1037
+ - Import: `import { DataTable } from '@wirecore/wirelayer-native/data-table'`
1038
+ - Category: Data
1039
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-datatable--playground
1040
+
1041
+ | Prop | Type | Description |
1042
+ | --- | --- | --- |
1043
+ | data? | `TData[]` | The rows (with `dataSource` the table loads them itself) |
1044
+ | dataSource? | `DataTableDataSource<TData>` | Rows from a server instead of `data` and `manual`: the table asks `getRows` (page, sorting, filters, search, grouping, abort signal) whenever they change, cancels outdated requests, shows errors with "Try again" – `refresh()` asks again |
1045
+ | cacheTime? | `number` | How long answers of `dataSource` are reused for the same query, in ms (default 0: always ask) |
1046
+ | searchDebounce? | `number` | Pause after typing in the search before `dataSource` is asked, in ms (default 300) |
1047
+ | columns | `DataTableColumn<TData>[]` | |
1048
+ | caption | `string` | Accessible name of the table (and of the card list) |
1049
+ | getRowId? | `(row: TData, index: number) => string` | |
1050
+ | rowLabel? | `(row: TData, index: number) => string` | Names a row: its card, its controls ("Select <label>") – default "Row 1" … |
1051
+ | layout? | `'table' \| 'cards' \| 'auto'` | `table`: columns side by side, scrolling sideways; `cards`: one card per row with "header: value" lines; `auto` (default): cards while the table is narrower than `cardsBelow` |
1052
+ | cardsBelow? | `number` | Width in pt below which `layout="auto"` shows cards (default 640) |
1053
+ | pageSize? | `number` | Rows per page – enables pagination (changeable with `pageSizeOptions`) |
1054
+ | onPageSizeChange? | `(pageSize: number) => void` | |
1055
+ | pageSizeOptions? | `number[]` | Choices for the rows per page, shown next to the pagination |
1056
+ | page? | `number` | Current page (1-based); controlled together with onPageChange |
1057
+ | onPageChange? | `(page: number) => void` | |
1058
+ | sorting? | `DataTableSort \| DataTableSort[] \| null` | Current sorting; controlled together with onSortingChange – an array in the multiple mode |
1059
+ | onSortingChange? | `(sorting: DataTableSort \| DataTableSort[] \| null) => void` | |
1060
+ | defaultSorting? | `DataTableSort \| DataTableSort[] \| null` | Sorting at the start (uncontrolled) |
1061
+ | sortMode? | `'single' \| 'multiple'` | `multiple`: tapping further headers (or the sort sheet) sorts by several columns |
1062
+ | manual? | `boolean` | Server mode: `data` is the current page, already sorted and filtered; requires `rowCount` |
1063
+ | rowCount? | `number` | |
1064
+ | selectable? | `boolean` | Selection: a checkbox (or radio button) per row and card |
1065
+ | selectionMode? | `'multiple' \| 'single'` | `multiple` (checkboxes and "Select all", default) or `single` (radio buttons) |
1066
+ | selection? | `string[]` | |
1067
+ | onSelectionChange? | `(selection: string[]) => void` | |
1068
+ | onSelectedRowsChange? | `(rows: TData[]) => void` | The selected rows as objects (rows of other pages are remembered) |
1069
+ | isRowSelectable? | `(row: TData) => boolean` | Rows that cannot be selected get a disabled checkbox |
1070
+ | selectAllLabel? | `string` | Name of "select all" (default "Select all rows on this page" / "Select all rows") |
1071
+ | loading? | `boolean` | |
1072
+ | emptyText? | `string` | |
1073
+ | noResultsText? | `string` | Shown when the filters or the search leave no row (default: `emptyText`) |
1074
+ | loadingText? | `string` | |
1075
+ | search? | `boolean` | Search field above the table: filters over all searchable columns |
1076
+ | globalFilter? | `string` | |
1077
+ | onGlobalFilterChange? | `(value: string) => void` | |
1078
+ | highlightSearch? | `boolean` | Marks the search hits in the cells |
1079
+ | filters? | `Record<string, DataTableFilterValue>` | Column filters by column id (the "Filter" sheet); controlled together with onFiltersChange |
1080
+ | onFiltersChange? | `(filters: Record<string, DataTableFilterValue>) => void` | |
1081
+ | groupBy? | `string` | Groups the rows of the page by the values of this column (a heading per group) |
1082
+ | rowActions? | `MenuEntry[] \| ((row: TData) => MenuEntry[])` | Actions per row: a button "Actions for …" opens them in a sheet (items like Menu) |
1083
+ | onRowAction? | `(action: DataTableRowAction<TData>) => void` | |
1084
+ | onRowClick? | `(click: DataTableRowClick<TData>) => void` | A tap on a row or card (not on its controls); the first value (or the card title) becomes a button that does the same for screen reader and keyboard users |
1085
+ | exportFilename? | `string` | Name of the exported file without extension (default "export") |
1086
+ | csvSeparator? | `string` | Separator of the CSV export, also of the export button – default: from the locale (";" where numbers have a decimal comma, e.g. de-DE, as a spreadsheet there expects it; "," otherwise) |
1087
+ | exportFormats? | `('csv' \| 'xlsx')[]` | Formats of the export: CSV (default), Excel (.xlsx) or both |
1088
+ | onExport? | `(file: DataTableExportFile) => void` | Shows the export button: the file of the filtered and sorted rows of all pages (or of the selection) – e.g. `shareFile` of `@wirecore/wirelayer-native/expo-sharing` opens the share sheet with it |
1089
+ | hasMore? | `boolean` | More rows can be loaded (`onLoadMore`): "Load more" below the rows; false stops loading at the end |
1090
+ | onLoadMore? | `() => void` | The end of the rows was reached (or "Load more" pressed) – append rows to `data` (infinite scrolling) |
1091
+ | toolbar? | `ReactNode` | Own controls in the toolbar, after the built-in buttons |
1092
+ | empty? | `ReactNode` | Shown when there are no rows |
1093
+ | noResults? | `ReactNode` | Shown when the filters or the search leave no row (default: `empty`) |
1094
+ | className? | `string` | Classes of the table – e.g. `flex-1` in a screen: the rows scroll below the toolbar |
1095
+ | style? | `StyleProp<ViewStyle>` | |
1096
+ | ref? | `Ref<DataTableHandle>` | |
1097
+
1098
+ ### DataView (React Native)
1099
+
1100
+ Items as a list or grid (a list either way, the switch is a radio group "View"), with pages or growing ("Load more", optionally at the end of the scrolling), loading placeholders, empty and error states – from `items` or a data source. The items scroll in a FlatList.
1101
+
1102
+ - Import: `import { DataView } from '@wirecore/wirelayer-native'`
1103
+ - Category: Data
1104
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-dataview--playground
1105
+
1106
+ | Prop | Type | Description |
1107
+ | --- | --- | --- |
1108
+ | items? | `readonly T[]` | |
1109
+ | label | `string` | Accessible name of the list, e.g. "Server" |
1110
+ | layout? | `'list' \| 'grid'` | |
1111
+ | defaultLayout? | `'list' \| 'grid'` | |
1112
+ | onLayoutChange? | `(layout: 'list' \| 'grid') => void` | |
1113
+ | layoutToggle? | `boolean` | Switch between list and grid above the items (default true) |
1114
+ | gridColumns? | `number` | Items side by side in the grid (default: 2, more on wide screens – one per 220 pt) |
1115
+ | pageSize? | `number` | Items per page – enables pagination (onPageSizeChange with `pageSizes`) |
1116
+ | onPageSizeChange? | `(pageSize: number) => void` | |
1117
+ | pageSizes? | `number[]` | Page sizes to choose from below the items |
1118
+ | page? | `number` | Current page, 1-based |
1119
+ | defaultPage? | `number` | |
1120
+ | onPageChange? | `(page: number) => void` | |
1121
+ | manual? | `boolean` | The items are the current page only (server); `totalCount` is the number of all items |
1122
+ | totalCount? | `number` | Number of all items (`manual`) |
1123
+ | dataSource? | `DataSource<T>` | Loads the items (pages, or growing with `loadMode: 'infinite'`); `query` adds sorting, filters, search |
1124
+ | query? | `Omit<DataQuery, 'page' \| 'pageSize' \| 'cursor'>` | Sorting, filters and search for the data source (e.g. from the toolbar); a change starts at page 1 |
1125
+ | loadMode? | `'pages' \| 'infinite'` | `pages` (default): pagination below the items; `infinite`: the list grows with "Load more" |
1126
+ | autoLoad? | `boolean` | `infinite`: loads the next page when the end of the list scrolls into view (the button stays as fallback) |
1127
+ | hasMore? | `boolean` | More items can be loaded (`infinite` without a data source): the button calls onLoadMore |
1128
+ | onLoadMore? | `() => void` | "Load more" (`infinite` without a data source) |
1129
+ | loading? | `boolean` | Placeholder items while there are none yet, "Loading" on the button otherwise (aria-busy) |
1130
+ | skeletonCount? | `number` | Placeholder items while loading (default: the page size, at most 6) |
1131
+ | filtered? | `boolean` | The items are filtered: shows the no-results text (`noResults`) instead of the empty text |
1132
+ | error? | `unknown` | An error to show instead of the items (`renderError`); a data source sets it itself |
1133
+ | emptyText? | `string` | |
1134
+ | header? | `ReactNode` | Content before the switch, e.g. a search field |
1135
+ | toolbar? | `ReactNode` | Sorting and filters above the items |
1136
+ | empty? | `ReactNode` | Shown without items |
1137
+ | noResults? | `ReactNode` | Shown without items while filtered |
1138
+ | renderError? | `(error: unknown, retry: () => void) => ReactNode` | Shown instead of the items after an error |
1139
+ | children | `(item: T, layout: 'list' \| 'grid') => ReactNode` | Renders one item |
1140
+ | className? | `string` | Classes of the view – e.g. `flex-1` in a screen: the items scroll between toolbar and pagination |
1141
+ | style? | `StyleProp<ViewStyle>` | |
1142
+
1143
+ ### DatePicker (React Native)
1144
+
1145
+ The trigger shows the date in the locale's format and opens the calendar in a sheet; a tap on a day picks it
1146
+
1147
+ - Import: `import { DatePicker } from '@wirecore/wirelayer-native'`
1148
+ - Category: Forms
1149
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-datepicker--playground
1150
+
1151
+ | Prop | Type | Description |
1152
+ | --- | --- | --- |
1153
+ | min? | `DateLike` | Earliest selectable date (ISO or Date) |
1154
+ | max? | `DateLike` | Latest selectable date (ISO or Date) |
1155
+ | isDateUnavailable? | `(date: string) => boolean` | Dates that cannot be chosen, e.g. weekends – receives the ISO date |
1156
+ | excludeDates? | `DateLike[]` | Single dates that cannot be chosen (holidays, booked days) |
1157
+ | showWeekNumbers? | `boolean` | Column with the ISO calendar weeks ("Wk") |
1158
+ | showButtonBar? | `boolean` | "Today" and "Clear" below the calendar |
1159
+ | highlightToday? | `boolean` | Today is bold and underlined (default true) |
1160
+ | hideOutsideDays? | `boolean` | Leaves the days of the previous and next month empty |
1161
+ | firstDayOfWeek? | `number` | First day of the week: 0 = Sunday … 6 = Saturday; default from the locale |
1162
+ | timeZone? | `string` | IANA zone that decides which day is today |
1163
+ | value? | `T \| null` | ISO date, e.g. "2026-10-20" (a Date is accepted too) |
1164
+ | defaultValue? | `T \| null` | |
1165
+ | onValueChange? | `(value: T \| null) => void` | |
1166
+ | valueType? | `DateValueType` | What onValueChange gets: ISO strings (default) or Date objects |
1167
+ | allowDeselect? | `boolean` | Choosing the selected day again clears the field |
1168
+ | clearable? | `boolean` | Clear button in the field while it has a value |
1169
+ | size? | `'sm' \| 'md' \| 'lg'` | |
1170
+ | aria-label? | `string` | Accessible name without a surrounding Field |
1171
+ | closeLabel? | `string` | |
1172
+ | disabled? | `boolean` | |
1173
+ | invalid? | `boolean` | |
1174
+ | className? | `string` | |
1175
+
1176
+ ### DateRangePicker (React Native)
1177
+
1178
+ Start and end in one field ("10/20/2026 – 10/24/2026"); the calendar in the sheet picks the start, then the end (each step is announced), presets pick a whole range.
1179
+
1180
+ - Import: `import { DateRangePicker } from '@wirecore/wirelayer-native'`
1181
+ - Category: Forms
1182
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-daterangepicker--playground
1183
+
1184
+ | Prop | Type | Description |
1185
+ | --- | --- | --- |
1186
+ | min? | `DateLike` | Earliest selectable date (ISO or Date) |
1187
+ | max? | `DateLike` | Latest selectable date (ISO or Date) |
1188
+ | isDateUnavailable? | `(date: string) => boolean` | Dates that cannot be chosen, e.g. weekends – receives the ISO date |
1189
+ | excludeDates? | `DateLike[]` | Single dates that cannot be chosen (holidays, booked days) |
1190
+ | showWeekNumbers? | `boolean` | Column with the ISO calendar weeks ("Wk") |
1191
+ | showButtonBar? | `boolean` | "Today" and "Clear" below the calendar |
1192
+ | highlightToday? | `boolean` | Today is bold and underlined (default true) |
1193
+ | hideOutsideDays? | `boolean` | Leaves the days of the previous and next month empty |
1194
+ | firstDayOfWeek? | `number` | First day of the week: 0 = Sunday … 6 = Saturday; default from the locale |
1195
+ | timeZone? | `string` | IANA zone that decides which day is today |
1196
+ | value? | `T \| null` | Start and end; Date objects are accepted too |
1197
+ | defaultValue? | `T \| null` | |
1198
+ | onValueChange? | `(value: T \| null) => void` | |
1199
+ | valueType? | `DateValueType` | What onValueChange gets: ISO strings (default) or Date objects |
1200
+ | presets? | `(string \| { label: string; value: DateRangeLike })[]` | Buttons below the calendar: "last7Days", "thisMonth", "lastMonth", "thisQuarter", "thisYear" … or own { label, value } |
1201
+ | clearable? | `boolean` | Clear button in the field while it has a value |
1202
+ | size? | `'sm' \| 'md' \| 'lg'` | |
1203
+ | aria-label? | `string` | Accessible name without a surrounding Field |
1204
+ | closeLabel? | `string` | |
1205
+ | disabled? | `boolean` | |
1206
+ | invalid? | `boolean` | |
1207
+ | className? | `string` | |
1208
+
1209
+ ### Descriptions (React Native)
1210
+
1211
+ Facts in columns (one on a phone, more on a tablet), with title, actions and an edit mode
1212
+
1213
+ - Import: `import { Descriptions } from '@wirecore/wirelayer-native'`
1214
+ - Category: Data
1215
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-descriptions--playground
1216
+ - Also takes: ViewProps
1217
+
1218
+ | Prop | Type | Description |
1219
+ | --- | --- | --- |
1220
+ | items | `DescriptionsItem[]` | |
1221
+ | title? | `string` | Heading above the list |
1222
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | Level of the heading (default 3) |
1223
+ | actions? | `ReactNode` | Buttons next to the title |
1224
+ | columns? | `ResponsiveColumns` | Columns by the width of the list (default `{ base: 1, sm: 2, lg: 3 }`) |
1225
+ | orientation? | `'vertical' \| 'horizontal'` | Label above (default) or beside the value |
1226
+ | bordered? | `boolean` | Table look with lines |
1227
+ | editing? | `boolean` | The values give way to `renderEdit` |
1228
+ | renderValue? | `(item: DescriptionsItem) => ReactNode` | Own content of a value |
1229
+ | renderEdit? | `(item: DescriptionsItem, context: { labelId: string }) => ReactNode` | Input of an item while editing – `labelId` names it (aria-labelledby) |
1230
+ | className? | `string` | |
1231
+
1232
+ ### Dialog (React Native)
1233
+
1234
+ Modal dialog on React Native's Modal: the system keeps focus inside, the Android back button and Escape (web) close it. Fades in and out (slides when docked to the bottom), without animation when reduced motion is on. On the web focus moves to the close button when it opens (like the web Dialog) – react-native-web only traps it.
1235
+
1236
+ - Import: `import { Dialog } from '@wirecore/wirelayer-native'`
1237
+ - Category: Overlays
1238
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-dialog--confirm
1239
+
1240
+ | Prop | Type | Description |
1241
+ | --- | --- | --- |
1242
+ | open | `boolean` | |
1243
+ | onOpenChange | `(open: boolean) => void` | |
1244
+ | role? | `'dialog' \| 'alertdialog'` | "alertdialog" for confirmations that interrupt the user |
1245
+ | title | `string` | |
1246
+ | description? | `string` | |
1247
+ | icon? | `IconComponent` | Icon component in the coloured box at the top |
1248
+ | status? | `DialogStatus` | |
1249
+ | size? | `OverlaySize` | Width: sm 320, md 400 (default), lg 560, xl 800, full the width of the screen |
1250
+ | position? | `'center' \| 'top' \| 'bottom'` | Centred (default), near the top or docked to the bottom edge |
1251
+ | fullscreen? | `boolean` | Covers the whole screen (e.g. a form on a phone) |
1252
+ | closable? | `boolean` | Shows the close button at the top (default true) |
1253
+ | closeOnInteractOutside? | `boolean` | A press on the dimmed background closes it (default true) – false for decisions the user has to make |
1254
+ | closeOnEscape? | `boolean` | Escape (web) and the Android back button close it (default true) |
1255
+ | scrollBehavior? | `'inside' \| 'outside'` | `inside`: only the body scrolls, title and buttons stay in view (long content) |
1256
+ | initialFocusRef? | `RefObject<{ focus?: () => void } \| null>` | Gets the keyboard focus when it opens (web) instead of the close button, e.g. the safe choice |
1257
+ | closeLabel? | `string` | Accessible name of the close button |
1258
+ | footer? | `ReactNode` | Action buttons at the bottom |
1259
+ | className? | `string` | |
1260
+ | children? | `ReactNode` | |
1261
+
1262
+ ### DialogHost (React Native)
1263
+
1264
+ Place once at the root of the app; shows the dialogs of `openDialog()`
1265
+
1266
+ - Import: `import { DialogHost } from '@wirecore/wirelayer-native'`
1267
+ - Category: Overlays
1268
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-dialogservice--playground
1269
+
1270
+ | Prop | Type | Description |
1271
+ | --- | --- | --- |
1272
+ | closeLabel? | `string` | Accessible name of the close buttons |
1273
+
1274
+ ### Divider (React Native)
1275
+
1276
+ Without a label a separator; with a label the lines are decorative
1277
+
1278
+ - Import: `import { Divider } from '@wirecore/wirelayer-native'`
1279
+ - Category: Layout
1280
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-divider--playground
1281
+ - Also takes: ViewProps
1282
+
1283
+ | Prop | Type | Description |
1284
+ | --- | --- | --- |
1285
+ | orientation? | `'horizontal' \| 'vertical'` | |
1286
+ | label? | `string` | Text in the middle, e.g. "or" – the lines are then decoration and the text is read |
1287
+ | lineStyle? | `'solid' \| 'dashed' \| 'dotted'` | solid (default), dashed or dotted |
1288
+ | labelPosition? | `'start' \| 'center' \| 'end'` | Where the label sits on the line (default center) |
1289
+ | className? | `string` | |
1290
+
1291
+ ### Drawer (React Native)
1292
+
1293
+ Panel that slides in from an edge of the screen: from the bottom a sheet (default), from the side e.g. for the navigation. A modal with a title, any content and optional buttons; the back button, Escape (web) and a press outside close it. Without animation when reduced motion is on.
1294
+
1295
+ - Import: `import { Drawer } from '@wirecore/wirelayer-native'`
1296
+ - Category: Overlays
1297
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-drawer--playground
1298
+
1299
+ | Prop | Type | Description |
1300
+ | --- | --- | --- |
1301
+ | open | `boolean` | |
1302
+ | onOpenChange | `(open: boolean) => void` | |
1303
+ | title | `string` | |
1304
+ | description? | `string` | |
1305
+ | placement? | `'left' \| 'right' \| 'top' \| 'bottom'` | Edge it slides in from: `bottom` (default, a sheet), `left`, `right` or `top` |
1306
+ | size? | `OverlaySize` | Width (left/right: 280–480 px) or height (top/bottom: 30–85 %); `full` covers the screen |
1307
+ | closable? | `boolean` | Shows the close button (default true) |
1308
+ | closeLabel? | `string` | Accessible name of the close button |
1309
+ | footer? | `ReactNode` | Action buttons at the bottom |
1310
+ | children? | `ReactNode` | |
1311
+
1312
+ ### DurationInput (React Native)
1313
+
1314
+ Duration as one number field per unit (hours and minutes, optionally days and seconds) with the number pad; the whole duration is read as description ("2 hours 30 minutes").
1315
+
1316
+ - Import: `import { DurationInput } from '@wirecore/wirelayer-native'`
1317
+ - Category: Forms
1318
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-durationinput--playground
1319
+
1320
+ | Prop | Type | Description |
1321
+ | --- | --- | --- |
1322
+ | value? | `number \| string \| null` | Total minutes (default), total seconds or ISO 8601 ("PT2H30M") – see valueType |
1323
+ | defaultValue? | `number \| string \| null` | |
1324
+ | onValueChange? | `(value: number \| string \| null) => void` | |
1325
+ | valueType? | `DurationValueType` | What onValueChange gets: total minutes, total seconds or an ISO 8601 duration |
1326
+ | withDays? | `boolean` | Adds days before the hours (the hours then stop at 23) |
1327
+ | withSeconds? | `boolean` | Adds seconds after the minutes |
1328
+ | maxHours? | `number` | Highest number of hours (default 999, with days 23) |
1329
+ | disabled? | `boolean` | |
1330
+ | invalid? | `boolean` | |
1331
+ | size? | `'sm' \| 'md' \| 'lg'` | |
1332
+ | clearable? | `boolean` | Clear button in the field while it has a value |
1333
+ | aria-label? | `string` | Accessible name without a surrounding Field |
1334
+ | className? | `string` | |
1335
+
1336
+ ### EmojiPicker (React Native)
1337
+
1338
+ Emoji picker: search (in the language and English), categories as tabs, a grid of buttons named by the emoji (at least 44 pt); recently used emojis come first. Inline – or in a bottom sheet with `open`/`onOpenChange`.
1339
+
1340
+ - Import: `import { EmojiPicker } from '@wirecore/wirelayer-native'`
1341
+ - Category: Forms
1342
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-emojipicker--playground
1343
+ - Also takes: Omit<ViewProps, 'children'>
1344
+
1345
+ | Prop | Type | Description |
1346
+ | --- | --- | --- |
1347
+ | emojis? | `EmojiData[]` | The emojis to offer (default: about 500 common ones with names and search words in the language) |
1348
+ | columns? | `number` | Emojis per row (default 8) |
1349
+ | search? | `boolean` | Search field (default true) |
1350
+ | recent? | `boolean` | Remembers the last chosen emojis and offers them first (default true) |
1351
+ | recentEmojis? | `string[]` | Recently used emojis, newest first (controlled – e.g. kept by the app in its storage) |
1352
+ | onRecentChange? | `(emojis: string[]) => void` | The recently used emojis changed – store them to keep them across starts |
1353
+ | maxRecent? | `number` | Most recently used emojis kept (default 24) |
1354
+ | label? | `string` | Accessible name of the picker and title of the sheet (default "Emojis") |
1355
+ | onSelect? | `(emoji: EmojiData) => void` | An emoji was chosen |
1356
+ | open? | `boolean` | Shows the picker in a bottom sheet (controlled) – without `open` and `onOpenChange` it is shown inline |
1357
+ | onOpenChange? | `(open: boolean) => void` | |
1358
+ | className? | `string` | |
1359
+
1360
+ ### EmptyState (React Native)
1361
+
1362
+ Placeholder for an empty list or search: icon, title, text and the next step
1363
+
1364
+ - Import: `import { EmptyState } from '@wirecore/wirelayer-native'`
1365
+ - Category: Feedback
1366
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-emptystate--playground
1367
+ - Also takes: ViewProps
1368
+
1369
+ | Prop | Type | Description |
1370
+ | --- | --- | --- |
1371
+ | title | `string` | |
1372
+ | description? | `ReactNode` | Text below the title |
1373
+ | icon? | `IconComponent` | Icon component above the title |
1374
+ | variant? | `'plain' \| 'dashed'` | `dashed`: dashed frame, e.g. an empty upload area |
1375
+ | size? | `'sm' \| 'md'` | |
1376
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | The title becomes a heading of this level (without it plain text) |
1377
+ | actions? | `ReactNode` | Buttons for the next step |
1378
+ | className? | `string` | |
1379
+
1380
+ ### Field (React Native)
1381
+
1382
+ Label, helper text, success or error for one control – passes name, description and state to the control inside
1383
+
1384
+ - Import: `import { Field } from '@wirecore/wirelayer-native'`
1385
+ - Category: Forms
1386
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-field--playground
1387
+ - Also takes: ViewProps
1388
+
1389
+ | Prop | Type | Description |
1390
+ | --- | --- | --- |
1391
+ | id? | `string` | Id of the control (its nativeID) – e.g. the field name, so FormErrorSummary can move the focus to it |
1392
+ | label? | `string` | |
1393
+ | helperText? | `string` | |
1394
+ | error? | `string` | Error message – also marks the field as invalid |
1395
+ | invalid? | `boolean` | |
1396
+ | success? | `string` | Confirmation, e.g. "Username is available": shown with a check icon and read as the description; the control gets a green border |
1397
+ | required? | `boolean` | |
1398
+ | optional? | `boolean` | Marks the field as optional: "(optional)" after the label |
1399
+ | optionalText? | `string` | Text after the label of an optional field (default "optional") |
1400
+ | labelHelp? | `string` | Explanation behind an (i) button next to the label – a tap shows it and screen readers read it |
1401
+ | disabled? | `boolean` | |
1402
+ | children? | `ReactNode` | |
1403
+
1404
+ ### FieldArray (React Native)
1405
+
1406
+ Repeated entries of a form: numbered cards with move up/down and remove (also as screen reader actions on the card), an add button, min/max limits; changes are announced and the screen reader focus follows the entry.
1407
+
1408
+ - Import: `import { FieldArray } from '@wirecore/wirelayer-native/form'`
1409
+ - Category: Forms
1410
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-field--playground
1411
+
1412
+ | Prop | Type | Description |
1413
+ | --- | --- | --- |
1414
+ | field | `AnyFieldApi` | The TanStack Form field of the array (`<form.Field name="contacts" mode="array">`) |
1415
+ | label | `string` | Visible name of the list, e.g. "Contacts" |
1416
+ | newItem | `() => unknown` | The value of a new entry, e.g. `() => ({ name: '', email: '' })` |
1417
+ | renderItem | `(props: FormListItemProps) => ReactNode` | One entry: its fields (e.g. `<form.Field name={`contacts[${index}].name`}>`) |
1418
+ | itemLabel? | `(position: number) => string` | Name of an entry by position (1-based), e.g. (n) => `Contact ${n}` – names the buttons and announcements |
1419
+ | addLabel? | `string` | Text of the add button (default "Add entry") |
1420
+ | min? | `number` | Fewest entries: remove is disabled at this count |
1421
+ | max? | `number` | Most entries: add is disabled at this count |
1422
+ | reorderable? | `boolean` | Up/down buttons and the screen reader actions "Move up"/"Move down" (default true) |
1423
+ | className? | `string` | |
1424
+
1425
+ ### Fieldset (React Native)
1426
+
1427
+ Group of related fields with a legend (role group, named by the legend), help and error text; optionally collapsible
1428
+
1429
+ - Import: `import { Fieldset } from '@wirecore/wirelayer-native'`
1430
+ - Category: Forms
1431
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-fieldset--playground
1432
+ - Also takes: ViewProps
1433
+
1434
+ | Prop | Type | Description |
1435
+ | --- | --- | --- |
1436
+ | legend | `string` | Name of the group – read before each of its fields |
1437
+ | helperText? | `string` | |
1438
+ | errorText? | `string` | Error of the whole group (e.g. "Choose at least one option") |
1439
+ | invalid? | `boolean` | |
1440
+ | disabled? | `boolean` | |
1441
+ | collapsible? | `boolean` | The legend opens and closes the fields |
1442
+ | open? | `boolean` | |
1443
+ | defaultOpen? | `boolean` | Open at the start (default true) |
1444
+ | onOpenChange? | `(open: boolean) => void` | |
1445
+ | className? | `string` | |
1446
+ | children? | `ReactNode` | |
1447
+
1448
+ ### FileUpload (React Native)
1449
+
1450
+ Choose files with the app's pickers (documents, photos, camera); accepted files are listed with a remove button each, rejected ones are announced with the reason. With `upload` every file shows its progress and can be cancelled or retried.
1451
+
1452
+ - Import: `import { FileUpload } from '@wirecore/wirelayer-native'`
1453
+ - Category: Forms
1454
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-fileupload--playground
1455
+
1456
+ | Prop | Type | Description |
1457
+ | --- | --- | --- |
1458
+ | label? | `string` | Visible label of the upload |
1459
+ | pickers | `FilePicker[]` | Sources of files: documentPicker(), imageLibraryPicker(), cameraPicker() or own – several open a choice sheet |
1460
+ | accept? | `string \| string[]` | Allowed types, e.g. "application/pdf" or ["image/png", "image/jpeg"] (presets: FileTypes.images …) |
1461
+ | maxFiles? | `number` | |
1462
+ | maxFileSize? | `number` | Maximum size per file in bytes |
1463
+ | onFilesChange? | `(files: NativeFile[]) => void` | The accepted files after every change |
1464
+ | onFilesReject? | `(rejections: { file: NativeFile; errors: string[] }[]) => void` | Files that were not taken, with the reasons as codes (FILE_INVALID_TYPE, FILE_TOO_LARGE, TOO_MANY_FILES, FILE_EXISTS) |
1465
+ | onUploadComplete? | `(file: NativeFile, state: UploadState) => void` | A file finished uploading (or failed) |
1466
+ | triggerLabel? | `string` | Label of the button that opens the picker |
1467
+ | hint? | `string` | Allowed types and sizes, e.g. "PDF, max. 5 MB" |
1468
+ | upload? | `UploadFunction<NativeFile>` | Uploads a file: report progress with onProgress(0–100), stop when the signal aborts; resolve when done |
1469
+ | autoUpload? | `boolean` | Starts the upload as soon as files are added (otherwise with "Upload all") |
1470
+ | preview? | `boolean` | Thumbnails for images |
1471
+ | disabled? | `boolean` | |
1472
+ | invalid? | `boolean` | |
1473
+ | ref? | `Ref<FileUploadHandle>` | Methods: open, clear, uploadAll |
1474
+ | className? | `string` | |
1475
+
1476
+ ### FormatBytes (React Native)
1477
+
1478
+ A file size in the format of the locale ("1.5 MB")
1479
+
1480
+ - Import: `import { FormatBytes } from '@wirecore/wirelayer-native'`
1481
+ - Category: Data
1482
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-format--playground
1483
+ - Also takes: Omit<TextProps, 'children'>
1484
+
1485
+ | Prop | Type | Description |
1486
+ | --- | --- | --- |
1487
+ | locale? | `string` | Default: the LocaleProvider's |
1488
+ | className? | `string` | |
1489
+ | value | `number \| null \| undefined` | Size in bytes |
1490
+ | base? | `'decimal' \| 'binary'` | `decimal` (default, 1000 – kB, MB) or `binary` (1024 – KiB, MiB) |
1491
+ | maximumFractionDigits? | `number` | Decimals (default 1) |
1492
+ | unitDisplay? | `'short' \| 'long'` | "MB" (default) or "Megabyte" |
1493
+
1494
+ ### FormatDate (React Native)
1495
+
1496
+ A date in the format of the locale ("21.10.2026")
1497
+
1498
+ - Import: `import { FormatDate } from '@wirecore/wirelayer-native'`
1499
+ - Category: Data
1500
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-format--playground
1501
+ - Also takes: Omit<TextProps, 'children'>
1502
+
1503
+ | Prop | Type | Description |
1504
+ | --- | --- | --- |
1505
+ | locale? | `string` | Default: the LocaleProvider's |
1506
+ | className? | `string` | |
1507
+ | value | `DateInput` | |
1508
+ | formatOptions? | `Intl.DateTimeFormatOptions` | Intl options (default `dateStyle: 'medium'`) |
1509
+ | timeZone? | `string` | Time zone, e.g. "Europe/Berlin" |
1510
+
1511
+ ### FormatDateTime (React Native)
1512
+
1513
+ Date and time in the format of the locale ("10/21/2026, 2:30 PM")
1514
+
1515
+ - Import: `import { FormatDateTime } from '@wirecore/wirelayer-native'`
1516
+ - Category: Data
1517
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-format--playground
1518
+
1519
+ | Prop | Type | Description |
1520
+ | --- | --- | --- |
1521
+
1522
+ ### FormatList (React Native)
1523
+
1524
+ A list in the format of the locale ("Berlin, Hamburg, and Munich")
1525
+
1526
+ - Import: `import { FormatList } from '@wirecore/wirelayer-native'`
1527
+ - Category: Data
1528
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-format--playground
1529
+ - Also takes: Omit<TextProps, 'children'>
1530
+
1531
+ | Prop | Type | Description |
1532
+ | --- | --- | --- |
1533
+ | locale? | `string` | Default: the LocaleProvider's |
1534
+ | className? | `string` | |
1535
+ | items | `readonly string[]` | |
1536
+ | type? | `'conjunction' \| 'disjunction' \| 'unit'` | `conjunction` ("a, b, and c", default), `disjunction` ("a, b, or c") or `unit` |
1537
+ | formatStyle? | `'long' \| 'short' \| 'narrow'` | |
1538
+
1539
+ ### FormatRelativeTime (React Native)
1540
+
1541
+ A point in time relative to now ("5 minutes ago", "tomorrow")
1542
+
1543
+ - Import: `import { FormatRelativeTime } from '@wirecore/wirelayer-native'`
1544
+ - Category: Data
1545
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-format--playground
1546
+ - Also takes: Omit<TextProps, 'children'>
1547
+
1548
+ | Prop | Type | Description |
1549
+ | --- | --- | --- |
1550
+ | locale? | `string` | Default: the LocaleProvider's |
1551
+ | className? | `string` | |
1552
+ | value | `DateInput` | |
1553
+ | now? | `DateInput` | Reference time (default now) |
1554
+ | live? | `boolean` | Updates itself as time passes ("1 minute ago" → "2 minutes ago") |
1555
+ | numeric? | `'auto' \| 'always'` | `auto`: "yesterday", `always`: "1 day ago" |
1556
+ | formatStyle? | `'long' \| 'short' \| 'narrow'` | |
1557
+ | showTitle? | `boolean` | Reads the exact date and time as the hint (default true) |
1558
+
1559
+ ### FormErrorSummary (React Native)
1560
+
1561
+ List of the form's errors after submitting: it takes the screen reader focus (VoiceOver/TalkBack) and is announced; each message is a button that moves the focus to its field.
1562
+
1563
+ - Import: `import { FormErrorSummary } from '@wirecore/wirelayer-native'`
1564
+ - Category: Forms
1565
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-formerrorsummary--playground
1566
+ - Also takes: ViewProps
1567
+
1568
+ | Prop | Type | Description |
1569
+ | --- | --- | --- |
1570
+ | errors | `FormErrorSummaryItem[]` | The current errors; nothing is rendered without any |
1571
+ | title? | `string` | Heading (default "Please correct 2 entries") |
1572
+ | autoFocus? | `boolean` | Moves the (screen reader) focus to the summary when errors appear and announces it (WCAG 3.3.1) |
1573
+ | focusKey? | `unknown` | Focuses the summary again whenever this changes while there are errors, e.g. the number of submit attempts |
1574
+
1575
+ ### FormField (React Native)
1576
+
1577
+ Label, helper text, error and the invalid state of the control come from Field; errors show once the field was left (or the form submitted)
1578
+
1579
+ - Import: `import { FormField } from '@wirecore/wirelayer-native/form'`
1580
+ - Category: Forms
1581
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-tanstack-form--playground
1582
+
1583
+ | Prop | Type | Description |
1584
+ | --- | --- | --- |
1585
+ | field | `AnyFieldApi` | The TanStack Form field (from `<form.Field children={(field) => …}>`) |
1586
+ | id? | `string` | Id of the control – e.g. the field name, so FormErrorSummary (useFormErrors) can lead to it |
1587
+ | label? | `string` | |
1588
+ | helperText? | `string` | |
1589
+ | success? | `string` | Confirmation below the control (Field `success`) |
1590
+ | required? | `boolean` | |
1591
+ | optional? | `boolean` | "(optional)" after the label |
1592
+ | labelHelp? | `string` | Explanation behind an (i) button next to the label |
1593
+ | disabled? | `boolean` | |
1594
+ | children? | `ReactNode` | |
1595
+
1596
+ ### FormList (React Native)
1597
+
1598
+ Repeated entries of a form: numbered cards with move up/down and remove (also as screen reader actions on the card), an add button, min/max limits; changes are announced and the screen reader focus follows the entry.
1599
+
1600
+ - Import: `import { FormList } from '@wirecore/wirelayer-native/form'`
1601
+
1602
+ | Prop | Type | Description |
1603
+ | --- | --- | --- |
1604
+ | field | `AnyFieldApi` | The TanStack Form field of the array (`<form.Field name="contacts" mode="array">`) |
1605
+ | label | `string` | Visible name of the list, e.g. "Contacts" |
1606
+ | newItem | `() => unknown` | The value of a new entry, e.g. `() => ({ name: '', email: '' })` |
1607
+ | renderItem | `(props: FormListItemProps) => ReactNode` | One entry: its fields (e.g. `<form.Field name={`contacts[${index}].name`}>`) |
1608
+ | itemLabel? | `(position: number) => string` | Name of an entry by position (1-based), e.g. (n) => `Contact ${n}` – names the buttons and announcements |
1609
+ | addLabel? | `string` | Text of the add button (default "Add entry") |
1610
+ | min? | `number` | Fewest entries: remove is disabled at this count |
1611
+ | max? | `number` | Most entries: add is disabled at this count |
1612
+ | reorderable? | `boolean` | Up/down buttons and the screen reader actions "Move up"/"Move down" (default true) |
1613
+ | className? | `string` | |
1614
+
1615
+ ### Funnel (React Native)
1616
+
1617
+ Bars narrowing with the value (an image named by the title and the stages); the list is the text alternative
1618
+
1619
+ - Import: `import { Funnel } from '@wirecore/wirelayer-native'`
1620
+ - Category: Data
1621
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-funnel--playground
1622
+ - Also takes: Omit<ViewProps, 'children'>
1623
+
1624
+ | Prop | Type | Description |
1625
+ | --- | --- | --- |
1626
+ | stages | `FunnelStage[]` | The stages, widest first |
1627
+ | title | `string` | Title, also the start of the accessible name of the funnel |
1628
+ | hideTitle? | `boolean` | The title only for screen readers |
1629
+ | tone? | `VisualTone` | Colour of the bars (default primary) |
1630
+ | conversion? | `boolean` | Conversion from the previous stage between the bars (default true) |
1631
+ | table? | `boolean` | The stages as a list below (opens on demand) – the text alternative (default true) |
1632
+ | formatValue? | `(value: number) => string` | Formats the values (default: numbers in the locale) |
1633
+ | className? | `string` | |
1634
+
1635
+ ### Gallery (React Native)
1636
+
1637
+ Pictures to swipe through with thumbnails and a full screen view (pinch zoom, buttons for every gesture). The thumbnails are buttons ("Show image 2 of 8"), the current one is marked.
1638
+
1639
+ - Import: `import { Gallery } from '@wirecore/wirelayer-native'`
1640
+ - Category: Media
1641
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_media-gallery--playground
1642
+ - Also takes: ViewProps
1643
+
1644
+ | Prop | Type | Description |
1645
+ | --- | --- | --- |
1646
+ | images | `GalleryImage[]` | |
1647
+ | label | `string` | Accessible name, also the title of the full screen view |
1648
+ | thumbnails? | `boolean` | Row of thumbnails below (default true) |
1649
+ | fullscreen? | `boolean` | Button for the full screen view with zoom (default true) |
1650
+ | hasMore? | `boolean` | More pictures can be loaded – asked for near the end |
1651
+ | loading? | `boolean` | Pictures are loading (busy) |
1652
+ | onLoadMore? | `() => void` | Called once per length when the second-to-last picture is shown |
1653
+ | page? | `number` | |
1654
+ | defaultPage? | `number` | |
1655
+ | onPageChange? | `(page: number) => void` | |
1656
+ | className? | `string` | |
1657
+
1658
+ ### Gantt (React Native)
1659
+
1660
+ Gantt chart for phones as a task list: name, period, duration and progress of each task, a bar in the span of the whole project, groups that expand and collapse, milestones, dependencies and the critical path in words. Editable progress changes with buttons, accessibility actions or the arrow keys (web) on the bar (a slider).
1661
+
1662
+ - Import: `import { Gantt } from '@wirecore/wirelayer-native'`
1663
+ - Category: Data
1664
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-gantt--playground
1665
+ - Also takes: ViewProps
1666
+
1667
+ | Prop | Type | Description |
1668
+ | --- | --- | --- |
1669
+ | tasks | `GanttTask[]` | |
1670
+ | expanded? | `string[]` | Ids of the expanded groups; controlled together with onExpandedChange (default: all expanded) |
1671
+ | defaultExpanded? | `string[]` | |
1672
+ | onExpandedChange? | `(ids: string[]) => void` | |
1673
+ | editable? | `boolean` | The progress of tasks can be changed: buttons beside the bar, accessibility actions (increment/decrement) |
1674
+ | progressStep? | `number` | Step of a progress change in percent (default 10) |
1675
+ | loading? | `boolean` | The tasks are loading (e.g. from a server): the list is busy, without tasks it says "Loading" |
1676
+ | showCriticalPath? | `boolean` | Names the tasks on the critical path (tasks without slack) and outlines their bars |
1677
+ | title? | `string` | Title above the list |
1678
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | Level of the title heading (default 2) |
1679
+ | label? | `string` | Accessible name of the task list (default: the title, else "Project plan") |
1680
+ | locale? | `string` | |
1681
+ | onTaskClick? | `(task: GanttTask) => void` | A task was pressed |
1682
+ | onProgressChange? | `(change: GanttProgress) => void` | The progress of a task was changed (editable) – apply it to your data |
1683
+ | className? | `string` | |
1684
+
1685
+ ### Gauge (React Native)
1686
+
1687
+ A value on a half circle between min and max (role meter), coloured by status or thresholds
1688
+
1689
+ - Import: `import { Gauge } from '@wirecore/wirelayer-native'`
1690
+ - Category: Data
1691
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-gauge--playground
1692
+ - Also takes: Omit<ViewProps, 'children'>
1693
+
1694
+ | Prop | Type | Description |
1695
+ | --- | --- | --- |
1696
+ | value | `number` | |
1697
+ | min? | `number` | |
1698
+ | max? | `number` | |
1699
+ | label | `string` | Visible below, also the accessible name |
1700
+ | status? | `GaugeStatus` | Colour of the arc – wins over thresholds |
1701
+ | thresholds? | `{ from: number; status: GaugeStatus }[]` | Colour by value: the highest `from` not above the value wins |
1702
+ | size? | `'sm' \| 'md' \| 'lg'` | |
1703
+ | formatOptions? | `Intl.NumberFormatOptions` | Format of value, min and max |
1704
+ | locale? | `string` | Default: the LocaleProvider's |
1705
+ | className? | `string` | |
1706
+
1707
+ ### Group (React Native)
1708
+
1709
+ Children side by side, wrapping onto the next line when there is no room
1710
+
1711
+ - Import: `import { Group } from '@wirecore/wirelayer-native'`
1712
+ - Category: Layout
1713
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-group--playground
1714
+ - Also takes: ViewProps
1715
+
1716
+ | Prop | Type | Description |
1717
+ | --- | --- | --- |
1718
+ | gap? | `LayoutGap` | Space between the children (default sm, 8) |
1719
+ | justify? | `'start' \| 'center' \| 'end' \| 'between'` | |
1720
+ | align? | `'middle' \| 'top' \| 'bottom' \| 'baseline' \| 'stretch'` | Vertical alignment (default middle) |
1721
+ | nowrap? | `boolean` | One line, no wrapping |
1722
+ | grow? | `boolean` | The children share the width equally |
1723
+ | className? | `string` | |
1724
+
1725
+ ### Heatmap (React Native)
1726
+
1727
+ A grid of values with row and column headers (a table on the web; on iOS and Android every cell is named "row, column: value"); the colour only adds to the number. Scrolls sideways when it is wider than the screen.
1728
+
1729
+ - Import: `import { Heatmap } from '@wirecore/wirelayer-native'`
1730
+ - Category: Data
1731
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-heatmap--playground
1732
+ - Also takes: Omit<ViewProps, 'children'>
1733
+
1734
+ | Prop | Type | Description |
1735
+ | --- | --- | --- |
1736
+ | caption | `string` | Title of the table, also its accessible name |
1737
+ | rows | `string[]` | Row names |
1738
+ | columns | `string[]` | Column names |
1739
+ | values | `(number \| null)[][]` | Values per row and column; null for no value |
1740
+ | min? | `number` | Range of the colours (default: smallest and largest value) |
1741
+ | max? | `number` | |
1742
+ | showValues? | `boolean` | The values as text in the cells – without, they stay readable for screen readers |
1743
+ | legend? | `boolean` | Colour scale below the table |
1744
+ | formatOptions? | `Intl.NumberFormatOptions` | |
1745
+ | locale? | `string` | Default: the LocaleProvider's |
1746
+ | className? | `string` | |
1747
+
1748
+ ### Highlight (React Native)
1749
+
1750
+ Marks the search terms in a text – nested Text, so it fits into a surrounding Text (e.g. a search result)
1751
+
1752
+ - Import: `import { Highlight } from '@wirecore/wirelayer-native'`
1753
+ - Category: Data
1754
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-highlight--playground
1755
+
1756
+ | Prop | Type | Description |
1757
+ | --- | --- | --- |
1758
+ | text | `string` | |
1759
+ | query | `string \| string[]` | Word(s) to mark |
1760
+ | ignoreCase? | `boolean` | Ignores upper and lower case (default true) |
1761
+ | matchAll? | `boolean` | Every hit, not only the first (default true) |
1762
+ | wholeWord? | `boolean` | Only whole words |
1763
+ | ignoreAccents? | `boolean` | "Muller" finds "Müller" |
1764
+ | colors? | `HighlightColor[]` | Colour per search term (default warn) |
1765
+
1766
+ ### IconButton (React Native)
1767
+
1768
+ Icon-only button with a required accessible name, colours and an optional counter or dot
1769
+
1770
+ - Import: `import { IconButton } from '@wirecore/wirelayer-native'`
1771
+ - Category: Buttons
1772
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_buttons-iconbutton--playground
1773
+ - Also takes: Omit<PressableProps, 'children'>
1774
+
1775
+ | Prop | Type | Description |
1776
+ | --- | --- | --- |
1777
+ | icon | `IconComponent` | Icon component |
1778
+ | label | `string` | Accessible name – icon buttons have no visible text |
1779
+ | variant? | `IconButtonVariant` | |
1780
+ | color? | `ButtonColor` | Colour combined with the variant, like Button `color` (e.g. a danger text button) |
1781
+ | size? | `Size` | |
1782
+ | shape? | `ButtonShape` | Corner shape: `pill` (round, default), `rounded` or `square` |
1783
+ | badge? | `number \| boolean` | Counter (number > 0) or dot (true) in the top-right corner |
1784
+ | badgeLabel? | `(count: string \| null) => string` | Appended to the accessible name while a badge is shown, e.g. "Notifications, 4 new" |
1785
+ | className? | `string` | |
1786
+
1787
+ ### Image (React Native)
1788
+
1789
+ A picture with alternative text and fallback; with `preview` it opens full screen with zoom
1790
+
1791
+ - Import: `import { Image } from '@wirecore/wirelayer-native'`
1792
+ - Category: Media
1793
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_media-image--playground
1794
+ - Also takes: Omit<NativeImageProps, 'source' | 'src' | 'alt'>
1795
+
1796
+ | Prop | Type | Description |
1797
+ | --- | --- | --- |
1798
+ | src | `string` | |
1799
+ | alt | `string` | Describes the picture (empty for decoration) |
1800
+ | preview? | `boolean` | A tap opens the picture full screen: pinch or buttons zoom, rotate |
1801
+ | previewSrc? | `string` | Larger file for the preview (default src) |
1802
+ | fallbackSrc? | `string` | Shown when loading fails, also in the preview |
1803
+ | className? | `string` | |
1804
+
1805
+ ### InlineEdit (React Native)
1806
+
1807
+ The value as a button ("Project name: Relaunch, edit"); pressing it shows an editor with save and cancel. The return key saves; a failed check keeps the editor open with the message.
1808
+
1809
+ - Import: `import { InlineEdit } from '@wirecore/wirelayer-native'`
1810
+ - Category: Forms
1811
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-inlineedit--playground
1812
+
1813
+ | Prop | Type | Description |
1814
+ | --- | --- | --- |
1815
+ | value? | `T` | The value (controlled); it changes only when a valid edit is saved |
1816
+ | defaultValue? | `T` | |
1817
+ | onValueChange? | `(value: T \| undefined) => void` | |
1818
+ | label | `string` | What is edited, e.g. "Project name" – names the editor and the button |
1819
+ | placeholder? | `string` | Text while the value is empty (default "Empty") |
1820
+ | format? | `(value: T \| undefined) => string` | Text of the value (default: the value as text) |
1821
+ | validate? | `(value: T \| undefined) => string \| null \| undefined \| Promise<string \| null \| undefined>` | Checks the value before saving: a message keeps the editor open and is shown (and announced); may be async |
1822
+ | editing? | `boolean` | Editing state (controlled) |
1823
+ | onEditingChange? | `(editing: boolean) => void` | |
1824
+ | onSave? | `(value: T \| undefined) => void` | A valid edit was saved |
1825
+ | onCancel? | `() => void` | |
1826
+ | disabled? | `boolean` | |
1827
+ | saveLabel? | `string` | |
1828
+ | cancelLabel? | `string` | |
1829
+ | renderEditor? | `(props: InlineEditEditorProps<T>) => ReactNode` | The editor: Input (default), Textarea, Select, NumberInput, DatePicker … bound to `value`/`setValue` |
1830
+ | renderDisplay? | `(value: T \| undefined) => ReactNode` | Own rendering of the value |
1831
+ | className? | `string` | |
1832
+
1833
+ ### Input (React Native)
1834
+
1835
+ Text field: size, prefix/suffix, leading icon, clear button, spinner and success check; works inside Field
1836
+
1837
+ - Import: `import { Input } from '@wirecore/wirelayer-native'`
1838
+ - Category: Forms
1839
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-input--playground
1840
+ - Also takes: TextInputProps
1841
+
1842
+ | Prop | Type | Description |
1843
+ | --- | --- | --- |
1844
+ | size? | `Size` | |
1845
+ | invalid? | `boolean` | Marks the input as invalid (also inherited from a surrounding Field) |
1846
+ | disabled? | `boolean` | Disables the input (also inherited from a surrounding Field) |
1847
+ | success? | `boolean` | Confirmed value: green border and check icon (also inherited from a Field with `success`) |
1848
+ | loading? | `boolean` | Shows a spinner in the field and marks it busy (aria-busy), e.g. while checking the value |
1849
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear input") |
1850
+ | leadingIcon? | `IconComponent` | Icon component rendered inside the field, before the text |
1851
+ | prefix? | `string` | Static text segment before the input, e.g. `https://` |
1852
+ | suffix? | `string` | Static text segment after the input, e.g. `.de` |
1853
+ | ref? | `Ref<ComponentRef<typeof TextInput>>` | |
1854
+ | clearable? | `boolean` | Shows a button that empties the field while it has a value (calls onChangeText with "") |
1855
+
1856
+ ### JsonViewer (React Native)
1857
+
1858
+ JSON as nested lists: objects and arrays are buttons that open and close (aria-expanded), values are coloured by type and readable as text (quotes, true/false, null). Search marks the hits and opens their branches.
1859
+
1860
+ - Import: `import { JsonViewer } from '@wirecore/wirelayer-native'`
1861
+ - Category: Data
1862
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-jsonviewer--playground
1863
+ - Also takes: Omit<ViewProps, 'children'>
1864
+
1865
+ | Prop | Type | Description |
1866
+ | --- | --- | --- |
1867
+ | data | `unknown` | The data to show (any JSON value) |
1868
+ | label? | `string` | Accessible name of the tree (default "JSON data") |
1869
+ | defaultExpandedDepth? | `number` | Levels open at first (default 1; 0: all closed, Infinity: all open) |
1870
+ | search? | `boolean` | Search field above the tree: hits are marked and their branches opened, the number of hits is shown |
1871
+ | copyable? | `boolean` | Copy button per node (default true): calls `onCopy` – without `onCopy` only the web copies (navigator.clipboard), iOS and Android then show no copy buttons |
1872
+ | showTypes? | `boolean` | Shows the type of every value as text (otherwise only for screen readers) |
1873
+ | onCopy? | `(path: string, text: string) => void \| Promise<void>` | Copies a value: its path and the text – e.g. `copy(text)` of `useClipboard()` from `@wirecore/wirelayer-native/expo-clipboard`; the copy is announced |
1874
+ | className? | `string` | |
1875
+
1876
+ ### Kanban (React Native)
1877
+
1878
+ Kanban board: columns side by side in a horizontal scroll view. Every card has a button ("Move …") that opens an action sheet – the columns as radio buttons, "Move up"/"Move down" …; the same moves are screen reader actions of the card, and a long press on the button drags the card within its column. WIP limits show a hint when reached or exceeded; columns collapse; every move is announced.
1879
+
1880
+ - Import: `import { Kanban } from '@wirecore/wirelayer-native'`
1881
+ - Category: Data
1882
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-kanban--playground
1883
+
1884
+ | Prop | Type | Description |
1885
+ | --- | --- | --- |
1886
+ | columns? | `KanbanColumn<T>[]` | The columns with their cards (controlled) |
1887
+ | defaultColumns? | `KanbanColumn<T>[]` | |
1888
+ | onColumnsChange? | `(columns: KanbanColumn<T>[]) => void` | |
1889
+ | onMove? | `(move: KanbanMove<T>) => void` | A card was put at another place: from/to column id and index |
1890
+ | onLoadMore? | `(columnId: string) => void` | The column's "Load more" button |
1891
+ | onCollapse? | `(columnId: string, collapsed: boolean) => void` | A column was collapsed or expanded |
1892
+ | label? | `string` | Accessible name of the board (default "Board") |
1893
+ | itemKey? | `ItemAccessor<T, string \| number>` | Key of a card: property name or function (default `id`, else `value`) |
1894
+ | itemLabel? | `ItemAccessor<T, string>` | Text of a card for its button and the announcements (default `label`, `name` or `title`) |
1895
+ | accepts? | `(item: T, to: string, from: string) => boolean` | Whether a card may move into a column |
1896
+ | disabled? | `boolean` | |
1897
+ | titleTag? | `'h2' \| 'h3' \| 'h4'` | Heading level of the column titles (default h3) |
1898
+ | renderCard? | `(item: T, state: { column: KanbanColumn<T>; index: number; grabbed: boolean }) => ReactNode` | Content of a card (default: its text) |
1899
+ | renderAdd? | `(column: KanbanColumn<T>) => ReactNode` | Below the cards of a column, e.g. a button to add a card |
1900
+ | className? | `string` | |
1901
+
1902
+ ### Kbd (React Native)
1903
+
1904
+ A key or shortcut, e.g. in help texts for hardware keyboards (iPad, Android tablets, the web)
1905
+
1906
+ - Import: `import { Kbd } from '@wirecore/wirelayer-native'`
1907
+ - Category: Data
1908
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-kbd--playground
1909
+
1910
+ | Prop | Type | Description |
1911
+ | --- | --- | --- |
1912
+ | children? | `ReactNode` | The key (without `hotkey`) |
1913
+ | hotkey? | `string` | A whole shortcut, shown key by key ("mod+k", "g i") – Apple devices show ⌘ ⌥ ⇧ |
1914
+
1915
+ ### KeyValueEditor (React Native)
1916
+
1917
+ Key-value pairs (FormList preset): two inputs per row, duplicate keys marked
1918
+
1919
+ - Import: `import { KeyValueEditor } from '@wirecore/wirelayer-native/form'`
1920
+
1921
+ | Prop | Type | Description |
1922
+ | --- | --- | --- |
1923
+ | field | `AnyFieldApi` | The TanStack Form field of the array of { key, value } (`mode="array"`) |
1924
+ | label | `string` | Visible name of the list, e.g. "HTTP headers" |
1925
+ | keyLabel? | `string` | Names of the two inputs (default "Key", "Value") |
1926
+ | valueLabel? | `string` | |
1927
+ | keyPlaceholder? | `string` | |
1928
+ | valuePlaceholder? | `string` | |
1929
+ | min? | `number` | |
1930
+ | max? | `number` | |
1931
+ | uniqueKeys? | `boolean` | Marks keys that occur more than once (default true) |
1932
+ | className? | `string` | |
1933
+
1934
+ ### LineChart (React Native)
1935
+
1936
+ Lines (or areas) over the categories – curved, stacked, with reference lines – drawn with react-native-svg. An image named by the title and the trend of each series; the data list below is the text alternative.
1937
+
1938
+ - Import: `import { LineChart } from '@wirecore/wirelayer-native/chart'`
1939
+ - Category: Data
1940
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-linechart--playground
1941
+ - Also takes: Omit<ViewProps, 'children'>
1942
+
1943
+ | Prop | Type | Description |
1944
+ | --- | --- | --- |
1945
+ | data | `ChartRow[]` | The rows: one object per category with a value per series |
1946
+ | categoryKey | `string` | Property of each row with the category (x axis) |
1947
+ | series | `ChartSeries[]` | The series: key of the value, label, colour, stack, dashed … (one value axis – `axis: 'end'` and `type` of the web's CompositeChart are not drawn) |
1948
+ | title | `string` | Title of the chart, also the start of its accessible name |
1949
+ | hideTitle? | `boolean` | Keep the title for screen readers only |
1950
+ | height? | `number` | Height of the plot in pt (default 220) |
1951
+ | table? | `boolean` | The data as a list below the chart (opens on demand) – the text alternative (default true) |
1952
+ | formatValue? | `(value: number) => string` | Formats values in the axis, legend and data list (default: numbers in the locale) |
1953
+ | references? | `ChartReference[]` | Reference lines (`value`) and areas (`from`–`to`) on the value axis, or with `axis: 'x'` on the categories (index of the row); also listed as text below the chart |
1954
+ | legend? | `boolean` | Legend (default: with more than one series) |
1955
+ | className? | `string` | |
1956
+ | curved? | `boolean` | Curved lines (monotone – never past the values) |
1957
+ | area? | `boolean` | Fill the area below every line (an area chart) |
1958
+ | stacked? | `boolean` | Stack all series (with `area`: stacked areas) |
1959
+
1960
+ ### Listbox (React Native)
1961
+
1962
+ Always visible list of options: radio buttons (one value) or checkboxes (`multiple`) – the selection states screen readers announce on iOS and Android. Scrolls inside its box; its end (or "Load more") loads more.
1963
+
1964
+ - Import: `import { Listbox } from '@wirecore/wirelayer-native'`
1965
+ - Category: Forms
1966
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-listbox--playground
1967
+
1968
+ | Prop | Type | Description |
1969
+ | --- | --- | --- |
1970
+ | items | `readonly T[]` | Options: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
1971
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
1972
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
1973
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
1974
+ | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
1975
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
1976
+ | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
1977
+ | onFilterChange? | `(text: string) => void` | Text of the search field – e.g. to load matching items from a server (manualFilter) |
1978
+ | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
1979
+ | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
1980
+ | loadingText? | `string` | Text of the loading row in the list |
1981
+ | hasMore? | `boolean` | More items can be loaded: the end of the list (or "Load more") calls onLoadMore |
1982
+ | onLoadMore? | `() => void` | The end of the list was reached (FlatList onEndReached) or "Load more" pressed |
1983
+ | dataSource? | `DataSource<T>` | Loads the options when the list opens (pages at the end of the list, the search asks it after a typing pause); `getItemsByKeys` gives the labels of chosen values that are not loaded |
1984
+ | minSearchLength? | `number` | Fewest characters the search needs before the data source is asked |
1985
+ | pageSize? | `number` | Options per request of the data source (default 50) |
1986
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an option (instead of icon and label) |
1987
+ | label? | `string` | Visible label, also the list's accessible name |
1988
+ | aria-label? | `string` | Accessible name without a visible label |
1989
+ | multiple? | `boolean` | Several options can be chosen (checkboxes) |
1990
+ | value? | `V[]` | Chosen values; any type (string, number, boolean, object) |
1991
+ | defaultValue? | `V[]` | |
1992
+ | onValueChange? | `(value: V[]) => void` | |
1993
+ | disabled? | `boolean` | |
1994
+ | invalid? | `boolean` | |
1995
+ | filter? | `boolean` | Search field above the list; filters by label, ignoring case and accents |
1996
+ | checkboxes? | `boolean` | Check boxes before the options (`multiple`, default) – false shows a check mark |
1997
+ | selectAll? | `boolean` | "Select all" above the options (`multiple`) – takes the options in view (filtered, enabled) |
1998
+ | className? | `string` | |
1999
+
2000
+ ### LiveAnnouncer (React Native)
2001
+
2002
+ Optional, around the app: on the web the live regions of `announce()` sit inside the app (polite and assertive); iOS and Android announce without it.
2003
+
2004
+ - Import: `import { LiveAnnouncer } from '@wirecore/wirelayer-native'`
2005
+ - Category: Utilities
2006
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_utilities-liveannouncer--playground
2007
+
2008
+ | Prop | Type | Description |
2009
+ | --- | --- | --- |
2010
+ | children? | `ReactNode` | |
2011
+
2012
+ ### LocaleProvider (React Native)
2013
+
2014
+ Same API as in
2015
+
2016
+ - Import: `import { LocaleProvider } from '@wirecore/wirelayer-native'`
2017
+
2018
+ | Prop | Type | Description |
2019
+ | --- | --- | --- |
2020
+ | locale? | `string` | BCP 47 tag, e.g. "en-US": texts, number and date formats |
2021
+ | translations? | `Translations` | Texts of the language, e.g. `fr` from `locales/fr` – else built in (de, en), registerLocale or English |
2022
+ | children? | `ReactNode` | |
2023
+
2024
+ ### LogViewer (React Native)
2025
+
2026
+ Log: a list of numbered lines that wrap; level as icon and text; search filters and marks; level chips; new lines stay in view until you scroll up (announced as paused), "Jump to end" and the switch follow them again. Older lines load at the top.
2027
+
2028
+ - Import: `import { LogViewer } from '@wirecore/wirelayer-native'`
2029
+ - Category: Data
2030
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-logviewer--playground
2031
+ - Also takes: Omit<ViewProps, 'children'>
2032
+
2033
+ | Prop | Type | Description |
2034
+ | --- | --- | --- |
2035
+ | lines? | `(LogLine \| string)[]` | The lines, oldest first – strings or { text, level, time, id } (with `dataSource`: the newest, after the loaded) |
2036
+ | dataSource? | `DataSource<LogLine \| string>` | Older lines from a server, page by page going back in time – each page newest first (page or cursor). The first page is loaded at the start, "Load older entries" loads the next; `lines` (e.g. live lines) follow them |
2037
+ | pageSize? | `number` | Lines per page of the data source (default 200) |
2038
+ | label? | `string` | Accessible name of the list (default "Log") |
2039
+ | search? | `boolean` | Search field: filters the lines and marks the hits (default true) |
2040
+ | levelFilter? | `boolean` | Chips to show and hide the levels (default true) |
2041
+ | levels? | `LogLevel[]` | Levels shown (controlled, default all) |
2042
+ | onLevelsChange? | `(levels: LogLevel[]) => void` | |
2043
+ | detectLevels? | `boolean` | Reads the level from the text when a line has none ("ERROR", "[warn]" …, default true) |
2044
+ | autoScroll? | `boolean` | Keeps the newest line in view; scrolling up pauses it (default true) |
2045
+ | onAutoScrollChange? | `(autoScroll: boolean) => void` | |
2046
+ | lineNumbers? | `boolean` | Line numbers (default true) |
2047
+ | hasMore? | `boolean` | Older lines can be loaded: a button at the top calls onLoadMore |
2048
+ | onLoadMore? | `() => void` | Load older lines (they are added at the top, the view stays where it is) |
2049
+ | loading? | `boolean` | Older lines are loading |
2050
+ | className? | `string` | |
2051
+
2052
+ ### Markdown (React Native)
2053
+
2054
+ Markdown with the shared parser of the web (`markdownElements`): headings, lists and task lists, links, code, quotes and tables as React Native views and nested Text – no HTML, no web view.
2055
+
2056
+ - Import: `import { Markdown } from '@wirecore/wirelayer-native'`
2057
+ - Category: Data
2058
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-markdown--playground
2059
+ - Also takes: ViewProps
2060
+
2061
+ | Prop | Type | Description |
2062
+ | --- | --- | --- |
2063
+ | source | `string` | The Markdown text – rendered as elements, never as HTML |
2064
+ | headingLevel? | `number` | Heading level of `#` (default 2) |
2065
+ | breaks? | `boolean` | A single line break is a break (chat style) instead of a space |
2066
+ | renderCode? | `(code: { language?: string; code: string }) => ReactNode` | A code block, e.g. with own highlighting (default: monospace text) |
2067
+ | onLinkPress? | `(href: string) => void` | A tap on a link (default: Linking.openURL) – only http(s), mailto, tel and relative links get here |
2068
+ | className? | `string` | |
2069
+
2070
+ ### MaskInput (React Native)
2071
+
2072
+ Text input with a fixed format (IBAN, phone, postcode …): separators are added while typing
2073
+
2074
+ - Import: `import { MaskInput } from '@wirecore/wirelayer-native'`
2075
+ - Category: Forms
2076
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-maskinput--playground
2077
+ - Also takes: TextInputProps
2078
+
2079
+ | Prop | Type | Description |
2080
+ | --- | --- | --- |
2081
+ | size? | `Size` | |
2082
+ | invalid? | `boolean` | Marks the input as invalid (also inherited from a surrounding Field) |
2083
+ | disabled? | `boolean` | Disables the input (also inherited from a surrounding Field) |
2084
+ | success? | `boolean` | Confirmed value: green border and check icon (also inherited from a Field with `success`) |
2085
+ | loading? | `boolean` | Shows a spinner in the field and marks it busy (aria-busy), e.g. while checking the value |
2086
+ | clearable? | `boolean` | Shows a button that empties the field while it has a value |
2087
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear input") |
2088
+ | leadingIcon? | `IconComponent` | Icon component rendered inside the field, before the text |
2089
+ | prefix? | `string` | Static text segment before the input, e.g. `https://` |
2090
+ | suffix? | `string` | Static text segment after the input, e.g. `.de` |
2091
+ | ref? | `Ref<ComponentRef<typeof TextInput>>` | |
2092
+ | mask | `string` | 9 digit, a letter, * letter or digit – everything else is inserted by itself, \\ escapes a token, `?` starts an optional rest |
2093
+ | value? | `string` | Masked value (or the raw one with `unmask`) |
2094
+ | defaultValue? | `string` | |
2095
+ | onValueChange? | `(value: string, raw: string) => void` | The value (masked, or raw with `unmask`) and only the typed characters |
2096
+ | onComplete? | `(value: string) => void` | Every required slot is filled |
2097
+ | slotChar? | `string` | Character for the open slots in the placeholder (default "_") |
2098
+ | unmask? | `boolean` | value/onValueChange hold only the typed characters ("891234" instead of "DE89 1234") |
2099
+ | autoClear? | `boolean` | Empties an incomplete value when the field is left |
2100
+ | tokens? | `MaskTokens` | Own tokens, e.g. { h: /[0-9a-f]/i } – they extend 9, a and * |
2101
+
2102
+ ### Mentions (React Native)
2103
+
2104
+ Text field with mentions: the trigger ("@") opens suggestions below the field, a tap inserts the entry. The value keeps the mentions as markup ("@[Anna Berg](anna)"), the field shows the plain text.
2105
+
2106
+ - Import: `import { Mentions } from '@wirecore/wirelayer-native'`
2107
+ - Category: Forms
2108
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-mentions--playground
2109
+
2110
+ | Prop | Type | Description |
2111
+ | --- | --- | --- |
2112
+ | value? | `string` | Text with markup: "Hello |
2113
+ | defaultValue? | `string` | |
2114
+ | onValueChange? | `(value: string) => void` | |
2115
+ | onMentionsChange? | `(mentions: Mention[]) => void` | The mentions in the text after every change |
2116
+ | onSearch? | `(trigger: string, query: string) => void` | Text typed after the trigger (e.g. to load entries yourself) |
2117
+ | loading? | `boolean` | Entries are being loaded (after onSearch): the list shows "Loading" |
2118
+ | items? | `readonly T[]` | Entries for the trigger |
2119
+ | dataSource? | `DataSource<T>` | Loads the entries for the typed text |
2120
+ | trigger? | `string` | Character that opens the suggestions (default "@") |
2121
+ | itemLabel? | `ItemAccessor<T, string>` | Text of an entry: property name or function (default `label`) |
2122
+ | itemValue? | `ItemAccessor<T, unknown>` | Id of an entry in the markup: property name or function (default `value`, else `id`) |
2123
+ | limit? | `number` | Most suggestions shown (default 8) |
2124
+ | renderItem? | `(item: T, state: { selected: boolean; disabled: boolean }) => ReactNode` | Content of a suggestion (instead of its text) |
2125
+ | placeholder? | `string` | |
2126
+ | invalid? | `boolean` | |
2127
+ | disabled? | `boolean` | |
2128
+ | aria-label? | `string` | Accessible name without a surrounding Field (default "Message") |
2129
+ | className? | `string` | |
2130
+
2131
+ ### Menu (React Native)
2132
+
2133
+ Action menu: the trigger opens a sheet with the actions (the mobile pattern for menus) – with checkbox and radio items, groups, separators and submenus (shown in the same sheet with a back row).
2134
+
2135
+ - Import: `import { Menu } from '@wirecore/wirelayer-native'`
2136
+ - Category: Overlays
2137
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-menu--playground
2138
+
2139
+ | Prop | Type | Description |
2140
+ | --- | --- | --- |
2141
+ | onSelect? | `(value: string) => void` | |
2142
+ | onCheckedChange? | `(value: string, checked: boolean) => void` | A checkbox item was switched |
2143
+ | onValueChange? | `(name: string, value: string) => void` | A radio item was chosen: the `name` of its group and its value |
2144
+ | items | `MenuEntry[]` | |
2145
+ | title? | `string` | Title of the sheet |
2146
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
2147
+ | open? | `boolean` | |
2148
+ | defaultOpen? | `boolean` | |
2149
+ | onOpenChange? | `(open: boolean) => void` | |
2150
+ | children? | `ReactElement<{ onPress?: () => void }>` | The trigger, e.g. a Button or IconButton (gets onPress) – optional when `open` is controlled |
2151
+
2152
+ ### MeterGroup (React Native)
2153
+
2154
+ Several values in one bar with a legend, e.g. storage by type – the legend gives every value as text
2155
+
2156
+ - Import: `import { MeterGroup } from '@wirecore/wirelayer-native'`
2157
+ - Category: Data
2158
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-metergroup--playground
2159
+
2160
+ | Prop | Type | Description |
2161
+ | --- | --- | --- |
2162
+ | items | `MeterGroupItem[]` | |
2163
+ | label | `string` | Visible label, also the name of the group |
2164
+ | max? | `number` | Default: the sum of the values |
2165
+ | formatValue? | `(value: number, max: number) => string` | Text of a value (default the percentage) |
2166
+ | orientation? | `'horizontal' \| 'vertical'` | `vertical`: the bar grows from the bottom |
2167
+ | legendPosition? | `'top' \| 'bottom' \| 'start' \| 'end'` | Where the legend is (default bottom) |
2168
+ | legendOrientation? | `'horizontal' \| 'vertical'` | Legend items side by side (default) or below each other |
2169
+ | className? | `string` | |
2170
+
2171
+ ### MiniCalendar (React Native)
2172
+
2173
+ Days in a row with arrows to earlier and later days – a radio group, each day named with its full date
2174
+
2175
+ - Import: `import { MiniCalendar } from '@wirecore/wirelayer-native'`
2176
+ - Category: Forms
2177
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-minicalendar--playground
2178
+
2179
+ | Prop | Type | Description |
2180
+ | --- | --- | --- |
2181
+ | value? | `T \| null` | Chosen day (ISO "2026-10-20" or Date) |
2182
+ | defaultValue? | `T \| null` | |
2183
+ | onValueChange? | `(value: T \| null) => void` | |
2184
+ | valueType? | `DateValueType` | What onValueChange gets: an ISO string (default) or a Date |
2185
+ | startDate? | `DateLike` | First day shown at the start (default: the start of the week of the value or today) |
2186
+ | days? | `number` | Number of days in the strip (default 7) |
2187
+ | min? | `DateLike` | Earliest day that can be chosen |
2188
+ | max? | `DateLike` | Latest day that can be chosen |
2189
+ | isDateUnavailable? | `(date: string) => boolean` | Days that cannot be chosen – receives the ISO date |
2190
+ | firstDayOfWeek? | `number` | First day of the week for the start: 0 = Sunday … 6; default from the locale |
2191
+ | label? | `string` | Name of the strip (default "Days") |
2192
+ | disabled? | `boolean` | |
2193
+ | className? | `string` | |
2194
+
2195
+ ### MonthPicker (React Native)
2196
+
2197
+ Month field ("10.2026"): picks from the month grid of a year in a sheet; range: start – end
2198
+
2199
+ - Import: `import { MonthPicker } from '@wirecore/wirelayer-native'`
2200
+ - Category: Forms
2201
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-monthpicker--playground
2202
+
2203
+ | Prop | Type | Description |
2204
+ | --- | --- | --- |
2205
+ | defaultValue? | `T` | |
2206
+ | onValueChange? | `(value: T) => void` | |
2207
+ | range? | `boolean` | Start and end instead of one |
2208
+ | min? | `string` | Earliest selectable period (same format as the value) |
2209
+ | max? | `string` | Latest selectable period |
2210
+ | presets? | `(PeriodPreset \| { label: string; value: PeriodRange })[]` | Buttons below the grid: "thisMonth", "lastQuarter", "last3Years" … or own { label, value } |
2211
+ | disabled? | `boolean` | |
2212
+ | invalid? | `boolean` | |
2213
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2214
+ | clearable? | `boolean` | Clear button in the field while it has a value |
2215
+ | aria-label? | `string` | Accessible name without a surrounding Field |
2216
+ | closeLabel? | `string` | |
2217
+ | className? | `string` | |
2218
+ | value? | `T` | Month as "2026-10"; with range { start, end } |
2219
+
2220
+ ### MultiSelect (React Native)
2221
+
2222
+ Several choices: the trigger opens a sheet of checkboxes, every tap changes the value at once
2223
+
2224
+ - Import: `import { MultiSelect } from '@wirecore/wirelayer-native'`
2225
+ - Category: Forms
2226
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-multiselect--playground
2227
+
2228
+ | Prop | Type | Description |
2229
+ | --- | --- | --- |
2230
+ | items | `readonly T[]` | Options: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
2231
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
2232
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
2233
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
2234
+ | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
2235
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
2236
+ | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
2237
+ | onFilterChange? | `(text: string) => void` | Text of the search field – e.g. to load matching items from a server (manualFilter) |
2238
+ | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
2239
+ | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
2240
+ | loadingText? | `string` | Text of the loading row in the list |
2241
+ | hasMore? | `boolean` | More items can be loaded: the end of the list (or "Load more") calls onLoadMore |
2242
+ | onLoadMore? | `() => void` | The end of the list was reached (FlatList onEndReached) or "Load more" pressed |
2243
+ | dataSource? | `DataSource<T>` | Loads the options when the list opens (pages at the end of the list, the search asks it after a typing pause); `getItemsByKeys` gives the labels of chosen values that are not loaded |
2244
+ | minSearchLength? | `number` | Fewest characters the search needs before the data source is asked |
2245
+ | pageSize? | `number` | Options per request of the data source (default 50) |
2246
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an option (instead of icon and label) |
2247
+ | value? | `V[]` | Selected values; any type (string, number, boolean, object) |
2248
+ | defaultValue? | `V[]` | |
2249
+ | onValueChange? | `(value: V[]) => void` | |
2250
+ | placeholder? | `string` | |
2251
+ | maxShown? | `number` | Up to this many labels in the trigger, then the summary |
2252
+ | summary? | `(count: number) => string` | Trigger text once more than `maxShown` items are selected, e.g. "4 selected" |
2253
+ | title? | `string` | Title of the sheet – default: the Field label or the placeholder |
2254
+ | aria-label? | `string` | Accessible name without a surrounding Field |
2255
+ | closeLabel? | `string` | |
2256
+ | disabled? | `boolean` | |
2257
+ | invalid? | `boolean` | |
2258
+ | display? | `'text' \| 'chips'` | Selected items as text (default) or as chips in the field (the sheet removes them) |
2259
+ | checkboxes? | `boolean` | Check boxes before the options (default); false shows a check mark after the label |
2260
+ | selectAll? | `boolean` | "Select all" above the options – takes the options in view (filtered, enabled) |
2261
+ | max? | `number` | Most options that can be chosen; the others are disabled then and the limit is announced |
2262
+ | clearable? | `boolean` | Button next to the field that clears all values |
2263
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
2264
+ | filter? | `boolean` | Search field at the top of the sheet; filters by label, ignoring case and accents |
2265
+ | size? | `'sm' \| 'md' \| 'lg'` | Height of the field: 32, 40 (default) or 48 pt |
2266
+ | renderValue? | `(items: T[]) => ReactNode` | Content of the field for the selected items (display "text") |
2267
+ | className? | `string` | |
2268
+
2269
+ ### NavigationMenu (React Native)
2270
+
2271
+ The website navigation and MegaMenu on a phone: a menu button opens a drawer from the left with one accordion section per area (the one with the current page open) and its links.
2272
+
2273
+ - Import: `import { NavigationMenu } from '@wirecore/wirelayer-native'`
2274
+ - Category: Navigation
2275
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-navigationmenu--playground
2276
+
2277
+ | Prop | Type | Description |
2278
+ | --- | --- | --- |
2279
+ | items | `NavigationMenuEntry[]` | |
2280
+ | label? | `string` | Accessible name of the navigation (default "Main navigation") |
2281
+ | menuLabel? | `string` | Name of the menu button and title of the drawer (default "Menu") |
2282
+ | currentHref? | `string` | href of the current screen |
2283
+ | isCurrent? | `(link: NavigationMenuLink \| NavigationMenuEntry) => boolean` | |
2284
+ | onNavigate? | `(link: NavigationMenuLink \| NavigationMenuEntry) => void` | A tap on a link – the drawer closes, navigate with the app's router |
2285
+ | open? | `boolean` | |
2286
+ | defaultOpen? | `boolean` | |
2287
+ | onOpenChange? | `(open: boolean) => void` | |
2288
+ | children? | `ReactElement<{ onPress?: () => void }>` | Own trigger (gets onPress) – default an icon button with the menu icon |
2289
+
2290
+ ### NotificationCenter (React Native)
2291
+
2292
+ Bell with the unread count that opens the notifications in a sheet: grouped by day, unread marked (also as text), "Mark as read" per entry and for all, "Load more". Newly arrived unread ones are announced.
2293
+
2294
+ - Import: `import { NotificationCenter } from '@wirecore/wirelayer-native'`
2295
+ - Category: Feedback
2296
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-notificationcenter--playground
2297
+
2298
+ | Prop | Type | Description |
2299
+ | --- | --- | --- |
2300
+ | items? | `NotificationItem[]` | The notifications – with `dataSource` the ones pushed in (e.g. live), shown before the loaded pages |
2301
+ | dataSource? | `DataSource<NotificationItem>` | Loads the notifications page by page ("Load more") |
2302
+ | pageSize? | `number` | Notifications per page of the data source (default 20) |
2303
+ | unreadCount? | `number` | Count on the bell – default: the unread items |
2304
+ | hasMore? | `boolean` | More can be loaded ("Load more") – without dataSource |
2305
+ | loading? | `boolean` | Older notifications are loading – without dataSource |
2306
+ | open? | `boolean` | |
2307
+ | onOpenChange? | `(open: boolean) => void` | |
2308
+ | label? | `string` | Name of the bell and title of the sheet (default "Notifications") |
2309
+ | now? | `Date \| string` | Reference time for "Today"/"Yesterday" (default now) |
2310
+ | emptyText? | `string` | Text without notifications |
2311
+ | onMarkRead? | `(id: string) => void` | |
2312
+ | onMarkAllRead? | `() => void` | |
2313
+ | onLoadMore? | `() => void` | "Load more" without dataSource |
2314
+ | onSelect? | `(item: NotificationItem) => void` | A tap on a notification |
2315
+ | renderActions? | `(item: NotificationItem) => ReactNode` | Own buttons of a notification |
2316
+
2317
+ ### NumberFormatter (React Native)
2318
+
2319
+ A number in the format of the locale (Intl.NumberFormat): grouping, decimals, currency, percent, units
2320
+
2321
+ - Import: `import { NumberFormatter } from '@wirecore/wirelayer-native'`
2322
+ - Category: Data
2323
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-numberformatter--playground
2324
+ - Also takes: Omit<TextProps, 'children'>
2325
+
2326
+ | Prop | Type | Description |
2327
+ | --- | --- | --- |
2328
+ | value | `number \| bigint \| null \| undefined` | |
2329
+ | formatOptions? | `Intl.NumberFormatOptions` | Intl options, e.g. `{ style: 'currency', currency: 'EUR' }` |
2330
+ | locale? | `string` | Default: the LocaleProvider's |
2331
+ | className? | `string` | |
2332
+
2333
+ ### NumberInput (React Native)
2334
+
2335
+ Number field with − / + buttons and the decimal keyboard. Typed text is read with comma or point ("1.234,5" and "1234.5" both work); leaving the field clamps it to min/max.
2336
+
2337
+ - Import: `import { NumberInput } from '@wirecore/wirelayer-native'`
2338
+ - Category: Forms
2339
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-numberinput--playground
2340
+
2341
+ | Prop | Type | Description |
2342
+ | --- | --- | --- |
2343
+ | value? | `number \| null` | Number or null (empty) |
2344
+ | defaultValue? | `number \| null` | |
2345
+ | onValueChange? | `(value: number \| null) => void` | |
2346
+ | min? | `number` | |
2347
+ | max? | `number` | |
2348
+ | step? | `number` | |
2349
+ | size? | `Size` | |
2350
+ | aria-label? | `string` | Accessible name without a surrounding Field |
2351
+ | invalid? | `boolean` | |
2352
+ | disabled? | `boolean` | |
2353
+ | success? | `boolean` | Confirmed value: green border and check icon (also inherited from a Field with `success`) |
2354
+ | stepper? | `boolean` | Shows the − / + buttons (default) |
2355
+ | prefix? | `string` | Free text before the number, e.g. "≈" |
2356
+ | suffix? | `string` | Free text after the number, e.g. "pcs" |
2357
+ | formatOptions? | `Intl.NumberFormatOptions` | Display format while the field is not focused, e.g. { style: 'currency', currency: 'EUR' } |
2358
+ | allowNegative? | `boolean` | Allows numbers below zero (default); false sets the minimum to 0 |
2359
+ | allowDecimal? | `boolean` | Allows decimals (default); false rounds to whole numbers |
2360
+ | decimals? | `number` | Exactly this many decimals, e.g. 2 → "12.50" |
2361
+ | clampBehavior? | `'blur' \| 'strict' \| 'none'` | Out of min/max: `blur` corrects the value when the field is left (default), `strict` while typing, `none` never |
2362
+ | selectOnFocus? | `boolean` | Selects the whole number when the field gets the focus |
2363
+ | loading? | `boolean` | Shows a spinner in the field and marks it busy (aria-busy) |
2364
+ | clearable? | `boolean` | Shows a button that empties the field while it has a value |
2365
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear input") |
2366
+ | className? | `string` | |
2367
+
2368
+ ### OrderList (React Native)
2369
+
2370
+ Choose an item (radio buttons), then move it with the buttons below – or with the screen reader actions of every item ("Move to top", "Move up" …), on the web also with Alt + arrow keys. The new position is announced.
2371
+
2372
+ - Import: `import { OrderList } from '@wirecore/wirelayer-native'`
2373
+ - Category: Data
2374
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-orderlist--playground
2375
+
2376
+ | Prop | Type | Description |
2377
+ | --- | --- | --- |
2378
+ | value? | `T[]` | Items in their order; SelectItem objects or any objects/values (see itemValue/itemLabel) |
2379
+ | defaultValue? | `T[]` | |
2380
+ | onValueChange? | `(items: T[]) => void` | |
2381
+ | label | `string` | Visible label of the list |
2382
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
2383
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
2384
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
2385
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
2386
+ | filter? | `boolean` | A search field above the list (moving works on the whole list) |
2387
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an item (instead of icon and label) |
2388
+ | className? | `string` | |
2389
+
2390
+ ### OrgChart (React Native)
2391
+
2392
+ Hierarchy of people as a vertical, indented list (nested lists – screen readers read the structure): a card per person (avatar, name, role), a button beside each team that shows or hides it, teams loaded on demand.
2393
+
2394
+ - Import: `import { OrgChart } from '@wirecore/wirelayer-native'`
2395
+ - Category: Data
2396
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-orgchart--playground
2397
+
2398
+ | Prop | Type | Description |
2399
+ | --- | --- | --- |
2400
+ | node | `OrgChartNode` | The top of the hierarchy |
2401
+ | label | `string` | Accessible name, e.g. "Org chart" |
2402
+ | collapsible? | `boolean` | A button beside each node with a team shows or hides it |
2403
+ | collapsedKeys? | `string[]` | Keys of the nodes whose team is hidden |
2404
+ | defaultCollapsedKeys? | `string[]` | |
2405
+ | onCollapsedKeysChange? | `(keys: string[]) => void` | |
2406
+ | selectionMode? | `'none' \| 'single' \| 'multiple'` | Nodes can be chosen (toggle buttons): one or several |
2407
+ | selectedKeys? | `string[]` | |
2408
+ | defaultSelectedKeys? | `string[]` | |
2409
+ | onSelectedKeysChange? | `(keys: string[]) => void` | |
2410
+ | loadChildren? | `(node: OrgChartNode, request: { signal: AbortSignal }) => Promise<OrgChartNode[]>` | Loads the team of a node with `hasChildren: true` when it is shown; the signal aborts it |
2411
+ | onLoadChildren? | `(node: OrgChartNode) => void` | A lazy node opened and there is no loadChildren/dataSource: add its team to the node |
2412
+ | dataSource? | `DataSource<OrgChartNode>` | Source of the teams of lazy nodes (`getChildren`) |
2413
+ | renderContent? | `(node: OrgChartNode, state: OrgChartNodeState) => ReactNode` | Content of a node card (instead of avatar, label and title) |
2414
+ | className? | `string` | |
2415
+
2416
+ ### OverflowList (React Native)
2417
+
2418
+ A row of items (chips, avatars, tags) that shows as many as fit and "+N" for the rest – a tap opens them in a sheet
2419
+
2420
+ - Import: `import { OverflowList } from '@wirecore/wirelayer-native'`
2421
+ - Category: Data
2422
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-overflowlist--playground
2423
+ - Also takes: Omit<ViewProps, 'children'>
2424
+
2425
+ | Prop | Type | Description |
2426
+ | --- | --- | --- |
2427
+ | items | `readonly T[]` | |
2428
+ | renderItem | `(item: T, index: number) => ReactNode` | One item – in the row and in the sheet |
2429
+ | renderOverflow? | `(items: T[]) => ReactNode` | Own content of the sheet for the hidden items |
2430
+ | maxVisible? | `number` | At most this many visible |
2431
+ | maxRows? | `number` | Rows before the rest is hidden (default 1) |
2432
+ | collapseFrom? | `'end' \| 'start'` | Which items are hidden first (default end) |
2433
+ | label? | `string` | Accessible name of the list |
2434
+ | overflowTitle? | `string` | Title of the sheet (default "More items") |
2435
+ | className? | `string` | |
2436
+
2437
+ ### PageHeader (React Native)
2438
+
2439
+ Heading of a screen with back button, status, facts, actions and tabs
2440
+
2441
+ - Import: `import { PageHeader } from '@wirecore/wirelayer-native'`
2442
+ - Category: Layout
2443
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-pageheader--playground
2444
+ - Also takes: ViewProps
2445
+
2446
+ | Prop | Type | Description |
2447
+ | --- | --- | --- |
2448
+ | title | `string` | |
2449
+ | headingLevel? | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | Level of the heading (default 1) |
2450
+ | subtitle? | `string` | |
2451
+ | onBack? | `() => void` | Shows a back button above the title |
2452
+ | backLabel? | `string` | Text of the back button (default "Back") |
2453
+ | status? | `string` | Status as a badge next to the title |
2454
+ | statusVariant? | `BadgeVariant` | |
2455
+ | size? | `'sm' \| 'md'` | `sm` for dialogs and panels |
2456
+ | divided? | `boolean` | Line below |
2457
+ | breadcrumb? | `ReactNode` | Breadcrumb above the title |
2458
+ | meta? | `ReactNode` | Facts below the title, e.g. date and owner |
2459
+ | actions? | `ReactNode` | Buttons next to the title |
2460
+ | tabs? | `ReactNode` | Tabs below |
2461
+ | className? | `string` | |
2462
+
2463
+ ### Pagination (React Native)
2464
+
2465
+ Page navigation for lists and tables: page buttons 44 pt (or compact), the summary as a live region – iOS and Android announce the new page.
2466
+
2467
+ - Import: `import { Pagination } from '@wirecore/wirelayer-native'`
2468
+ - Category: Data
2469
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-pagination--playground
2470
+ - Also takes: ViewProps
2471
+
2472
+ | Prop | Type | Description |
2473
+ | --- | --- | --- |
2474
+ | count | `number` | Total number of items |
2475
+ | pageSize? | `number` | Items per page (default 10) |
2476
+ | onPageSizeChange? | `(pageSize: number) => void` | |
2477
+ | page? | `number` | Current page, from 1 |
2478
+ | defaultPage? | `number` | |
2479
+ | onPageChange? | `(page: number) => void` | |
2480
+ | siblingCount? | `number` | Pages beside the current one (default 1) |
2481
+ | boundaryCount? | `number` | Pages at both ends (default 1) |
2482
+ | showSummary? | `boolean` | Shows "1–10 of 240" (default true) |
2483
+ | summary? | `(range: PaginationRange) => string` | Own text of the summary |
2484
+ | pageSizes? | `number[]` | Choice of the page size, e.g. [10, 25, 50] – a select in a sheet |
2485
+ | variant? | `'full' \| 'compact' \| 'auto'` | `full` (default): page buttons, `compact`: "Page 2 of 9" between the arrows, `auto`: compact below 448 pt |
2486
+ | withEdges? | `boolean` | Buttons for the first and last page |
2487
+ | hideSinglePage? | `boolean` | Nothing when everything fits on one page |
2488
+ | translations? | `Partial<PaginationTranslations>` | |
2489
+ | className? | `string` | |
2490
+
2491
+ ### Panel (React Native)
2492
+
2493
+ Framed section with a heading, actions and footer; with `toggleable` the heading opens and closes it
2494
+
2495
+ - Import: `import { Panel } from '@wirecore/wirelayer-native'`
2496
+ - Category: Layout
2497
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-panel--playground
2498
+ - Also takes: ViewProps
2499
+
2500
+ | Prop | Type | Description |
2501
+ | --- | --- | --- |
2502
+ | title | `string` | |
2503
+ | headingLevel? | `2 \| 3 \| 4` | Level of the heading (default 3) |
2504
+ | toggleable? | `boolean` | The heading opens and closes the content |
2505
+ | open? | `boolean` | |
2506
+ | defaultOpen? | `boolean` | Open at the start (default true) |
2507
+ | onOpenChange? | `(open: boolean) => void` | |
2508
+ | actions? | `ReactNode` | Buttons in the header, beside the heading |
2509
+ | footer? | `ReactNode` | Bar at the bottom |
2510
+ | className? | `string` | |
2511
+ | children? | `ReactNode` | |
2512
+
2513
+ ### PasswordInput (React Native)
2514
+
2515
+ Password field with a button that shows/hides the password ("Show/Hide password"); optional strength meter and requirement checklist. New passwords: pass `autoComplete="new-password"` (and `textContentType="newPassword"` on iOS).
2516
+
2517
+ - Import: `import { PasswordInput } from '@wirecore/wirelayer-native'`
2518
+ - Category: Forms
2519
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-passwordinput--playground
2520
+ - Also takes: TextInputProps
2521
+
2522
+ | Prop | Type | Description |
2523
+ | --- | --- | --- |
2524
+ | size? | `Size` | |
2525
+ | invalid? | `boolean` | Marks the input as invalid (also inherited from a surrounding Field) |
2526
+ | disabled? | `boolean` | Disables the input (also inherited from a surrounding Field) |
2527
+ | success? | `boolean` | Confirmed value: green border and check icon (also inherited from a Field with `success`) |
2528
+ | loading? | `boolean` | Shows a spinner in the field and marks it busy (aria-busy), e.g. while checking the value |
2529
+ | clearable? | `boolean` | Shows a button that empties the field while it has a value |
2530
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear input") |
2531
+ | ref? | `Ref<ComponentRef<typeof TextInput>>` | |
2532
+ | visible? | `boolean` | Whether the password is shown in plain text (controlled, with onVisibleChange) |
2533
+ | defaultVisible? | `boolean` | Initially show the password in plain text |
2534
+ | onVisibleChange? | `(visible: boolean) => void` | |
2535
+ | strength? | `boolean` | Strength meter below the field – for choosing a new password |
2536
+ | requirements? | `PasswordRequirement[]` | Checklist below the field, updated while typing: each rule with its state (icon and text) |
2537
+
2538
+ ### PdfViewer (React Native)
2539
+
2540
+ PDF pages with react-native-pdf (optional peer dependency, with react-native-blob-util): page x of y, previous/next, zoom (pinch or buttons) and sharing. Needs a development build (config plugins) – not Expo Go; on the web (react-native-web) it shows a note and a link to the file instead.
2541
+
2542
+ - Import: `import { PdfViewer } from '@wirecore/wirelayer-native/pdf'`
2543
+ - Category: Media
2544
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_media-pdfviewer--playground
2545
+ - Also takes: Omit<ViewProps, 'children'>
2546
+
2547
+ | Prop | Type | Description |
2548
+ | --- | --- | --- |
2549
+ | src | `PdfSource` | The PDF: `https://…`, `file://…`, `{ uri, headers }` or a bundled asset |
2550
+ | page? | `number` | Shown page (1-based); controlled together with onPageChange |
2551
+ | defaultPage? | `number` | Page at the start (uncontrolled) |
2552
+ | onPageChange? | `(page: number) => void` | |
2553
+ | zoom? | `PdfZoom` | Zoom factor (1 = page width, 0.5–4) or `page-width`/`page-fit`; controlled together with onZoomChange |
2554
+ | defaultZoom? | `PdfZoom` | Zoom at the start (uncontrolled, default `page-width`) |
2555
+ | onZoomChange? | `(zoom: PdfZoom) => void` | |
2556
+ | toolbar? | `boolean` | Bar with page x of y, previous/next, zoom and share (default true) |
2557
+ | paging? | `boolean` | Swipe page by page instead of scrolling through all pages |
2558
+ | horizontal? | `boolean` | Pages side by side (swipe sideways) instead of below each other |
2559
+ | password? | `string` | Password of a protected PDF |
2560
+ | headers? | `Record<string, string>` | Headers of the request when `src` is a URL (e.g. authorization) – merged into `{ uri, headers }` |
2561
+ | trustAllCerts? | `boolean` | Accepts invalid TLS certificates of the server (react-native-pdf `trustAllCerts`). Default false – only for development servers with self-signed certificates |
2562
+ | label? | `string` | Accessible name of the document (default "PDF document") |
2563
+ | fileName? | `string` | File name for sharing (default: from the URL) |
2564
+ | onShare? | `(file: { uri: string; fileName: string }) => void` | Shows a share button: gets the local file (react-native-pdf keeps a downloaded copy) – e.g. `shareUri` from `@wirecore/wirelayer-native/expo-sharing`, which opens the system share sheet (save, mail, open in another app) |
2565
+ | onLinkPress? | `(url: string) => void` | A tap on a link inside the PDF (default: Linking.openURL for http(s) and mailto) |
2566
+ | onLoaded? | `(details: { numPages: number }) => void` | |
2567
+ | onError? | `(error: unknown) => void` | |
2568
+ | className? | `string` | |
2569
+
2570
+ ### Persona (React Native)
2571
+
2572
+ A person: avatar, name, role and presence
2573
+
2574
+ - Import: `import { Persona } from '@wirecore/wirelayer-native'`
2575
+ - Category: Data
2576
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-persona--playground
2577
+ - Also takes: ViewProps
2578
+
2579
+ | Prop | Type | Description |
2580
+ | --- | --- | --- |
2581
+ | name | `string` | Name – also the source of the initials |
2582
+ | description? | `string` | Role or e-mail below the name |
2583
+ | src? | `string` | Image of the avatar |
2584
+ | presence? | `PersonaPresence` | Dot on the avatar and the text below the name – never colour alone |
2585
+ | presenceLabel? | `string` | Own presence text |
2586
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2587
+ | avatarColor? | `AvatarColor \| 'auto'` | Colour of the initials; `auto` (default) picks one from the name |
2588
+ | onPress? | `() => void` | Makes the whole persona a button, e.g. to open the profile |
2589
+ | className? | `string` | |
2590
+
2591
+ ### PhoneInput (React Native)
2592
+
2593
+ Country (flag and calling code, searchable sheet) and the number, formatted for the country while typing; the value is E.164. "+44 …" or "0044 …" typed or pasted switches the country.
2594
+
2595
+ - Import: `import { PhoneInput } from '@wirecore/wirelayer-native'`
2596
+ - Category: Forms
2597
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-phoneinput--playground
2598
+
2599
+ | Prop | Type | Description |
2600
+ | --- | --- | --- |
2601
+ | value? | `string` | The number in E.164 ("+4930123456", "" when empty, controlled) |
2602
+ | defaultValue? | `string` | |
2603
+ | onValueChange? | `(value: string) => void` | |
2604
+ | country? | `string` | Chosen country (ISO code, controlled) |
2605
+ | onCountryChange? | `(country: string) => void` | |
2606
+ | defaultCountry? | `string` | Country before anything is chosen (default "DE") |
2607
+ | onValidChange? | `(valid: boolean) => void` | Whether the number has a valid length for its country (after every change) |
2608
+ | countries? | `PhoneCountry[]` | Countries to offer (default: about 60 common ones; extend with your own entries) |
2609
+ | countryLabel? | `string` | Accessible name of the country button and title of its sheet (default "Country") |
2610
+ | size? | `Size` | |
2611
+ | invalid? | `boolean` | Marks the number invalid (it also is after leaving a number of the wrong length) |
2612
+ | disabled? | `boolean` | |
2613
+ | aria-label? | `string` | Accessible name of the number without a surrounding Field (default "Phone number") |
2614
+ | closeLabel? | `string` | |
2615
+ | className? | `string` | |
2616
+
2617
+ ### PickList (React Native)
2618
+
2619
+ Two lists of checkboxes, one below the other: choose items and move them across with the buttons between the lists ("Add selected", "Add all" …); the move is announced.
2620
+
2621
+ - Import: `import { PickList } from '@wirecore/wirelayer-native'`
2622
+ - Category: Data
2623
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-picklist--playground
2624
+
2625
+ | Prop | Type | Description |
2626
+ | --- | --- | --- |
2627
+ | items | `readonly T[]` | All items: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled |
2628
+ | value? | `V[]` | Values of the chosen items, in their order; any type (see `valueKey`) |
2629
+ | defaultValue? | `V[]` | |
2630
+ | onValueChange? | `(values: V[]) => void` | |
2631
+ | sourceLabel? | `string` | Name of the source list (default "Available") |
2632
+ | targetLabel? | `string` | Name of the target list (default "Selected") |
2633
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
2634
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
2635
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
2636
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
2637
+ | filter? | `boolean` | A search field above each list ("Search Available") |
2638
+ | manualFilter? | `boolean` | The source list is searched elsewhere (server): no local filtering there, listen to onFilterChange and pass the found items; chosen items keep their labels |
2639
+ | onFilterChange? | `(text: string) => void` | Text of the search field of the source list – e.g. to load matching items from a server (manualFilter) |
2640
+ | loading? | `boolean` | The source list is loading (aria-busy, "Loading") |
2641
+ | hasMore? | `boolean` | More items can be loaded into the source list: scrolling to its end (or "Load more") calls onLoadMore |
2642
+ | onLoadMore? | `() => void` | The end of the source list was reached (hasMore) |
2643
+ | selectAll? | `boolean` | "Select all" above each list |
2644
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an item in both lists (instead of icon and label) |
2645
+ | className? | `string` | |
2646
+
2647
+ ### PieChart (React Native)
2648
+
2649
+ Pie or doughnut drawn with react-native-svg – an image named by the title and the share of each slice; the legend lists value and share, the data list below is the text alternative
2650
+
2651
+ - Import: `import { PieChart } from '@wirecore/wirelayer-native/chart'`
2652
+ - Category: Data
2653
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-piechart--playground
2654
+ - Also takes: Omit<ViewProps, 'children'>
2655
+
2656
+ | Prop | Type | Description |
2657
+ | --- | --- | --- |
2658
+ | slices | `PieSlice[]` | The slices: label, value, colour |
2659
+ | title | `string` | Title of the chart, also the start of its accessible name |
2660
+ | hideTitle? | `boolean` | Keep the title for screen readers only |
2661
+ | donut? | `boolean` | A ring instead of a full pie |
2662
+ | height? | `number` | Height (and width) of the pie in pt (default 180) |
2663
+ | legend? | `boolean` | Legend beside the pie with value and share of each slice (default true) |
2664
+ | table? | `boolean` | The slices as a list below (opens on demand) – the text alternative (default true) |
2665
+ | formatValue? | `(value: number) => string` | Formats values in the legend and the list (default: numbers in the locale) |
2666
+ | className? | `string` | |
2667
+
2668
+ ### PinInput (React Native)
2669
+
2670
+ Code input (OTP, PIN): one box per character ("Digit 1 of 6"), typing moves on, Backspace on an empty box goes back, pasting or the SMS autofill fills all boxes.
2671
+
2672
+ - Import: `import { PinInput } from '@wirecore/wirelayer-native'`
2673
+ - Category: Forms
2674
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-pininput--playground
2675
+
2676
+ | Prop | Type | Description |
2677
+ | --- | --- | --- |
2678
+ | length? | `number` | Number of characters |
2679
+ | value? | `string` | |
2680
+ | defaultValue? | `string` | |
2681
+ | onValueChange? | `(value: string) => void` | |
2682
+ | onValueComplete? | `(value: string) => void` | All characters entered |
2683
+ | type? | `PinInputType` | |
2684
+ | otp? | `boolean` | One-time code: iOS offers the code from an SMS above the keyboard, Android fills it in (autoComplete "sms-otp") |
2685
+ | mask? | `boolean` | Show dots instead of the characters |
2686
+ | placeholder? | `string` | Placeholder of each box, e.g. "○" |
2687
+ | invalid? | `boolean` | |
2688
+ | disabled? | `boolean` | |
2689
+ | aria-label? | `string` | Accessible name of the group without a surrounding Field |
2690
+ | className? | `string` | |
2691
+
2692
+ ### Popover (React Native)
2693
+
2694
+ Panel next to its trigger: measured on screen and shown in a transparent modal, flips above the trigger when there is no room below. A press outside, the back button and Escape (web) close it. For longer content use a Drawer (bottom sheet).
2695
+
2696
+ - Import: `import { Popover } from '@wirecore/wirelayer-native'`
2697
+ - Category: Overlays
2698
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-popover--playground
2699
+
2700
+ | Prop | Type | Description |
2701
+ | --- | --- | --- |
2702
+ | open? | `boolean` | |
2703
+ | defaultOpen? | `boolean` | |
2704
+ | onOpenChange? | `(open: boolean) => void` | |
2705
+ | placement? | `PopoverPlacement` | Side of the trigger (default bottom) – flips when there is no room; left/right do not fit on a phone |
2706
+ | width? | `'trigger'` | `trigger`: as wide as the trigger |
2707
+ | overlay? | `boolean` | Dims the screen behind the panel |
2708
+ | title | `string` | Accessible name of the panel (role dialog), shown as its heading |
2709
+ | description? | `string` | |
2710
+ | closeLabel? | `string` | Accessible name of the close button |
2711
+ | children | `ReactElement<{ onPress?: () => void }>` | The trigger, e.g. a Button (gets onPress) |
2712
+ | content | `ReactNode` | Content of the panel |
2713
+
2714
+ ### Progress (React Native)
2715
+
2716
+ Progress bar (role progressbar) named by its label, with the value as text – also in segments, steps or stripes
2717
+
2718
+ - Import: `import { Progress } from '@wirecore/wirelayer-native'`
2719
+ - Category: Feedback
2720
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-progress--playground
2721
+ - Also takes: ViewProps
2722
+
2723
+ | Prop | Type | Description |
2724
+ | --- | --- | --- |
2725
+ | value | `number` | 0–max |
2726
+ | max? | `number` | |
2727
+ | label? | `string` | Visible label, also the accessible name |
2728
+ | showValue? | `boolean` | Shows the percentage next to the label |
2729
+ | valueText? | `(percent: number) => string` | Formats the value text (shown and announced) |
2730
+ | segments? | `ProgressSegment[]` | Several parts in one bar (e.g. used storage by type) – their sum is the value |
2731
+ | steps? | `number` | Progress as this many blocks (e.g. steps of a process) |
2732
+ | striped? | `boolean` | Diagonal stripes |
2733
+ | animated? | `boolean` | Moving stripes – only when motion is allowed |
2734
+ | orientation? | `'horizontal' \| 'vertical'` | `vertical`: the bar fills from the bottom |
2735
+
2736
+ ### ProgressCircle (React Native)
2737
+
2738
+ Progress as a ring with the value in the middle (role progressbar)
2739
+
2740
+ - Import: `import { ProgressCircle } from '@wirecore/wirelayer-native'`
2741
+ - Category: Feedback
2742
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-progresscircle--playground
2743
+ - Also takes: ViewProps
2744
+
2745
+ | Prop | Type | Description |
2746
+ | --- | --- | --- |
2747
+ | value | `number` | |
2748
+ | max? | `number` | |
2749
+ | label | `string` | Visible below the ring, also the accessible name |
2750
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2751
+ | status? | `'neutral' \| 'success' \| 'warn' \| 'danger'` | Colour of the ring (default neutral: the primary colour) |
2752
+ | formatValue? | `(value: number, max: number) => string` | Text in the middle (and the read value), default the percentage |
2753
+ | className? | `string` | |
2754
+
2755
+ ### QrCode (React Native)
2756
+
2757
+ QR code drawn with react-native-svg (matrix from uqr, MIT – the encoder behind Ark/Zag on the web): black on white for every theme, an image (role img) named by its value.
2758
+
2759
+ - Import: `import { QrCode } from '@wirecore/wirelayer-native'`
2760
+ - Category: Data
2761
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-qrcode--playground
2762
+ - Also takes: Omit<ViewProps, 'children'>
2763
+
2764
+ | Prop | Type | Description |
2765
+ | --- | --- | --- |
2766
+ | value | `string` | Text or URL to encode |
2767
+ | size? | `number` | Width and height in pt (default 160) |
2768
+ | errorCorrection? | `'L' \| 'M' \| 'Q' \| 'H'` | Error correction (default M, H with a logo) |
2769
+ | logo? | `string` | Decorative image in the middle (URL) |
2770
+ | label? | `string` | Accessible name (default "QR code: <value>") |
2771
+ | showValue? | `boolean` | The value as text below the code |
2772
+ | className? | `string` | |
2773
+
2774
+ ### QuarterPicker (React Native)
2775
+
2776
+ Quarter field ("Q4 2026"): picks from the four quarters of a year (each named with its months); range: start – end
2777
+
2778
+ - Import: `import { QuarterPicker } from '@wirecore/wirelayer-native'`
2779
+ - Category: Forms
2780
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-quarterpicker--playground
2781
+
2782
+ | Prop | Type | Description |
2783
+ | --- | --- | --- |
2784
+ | defaultValue? | `T` | |
2785
+ | onValueChange? | `(value: T) => void` | |
2786
+ | range? | `boolean` | Start and end instead of one |
2787
+ | min? | `string` | Earliest selectable period (same format as the value) |
2788
+ | max? | `string` | Latest selectable period |
2789
+ | presets? | `(PeriodPreset \| { label: string; value: PeriodRange })[]` | Buttons below the grid: "thisMonth", "lastQuarter", "last3Years" … or own { label, value } |
2790
+ | disabled? | `boolean` | |
2791
+ | invalid? | `boolean` | |
2792
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2793
+ | clearable? | `boolean` | Clear button in the field while it has a value |
2794
+ | aria-label? | `string` | Accessible name without a surrounding Field |
2795
+ | closeLabel? | `string` | |
2796
+ | className? | `string` | |
2797
+ | value? | `T` | Quarter as "2026-Q4"; with range { start, end } |
2798
+
2799
+ ### RadialBar (React Native)
2800
+
2801
+ Rings drawn with react-native-svg (decorative) and a legend with the values as the text (a named group)
2802
+
2803
+ - Import: `import { RadialBar } from '@wirecore/wirelayer-native'`
2804
+ - Category: Data
2805
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-radialbar--playground
2806
+ - Also takes: Omit<ViewProps, 'children'>
2807
+
2808
+ | Prop | Type | Description |
2809
+ | --- | --- | --- |
2810
+ | items | `RadialBarItem[]` | One ring per item, the first outermost |
2811
+ | label | `string` | Accessible name (visible with `showTitle`) |
2812
+ | showTitle? | `boolean` | |
2813
+ | max? | `number` | End of the scale (default 100) |
2814
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2815
+ | formatValue? | `(value: number, max: number) => string` | Formats the value in the legend (default: the share in percent) |
2816
+ | className? | `string` | |
2817
+
2818
+ ### RadioCard (React Native)
2819
+
2820
+ A large card that is one option of a RadioGroup (use `columns` on the group for a grid)
2821
+
2822
+ - Import: `import { RadioCard } from '@wirecore/wirelayer-native'`
2823
+
2824
+ | Prop | Type | Description |
2825
+ | --- | --- | --- |
2826
+ | title | `string` | Title – the accessible name of the control |
2827
+ | description? | `string` | Text below the title – read as the description |
2828
+ | icon? | `IconComponent` | Icon component at the start |
2829
+ | price? | `string` | Price or other figure, e.g. "$29 / month" – part of the description |
2830
+ | children? | `ReactNode` | More content below the description |
2831
+ | className? | `string` | |
2832
+ | value | `string` | Value of the option inside a RadioGroup |
2833
+ | disabled? | `boolean` | |
2834
+
2835
+ ### RadioGroup (React Native)
2836
+
2837
+ One choice out of several (role radiogroup) named by its label; RadioGroupItem or RadioCard inside, cards in `columns`
2838
+
2839
+ - Import: `import { RadioGroup } from '@wirecore/wirelayer-native'`
2840
+ - Category: Forms
2841
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-radiogroup--playground
2842
+ - Also takes: ViewProps
2843
+
2844
+ | Prop | Type | Description |
2845
+ | --- | --- | --- |
2846
+ | value? | `string \| null` | |
2847
+ | defaultValue? | `string \| null` | |
2848
+ | onValueChange? | `(value: string \| null) => void` | |
2849
+ | label? | `string` | Visible label, also the group's accessible name |
2850
+ | orientation? | `RadioGroupOrientation` | |
2851
+ | columns? | `number` | Cards in a grid with this many columns – for RadioCard |
2852
+ | disabled? | `boolean` | |
2853
+ | invalid? | `boolean` | |
2854
+ | required? | `boolean` | Shows the required mark after the label |
2855
+ | children? | `ReactNode` | |
2856
+
2857
+ ### RadioGroupItem (React Native)
2858
+
2859
+ One option of a RadioGroup: a radio button with its label (Space chooses on the web)
2860
+
2861
+ - Import: `import { RadioGroupItem } from '@wirecore/wirelayer-native'`
2862
+ - Category: Forms
2863
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-radiogroup--playground
2864
+
2865
+ | Prop | Type | Description |
2866
+ | --- | --- | --- |
2867
+ | value | `string` | |
2868
+ | disabled? | `boolean` | |
2869
+ | className? | `string` | |
2870
+ | children? | `ReactNode` | |
2871
+
2872
+ ### Rating (React Native)
2873
+
2874
+ Star rating as one adjustable control (role slider): swipe up/down (VoiceOver) or the adjust actions (TalkBack) change it, it reads "3 stars"; on the web the arrow keys, Home/End. A tap on a star chooses it (on its left half with allowHalf).
2875
+
2876
+ - Import: `import { Rating } from '@wirecore/wirelayer-native'`
2877
+ - Category: Forms
2878
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-rating--playground
2879
+
2880
+ | Prop | Type | Description |
2881
+ | --- | --- | --- |
2882
+ | value? | `number` | |
2883
+ | defaultValue? | `number` | |
2884
+ | onValueChange? | `(value: number) => void` | |
2885
+ | count? | `number` | Number of stars |
2886
+ | allowHalf? | `boolean` | |
2887
+ | allowClear? | `boolean` | Choosing the chosen star again clears the rating (value 0) |
2888
+ | icon? | `IconComponent` | Own symbol instead of the star, e.g. a heart (filled when chosen) |
2889
+ | readOnly? | `boolean` | |
2890
+ | disabled? | `boolean` | |
2891
+ | label? | `string` | Visible label, also the accessible name |
2892
+ | aria-label? | `string` | |
2893
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2894
+ | className? | `string` | |
2895
+
2896
+ ### Result (React Native)
2897
+
2898
+ Outcome of a process or an error screen: icon, heading, text and the next steps
2899
+
2900
+ - Import: `import { Result } from '@wirecore/wirelayer-native'`
2901
+ - Category: Feedback
2902
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-result--playground
2903
+ - Also takes: ViewProps
2904
+
2905
+ | Prop | Type | Description |
2906
+ | --- | --- | --- |
2907
+ | status? | `ResultStatus` | success, info, warn, error or an HTTP status (403, 404, 500) |
2908
+ | title? | `string` | Default: the text of the status ("Done", "Page not found" …) |
2909
+ | description? | `string` | 403, 404 and 500 bring a default |
2910
+ | icon? | `IconComponent` | Own icon component |
2911
+ | headingLevel? | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | Level of the title (default 2) |
2912
+ | actions? | `ReactNode` | Buttons for the next step |
2913
+ | className? | `string` | |
2914
+ | children? | `ReactNode` | Extra content below, e.g. details |
2915
+
2916
+ ### RingProgress (React Native)
2917
+
2918
+ A ring with one value or several parts and a legend, e.g. storage by type
2919
+
2920
+ - Import: `import { RingProgress } from '@wirecore/wirelayer-native'`
2921
+ - Category: Feedback
2922
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-ringprogress--playground
2923
+ - Also takes: Omit<ViewProps, 'children'>
2924
+
2925
+ | Prop | Type | Description |
2926
+ | --- | --- | --- |
2927
+ | value? | `number` | One value (a progress ring) |
2928
+ | segments? | `RingProgressSegment[]` | Several parts with a legend |
2929
+ | max? | `number` | Default: 100 or the sum of the parts if larger |
2930
+ | label | `string` | Visible below, also the accessible name |
2931
+ | size? | `'sm' \| 'md' \| 'lg'` | |
2932
+ | thickness? | `number` | Width of the ring in % of the size (default 10) |
2933
+ | roundCaps? | `boolean` | Round ends (single value) |
2934
+ | legend? | `boolean` | Shows the legend of the parts (default true; else only for screen readers) |
2935
+ | formatValue? | `(value: number, max: number) => string` | Text of a value (default the percentage) |
2936
+ | center? | `ReactNode` | Content in the middle |
2937
+ | className? | `string` | |
2938
+
2939
+ ### Sankey (React Native)
2940
+
2941
+ Flows as bands between nodes (react-native-svg), an image named by the title; the flows as a list ("From: To, Value") are the text alternative
2942
+
2943
+ - Import: `import { Sankey } from '@wirecore/wirelayer-native'`
2944
+ - Category: Data
2945
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-sankey--playground
2946
+ - Also takes: Omit<ViewProps, 'children'>
2947
+
2948
+ | Prop | Type | Description |
2949
+ | --- | --- | --- |
2950
+ | nodes | `SankeyNodeInput[]` | |
2951
+ | links | `SankeyLinkInput[]` | Flows from node to node (ids) |
2952
+ | title | `string` | Title, also the accessible name of the diagram |
2953
+ | height? | `number` | Height of the diagram in pt (default 260) – it fills the width |
2954
+ | table? | `boolean` | The flows as a list below the diagram (opens on demand) – the text alternative (default true) |
2955
+ | formatOptions? | `Intl.NumberFormatOptions` | |
2956
+ | locale? | `string` | Default: the LocaleProvider's |
2957
+ | className? | `string` | |
2958
+
2959
+ ### SaveStatus (React Native)
2960
+
2961
+ State of an autosave ("Saving …", "Saved") – a live region, so changes are announced
2962
+
2963
+ - Import: `import { SaveStatus } from '@wirecore/wirelayer-native'`
2964
+ - Category: Feedback
2965
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-savestatus--playground
2966
+ - Also takes: ViewProps
2967
+
2968
+ | Prop | Type | Description |
2969
+ | --- | --- | --- |
2970
+ | status? | `SaveStatusState` | idle (nothing shown), saving, saved or error |
2971
+ | translations? | `Partial<SaveStatusTranslations>` | Own text per state |
2972
+ | className? | `string` | |
2973
+
2974
+ ### Scheduler (React Native)
2975
+
2976
+ Calendar for phones: toolbar (back, today, forward, the period as heading, resource filter, views), agenda as a list per day, day and week as a time grid, a compact month with the events of the chosen day. Events are buttons named with title, time, resource and series; editable events move with accessibility actions, buttons in the detail sheet or by long press and drag.
2977
+
2978
+ - Import: `import { Scheduler } from '@wirecore/wirelayer-native'`
2979
+ - Category: Data
2980
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-scheduler--playground
2981
+ - Also takes: ViewProps
2982
+
2983
+ | Prop | Type | Description |
2984
+ | --- | --- | --- |
2985
+ | events? | `SchedulerEvent[]` | Events; with `dataSource` they are shown together with the loaded ones |
2986
+ | view? | `SchedulerMobileView` | Shown view; controlled together with onViewChange |
2987
+ | defaultView? | `SchedulerMobileView` | View at the start (default `agenda`) |
2988
+ | onViewChange? | `(view: SchedulerMobileView) => void` | |
2989
+ | views? | `SchedulerMobileView[]` | Views offered in the toolbar (default all four) |
2990
+ | date? | `string` | Shown date ("2026-10-20"); controlled together with onDateChange |
2991
+ | defaultDate? | `string` | Date at the start (default today) |
2992
+ | onDateChange? | `(date: string) => void` | |
2993
+ | startHour? | `number` | First hour of the day and week view (default 7) |
2994
+ | endHour? | `number` | Hour the day and week view end with (default 19) |
2995
+ | slotMinutes? | `number` | Steps for new events and for moving, in minutes (default 30) |
2996
+ | dragSnapMinutes? | `number` | Steps for moving events (drag and the accessibility actions), in minutes – default slotMinutes |
2997
+ | weekStartsOn? | `number` | First day of the week: 0 Sunday, 1 Monday (default) |
2998
+ | hideWeekends? | `boolean` | Leaves out the weekend days of the locale in the week and month view |
2999
+ | daysInView? | `number` | Days of the week view in view at once; the others are reached by scrolling sideways (default 3) |
3000
+ | startScrollTime? | `string` | Time the day and week view scroll to ("08:00") |
3001
+ | height? | `number` | Height of the scrolling area below the toolbar in pt (default 480) |
3002
+ | editable? | `boolean` | Events can be moved: accessibility actions on each event (a step or a day earlier/later), buttons in the detail sheet, and long press + drag in the day and week view |
3003
+ | readOnly? | `boolean` | Nothing can be changed or chosen: no moving, no new events |
3004
+ | resources? | `SchedulerResource[]` | People, rooms or machines: a filter in the toolbar; events show their resource (and its colour) |
3005
+ | resourceFilter? | `string` | Shown resource (id; empty: all); controlled together with onResourceFilterChange |
3006
+ | defaultResourceFilter? | `string` | |
3007
+ | onResourceFilterChange? | `(resourceId: string) => void` | |
3008
+ | businessHours? | `SchedulerBusinessHours[]` | Opening hours by weekday – times outside are shaded in the day and week view (resources can have their own) |
3009
+ | canDrop? | `(event: SchedulerEvent, start: string, end: string, resourceId?: string) => boolean` | Whether an event may be moved there – a refused move is announced |
3010
+ | preventOverlap? | `boolean` | No overlapping events per resource (without resources: at all) |
3011
+ | recurrenceEditScope? | `'ask' \| RecurrenceScope` | Moving an occurrence of a series: ask (default), or always only this one / the whole series |
3012
+ | dataSource? | `DataSource<SchedulerEvent>` | Loads the events of the shown range (`range` of the query) – cancelled when the range changes, cached |
3013
+ | cacheTime? | `number` | How long loaded ranges are reused, in ms (default 0) |
3014
+ | loading? | `boolean` | Shows the loading state (e.g. while you load on onRangeChange yourself) |
3015
+ | timeZone? | `string` | IANA time zone the times are shown in ("Europe/Berlin"); times with offset are converted, changes get it |
3016
+ | label? | `string` | Accessible name of the calendar (default "Calendar") |
3017
+ | headingLevel? | `2 \| 3 \| 4 \| 5 \| 6` | Level of the title heading (default 2); the day headings are one level below |
3018
+ | locale? | `string` | |
3019
+ | onEventClick? | `(event: SchedulerEvent) => void` | An event was pressed – without it a sheet shows its details |
3020
+ | onSlotSelect? | `(slot: SchedulerSlot) => void` | An empty time (day and week) or day (month) was chosen – e.g. to create an event there |
3021
+ | onEventChange? | `(change: SchedulerChange) => void` | An event was moved – apply start and end to your data (series: applyEventChange) |
3022
+ | onRangeChange? | `(range: SchedulerRange) => void` | The shown range changed (also at the start) – load its events |
3023
+ | className? | `string` | |
3024
+
3025
+ ### SearchField (React Native)
3026
+
3027
+ A search (landmark "search"): field with magnifier, clear button and spinner; the keyboard's search key submits. Optional areas and suggestions below the field.
3028
+
3029
+ - Import: `import { SearchField } from '@wirecore/wirelayer-native'`
3030
+ - Category: Forms
3031
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-searchfield--playground
3032
+
3033
+ | Prop | Type | Description |
3034
+ | --- | --- | --- |
3035
+ | value? | `string` | The search text (controlled) |
3036
+ | defaultValue? | `string` | |
3037
+ | onValueChange? | `(value: string) => void` | |
3038
+ | onSubmit? | `(value: string, scope: string \| undefined) => void` | The search key of the keyboard: the text and the area |
3039
+ | onClear? | `() => void` | The clear button emptied the field |
3040
+ | label? | `string` | Accessible name of the search (default "Search") |
3041
+ | placeholder? | `string` | |
3042
+ | loading? | `boolean` | Search is running: spinner in the field, aria-busy |
3043
+ | scopes? | `SearchScope[]` | Areas to search in – a select above the field |
3044
+ | scope? | `string` | Chosen area (controlled) |
3045
+ | onScopeChange? | `(scope: string) => void` | |
3046
+ | scopeLabel? | `string` | Accessible name of the area select (default "Search in") |
3047
+ | suggestions? | `string[]` | Suggestions while typing – any other text can still be searched |
3048
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear search") |
3049
+ | size? | `Size` | |
3050
+ | disabled? | `boolean` | |
3051
+ | className? | `string` | |
3052
+
3053
+ ### SegmentedControl (React Native)
3054
+
3055
+ A few exclusive options side by side – a radio group
3056
+
3057
+ - Import: `import { SegmentedControl } from '@wirecore/wirelayer-native'`
3058
+ - Category: Buttons
3059
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_buttons-segmentedcontrol--playground
3060
+ - Also takes: ViewProps
3061
+
3062
+ | Prop | Type | Description |
3063
+ | --- | --- | --- |
3064
+ | items | `SegmentedControlItem[]` | |
3065
+ | value? | `string` | |
3066
+ | defaultValue? | `string` | |
3067
+ | onValueChange? | `(value: string) => void` | |
3068
+ | label | `string` | Name of the group, e.g. "View" |
3069
+ | size? | `'sm' \| 'md'` | |
3070
+ | block? | `boolean` | Full width: the segments share it |
3071
+ | disabled? | `boolean` | |
3072
+ | className? | `string` | |
3073
+
3074
+ ### Select (React Native)
3075
+
3076
+ Picker: the trigger opens a sheet with the options as radio buttons. The trigger is named "Label: value", so the current choice is read along. Items of any shape (itemValue/itemLabel), groups, a search field, server data with paging at the end of the list.
3077
+
3078
+ - Import: `import { Select } from '@wirecore/wirelayer-native'`
3079
+ - Category: Forms
3080
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-select--playground
3081
+
3082
+ | Prop | Type | Description |
3083
+ | --- | --- | --- |
3084
+ | items | `readonly T[]` | Options: SelectItem objects – or any objects or values, read with itemValue/itemLabel/itemDisabled/itemGroup |
3085
+ | itemValue? | `ItemAccessor<T, V>` | Value of an item: property name or function (default: `value`, otherwise the item itself) |
3086
+ | itemLabel? | `ItemAccessor<T, string>` | Label of an item: property name or function (default: `label`) |
3087
+ | itemDisabled? | `ItemAccessor<T, boolean>` | Disabled state of an item: property name or function (default: `disabled`) |
3088
+ | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item: property name or function (default: `group`); items are listed per group |
3089
+ | valueKey? | `ItemAccessor<V, string \| number>` | Identifies object values (property name or function), e.g. "id" – without it objects are compared by content |
3090
+ | manualFilter? | `boolean` | The items are filtered elsewhere (server): no local filtering, listen to onFilterChange |
3091
+ | onFilterChange? | `(text: string) => void` | Text of the search field – e.g. to load matching items from a server (manualFilter) |
3092
+ | emptyText? | `string` | Shown when no item is left (default "No results" / "No entries") |
3093
+ | loading? | `boolean` | Shows a spinner in the field and "Loading" in the list (aria-busy) |
3094
+ | loadingText? | `string` | Text of the loading row in the list |
3095
+ | hasMore? | `boolean` | More items can be loaded: the end of the list (or "Load more") calls onLoadMore |
3096
+ | onLoadMore? | `() => void` | The end of the list was reached (FlatList onEndReached) or "Load more" pressed |
3097
+ | dataSource? | `DataSource<T>` | Loads the options when the list opens (pages at the end of the list, the search asks it after a typing pause); `getItemsByKeys` gives the labels of chosen values that are not loaded |
3098
+ | minSearchLength? | `number` | Fewest characters the search needs before the data source is asked |
3099
+ | pageSize? | `number` | Options per request of the data source (default 50) |
3100
+ | renderItem? | `(item: T, state: ListItemState) => ReactNode` | Content of an option (instead of icon and label) |
3101
+ | value? | `V \| null` | Selected value; any type (string, number, boolean, object) |
3102
+ | defaultValue? | `V \| null` | |
3103
+ | onValueChange? | `(value: V \| null) => void` | |
3104
+ | placeholder? | `string` | |
3105
+ | title? | `string` | Title of the sheet – default: the Field label or the placeholder |
3106
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3107
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
3108
+ | disabled? | `boolean` | |
3109
+ | invalid? | `boolean` | |
3110
+ | filter? | `boolean` | Search field at the top of the sheet; filters by label, ignoring case and accents |
3111
+ | clearable? | `boolean` | Button next to the field that clears the value |
3112
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
3113
+ | size? | `'sm' \| 'md' \| 'lg'` | Height of the field: 32, 40 (default) or 48 pt |
3114
+ | renderValue? | `(item: T) => ReactNode` | Content of the field for the selected item (the accessible name stays its label) |
3115
+ | className? | `string` | |
3116
+
3117
+ ### SessionTimeout (React Native)
3118
+
3119
+ Warns before the session ends (WCAG 2.2.1) with the time left and the choice to stay signed in – an alertdialog whose first button is the safe choice. The time is measured from the clock, so it is right after the app was in the background, too.
3120
+
3121
+ - Import: `import { SessionTimeout } from '@wirecore/wirelayer-native'`
3122
+ - Category: Feedback
3123
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-sessiontimeout--playground
3124
+
3125
+ | Prop | Type | Description |
3126
+ | --- | --- | --- |
3127
+ | expiresAt | `string \| number \| Date` | End of the session – set it anew after extending (e.g. from the server's session) |
3128
+ | warnBefore? | `number` | Seconds before the end the warning opens (default 120; WCAG 2.2.1 asks for at least 20) |
3129
+ | title? | `string` | Heading of the warning |
3130
+ | description? | `string` | Text of the warning |
3131
+ | onExtend? | `() => void` | "Stay signed in" – extend the session and pass the new `expiresAt` |
3132
+ | onSignOut? | `() => void` | "Sign out" |
3133
+ | onExpire? | `() => void` | The time ran out (once per `expiresAt`) |
3134
+
3135
+ ### SidebarNav (React Native)
3136
+
3137
+ Navigation as a list of links and groups – on a phone inside a Drawer (placement left) or the AppShell navbar
3138
+
3139
+ - Import: `import { SidebarNav } from '@wirecore/wirelayer-native'`
3140
+ - Category: Navigation
3141
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-sidebarnav--playground
3142
+ - Also takes: ViewProps
3143
+
3144
+ | Prop | Type | Description |
3145
+ | --- | --- | --- |
3146
+ | items | `SidebarNavItem[]` | |
3147
+ | label | `string` | Accessible name of the navigation |
3148
+ | onNavigate? | `(item: SidebarNavItem) => void` | A tap on an entry with href – navigate with the app's router (e.g. and close the drawer) |
3149
+ | currentHref? | `string` | href of the current screen (instead of `current` on the items) |
3150
+ | isCurrent? | `(item: SidebarNavItem) => boolean` | |
3151
+ | header? | `ReactNode` | Content above the entries, e.g. the logo or the account |
3152
+ | footer? | `ReactNode` | Content below the entries |
3153
+ | className? | `string` | |
3154
+
3155
+ ### SignaturePad (React Native)
3156
+
3157
+ Signature field: draw with the finger (react-native-svg, gesture responder); "Undo" removes the last stroke. With typedAlternative the name can be typed instead – for screen reader and switch users. The value is an SVG data URL.
3158
+
3159
+ - Import: `import { SignaturePad } from '@wirecore/wirelayer-native'`
3160
+ - Category: Forms
3161
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-signaturepad--playground
3162
+
3163
+ | Prop | Type | Description |
3164
+ | --- | --- | --- |
3165
+ | value? | `string` | The signature as SVG data URL ("" when empty, controlled) |
3166
+ | onValueChange? | `(value: string) => void` | |
3167
+ | paths? | `string[]` | The strokes as SVG paths (controlled – to restore or store them) |
3168
+ | defaultPaths? | `string[]` | |
3169
+ | onPathsChange? | `(paths: string[]) => void` | |
3170
+ | label? | `string` | Visible label, also the name of the field (default "Signature") |
3171
+ | color? | `string` | Ink colour – a real colour (it is exported), default black on the light sheet |
3172
+ | strokeWidth? | `number` | Stroke width in pt (default 2) |
3173
+ | typedAlternative? | `boolean` | Offers typing the name instead of drawing (accessible alternative) |
3174
+ | typedName? | `string` | The typed name (controlled) |
3175
+ | onTypedNameChange? | `(name: string) => void` | |
3176
+ | disabled? | `boolean` | |
3177
+ | readOnly? | `boolean` | |
3178
+ | invalid? | `boolean` | |
3179
+ | className? | `string` | |
3180
+
3181
+ ### SimpleGrid (React Native)
3182
+
3183
+ Grid of equally wide columns; the cells wrap into rows
3184
+
3185
+ - Import: `import { SimpleGrid } from '@wirecore/wirelayer-native'`
3186
+ - Category: Layout
3187
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-simplegrid--playground
3188
+ - Also takes: ViewProps
3189
+
3190
+ | Prop | Type | Description |
3191
+ | --- | --- | --- |
3192
+ | columns? | `ResponsiveColumns` | Columns – a number or by width, e.g. `{ base: 1, sm: 2, lg: 3 }` (breakpoints of the grid's own width) |
3193
+ | minColumnWidth? | `number` | As many columns as fit with at least this width (pt) – instead of `columns` |
3194
+ | gap? | `LayoutGap` | Space between the cells (default md, 16) |
3195
+ | className? | `string` | |
3196
+
3197
+ ### Skeleton (React Native)
3198
+
3199
+ Placeholder while content loads – hidden from assistive tech (mark the loading region with aria-busy). Pulses unless reduced motion is on.
3200
+
3201
+ - Import: `import { Skeleton } from '@wirecore/wirelayer-native'`
3202
+ - Category: Feedback
3203
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-skeleton--playground
3204
+ - Also takes: ViewProps
3205
+
3206
+ | Prop | Type | Description |
3207
+ | --- | --- | --- |
3208
+ | shape? | `'line' \| 'rect' \| 'circle'` | |
3209
+ | width? | `DimensionValue` | Width, e.g. 120 or "60%" |
3210
+ | height? | `DimensionValue` | Height, e.g. 48 |
3211
+ | lines? | `number` | Several lines for a paragraph – the last one shorter (shape line) |
3212
+ | className? | `string` | |
3213
+
3214
+ ### Slider (React Native)
3215
+
3216
+ Drag along the track or use the screen reader's adjust gestures (role slider, increment/decrement) and, on the web, the arrow keys, Page Up/Down and Home/End. Two values make a range with two thumbs.
3217
+
3218
+ - Import: `import { Slider } from '@wirecore/wirelayer-native'`
3219
+ - Category: Forms
3220
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-slider--playground
3221
+
3222
+ | Prop | Type | Description |
3223
+ | --- | --- | --- |
3224
+ | value? | `number[]` | One value, or two for a range |
3225
+ | defaultValue? | `number[]` | |
3226
+ | onValueChange? | `(value: number[]) => void` | |
3227
+ | onValueChangeEnd? | `(value: number[]) => void` | Called once the user lets go (end of the drag, after a key or an adjust gesture) |
3228
+ | min? | `number` | |
3229
+ | max? | `number` | |
3230
+ | step? | `number` | |
3231
+ | label | `string` | Visible label, also the accessible name |
3232
+ | showValue? | `boolean` | Value next to the label |
3233
+ | formatValue? | `(value: number) => string` | |
3234
+ | thumbLabels? | `[string, string]` | Names of the two thumbs of a range – default "Minimum" / "Maximum" |
3235
+ | orientation? | `'horizontal' \| 'vertical'` | Vertical slider: give it a height via className (at least 160 pt) |
3236
+ | marks? | `(number \| SliderMark)[]` | Marks along the track, optionally with a label: [0, 50, 100] or [{ value: 0, label: 'Off' }] |
3237
+ | restrictToMarks? | `boolean` | Only the values of `marks` can be chosen (the adjust gestures go from mark to mark) |
3238
+ | minRange? | `number` | Smallest distance between the thumbs of a range, in values |
3239
+ | disabled? | `boolean` | |
3240
+ | className? | `string` | |
3241
+
3242
+ ### Sortable (React Native)
3243
+
3244
+ Sortable list: every item has a handle. Drag it after a long press (or right away by moving it), tap it and then the target (WCAG 2.5.7), or use the screen reader actions "Move up" … and "Move to “…”" (lists of a group); on the web Space picks up, the arrow keys move, Space drops and Escape cancels. Every step is announced.
3245
+
3246
+ - Import: `import { Sortable } from '@wirecore/wirelayer-native'`
3247
+ - Category: Data
3248
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-sortable--playground
3249
+
3250
+ | Prop | Type | Description |
3251
+ | --- | --- | --- |
3252
+ | value? | `T[]` | The items in their order (controlled) |
3253
+ | defaultValue? | `T[]` | |
3254
+ | onValueChange? | `(items: T[]) => void` | |
3255
+ | onMove? | `(move: SortableMove<T>) => void` | An item was put at another place (also in another list of the group) |
3256
+ | itemKey? | `ItemAccessor<T, string \| number>` | Key of an item: property name or function (default `id`, else `value`, else the item) |
3257
+ | itemLabel? | `ItemAccessor<T, string>` | Text of an item for its handle and the announcements (default `label`, `name` or `title`) |
3258
+ | label? | `string` | Name of the list (visible label, also announced when an item moves in) |
3259
+ | group? | `string` | Lists of the same group exchange items: screen reader actions "Move to “…”", tap and tap, arrows |
3260
+ | name? | `string` | Id of this list in `onMove` (default: generated) |
3261
+ | orientation? | `'vertical' \| 'horizontal'` | vertical (default) or horizontal (a row) |
3262
+ | accepts? | `(item: T, from: string) => boolean` | Whether an item from another list of the group (its `name`) may come in |
3263
+ | disabled? | `boolean` | |
3264
+ | emptyText? | `string` | Text of an empty list (it still takes items of the group) |
3265
+ | renderItem? | `(item: T, state: { index: number; grabbed: boolean }) => ReactNode` | Content of an item (default: its text) |
3266
+ | aria-label? | `string` | Accessible name of the list without a visible label |
3267
+ | className? | `string` | |
3268
+
3269
+ ### Sparkline (React Native)
3270
+
3271
+ Small curved line without axes; an image named by the trend and the extremes
3272
+
3273
+ - Import: `import { Sparkline } from '@wirecore/wirelayer-native/chart'`
3274
+ - Category: Data
3275
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-sparkline--playground
3276
+ - Also takes: Omit<ViewProps, 'children'>
3277
+
3278
+ | Prop | Type | Description |
3279
+ | --- | --- | --- |
3280
+ | data | `number[]` | |
3281
+ | label | `string` | What the line shows, e.g. "Load over the last 24 hours" – starts the text alternative |
3282
+ | fill? | `boolean` | Area under the line (default true) |
3283
+ | width? | `number` | Width in pt (default 128) |
3284
+ | height? | `number` | Height in pt (default 32) |
3285
+ | formatValue? | `(value: number) => string` | Formats the values in the text alternative (default: numbers in the locale) |
3286
+ | className? | `string` | |
3287
+
3288
+ ### Spinner (React Native)
3289
+
3290
+ Loading indicator (role progressbar, busy) with an accessible label – with `value` a small progress ring
3291
+
3292
+ - Import: `import { Spinner } from '@wirecore/wirelayer-native'`
3293
+ - Category: Feedback
3294
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-spinner--playground
3295
+ - Also takes: ViewProps
3296
+
3297
+ | Prop | Type | Description |
3298
+ | --- | --- | --- |
3299
+ | size? | `Size` | |
3300
+ | label? | `string` | Announced to assistive tech |
3301
+ | value? | `number` | Fixed progress 0–100: draws a filling ring instead (role progressbar with the value) |
3302
+
3303
+ ### Spoiler (React Native)
3304
+
3305
+ Cuts long content at a height with "Show more" – the button only appears when the content is higher. The cut part stays readable for screen readers.
3306
+
3307
+ - Import: `import { Spoiler } from '@wirecore/wirelayer-native'`
3308
+ - Category: Layout
3309
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-spoiler--playground
3310
+ - Also takes: ViewProps
3311
+
3312
+ | Prop | Type | Description |
3313
+ | --- | --- | --- |
3314
+ | maxHeight? | `number` | Height (pt) of the cut content (default 120) |
3315
+ | open? | `boolean` | |
3316
+ | onOpenChange? | `(open: boolean) => void` | |
3317
+ | showLabel? | `string` | Text of the button while cut (default "Show more") |
3318
+ | hideLabel? | `string` | Text of the button while open (default "Show less") |
3319
+ | className? | `string` | |
3320
+ | children | `ReactNode` | |
3321
+
3322
+ ### Stack (React Native)
3323
+
3324
+ Children below each other with even spacing
3325
+
3326
+ - Import: `import { Stack } from '@wirecore/wirelayer-native'`
3327
+ - Category: Layout
3328
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-stack--playground
3329
+ - Also takes: ViewProps
3330
+
3331
+ | Prop | Type | Description |
3332
+ | --- | --- | --- |
3333
+ | gap? | `LayoutGap` | Space between the children (default md, 16) |
3334
+ | align? | `'stretch' \| 'start' \| 'center' \| 'end'` | Cross-axis alignment (default stretch) |
3335
+ | className? | `string` | |
3336
+
3337
+ ### Statistic (React Native)
3338
+
3339
+ A key figure with label, trend and description, e.g. on a dashboard
3340
+
3341
+ - Import: `import { Statistic } from '@wirecore/wirelayer-native'`
3342
+ - Category: Data
3343
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-statistic--playground
3344
+ - Also takes: ViewProps
3345
+
3346
+ | Prop | Type | Description |
3347
+ | --- | --- | --- |
3348
+ | label | `string` | What the number is |
3349
+ | value? | `number \| null` | The number – null shows nothing |
3350
+ | formatOptions? | `Intl.NumberFormatOptions` | Intl options of the value, e.g. currency |
3351
+ | unit? | `string` | Intl unit, e.g. "kilobyte" or "percent" |
3352
+ | prefix? | `string` | Text before the value |
3353
+ | suffix? | `string` | Text after the value |
3354
+ | trend? | `number \| null` | Change in percent, shown with an arrow |
3355
+ | trendLabel? | `string` | Text after the trend, e.g. "vs. last month" |
3356
+ | trendFormatOptions? | `Intl.NumberFormatOptions` | |
3357
+ | invertTrend? | `boolean` | Falling is good (e.g. errors, costs) |
3358
+ | description? | `string` | Text below the value |
3359
+ | icon? | `IconComponent` | Icon component next to the label |
3360
+ | loading? | `boolean` | Placeholder and busy state while loading |
3361
+ | animate? | `boolean` | Counts up to a new value – only when motion is allowed |
3362
+ | live? | `boolean` | Announces changes of the value |
3363
+ | size? | `'sm' \| 'md' \| 'lg'` | |
3364
+ | bordered? | `boolean` | Card with border and padding |
3365
+ | locale? | `string` | Default: the LocaleProvider's |
3366
+ | chart? | `ReactNode` | Small chart below, e.g. a sparkline |
3367
+ | className? | `string` | |
3368
+
3369
+ ### StatusDot (React Native)
3370
+
3371
+ Coloured dot (or status icon) with a text – pulses for live states, not with reduced motion
3372
+
3373
+ - Import: `import { StatusDot } from '@wirecore/wirelayer-native'`
3374
+ - Category: Feedback
3375
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_feedback-statusdot--playground
3376
+ - Also takes: ViewProps
3377
+
3378
+ | Prop | Type | Description |
3379
+ | --- | --- | --- |
3380
+ | status? | `StatusDotStatus` | |
3381
+ | pulse? | `boolean` | Pulsing dot, e.g. for "live" – still with reduced motion |
3382
+ | icon? | `boolean \| IconComponent` | Status icon instead of the dot – shape as a second cue next to colour and text. `true` uses the icon of the status |
3383
+ | children? | `ReactNode` | |
3384
+
3385
+ ### Stepper (React Native)
3386
+
3387
+ Wizard for small screens: numbered steps in a row (each named with its status), the title of the current step as a heading, its content and back/next below; the last "Next" finishes.
3388
+
3389
+ - Import: `import { Stepper } from '@wirecore/wirelayer-native'`
3390
+ - Category: Navigation
3391
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-stepper--playground
3392
+
3393
+ | Prop | Type | Description |
3394
+ | --- | --- | --- |
3395
+ | items | `StepperItem[]` | |
3396
+ | step? | `number` | Current step (0-based; items.length = all done) |
3397
+ | defaultStep? | `number` | |
3398
+ | onStepChange? | `(step: number) => void` | |
3399
+ | linear? | `boolean` | Steps only in order: no jumping ahead via the step list |
3400
+ | isStepValid? | `(index: number) => boolean` | Blocks "Next" while a step is not valid (with linear) |
3401
+ | onNext? | `(index: number) => boolean \| Promise<boolean>` | Checks a step when "Next" is pressed: false keeps it (may be async – the button shows a spinner meanwhile) |
3402
+ | children | `(index: number) => ReactNode` | Content of a step |
3403
+ | completed? | `ReactNode` | Shown after the last step |
3404
+ | orientation? | `'horizontal' \| 'vertical'` | `vertical`: the steps with their labels top to bottom above the content |
3405
+ | className? | `string` | |
3406
+
3407
+ ### Sticky (React Native)
3408
+
3409
+ Stays in view while the content scrolls: place it before (top) or after (bottom) the ScrollView – e.g. the buttons of a long form. React Native has no `position: sticky`; inside a ScrollView use `stickyHeaderIndices`.
3410
+
3411
+ - Import: `import { Sticky } from '@wirecore/wirelayer-native'`
3412
+ - Category: Layout
3413
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_layout-sticky--playground
3414
+ - Also takes: ViewProps
3415
+
3416
+ | Prop | Type | Description |
3417
+ | --- | --- | --- |
3418
+ | edge? | `'top' \| 'bottom'` | Edge it belongs to (default top) |
3419
+ | bar? | `boolean` | Look of an action bar: background, padding, buttons at the end |
3420
+ | className? | `string` | |
3421
+
3422
+ ### Switch (React Native)
3423
+
3424
+ On/off switch (role switch) with label, description and icon; the thumb slides (not with reduced motion); works in a SwitchGroup
3425
+
3426
+ - Import: `import { Switch } from '@wirecore/wirelayer-native'`
3427
+ - Category: Forms
3428
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-switch--playground
3429
+ - Also takes: Omit<PressableProps, 'children'>
3430
+
3431
+ | Prop | Type | Description |
3432
+ | --- | --- | --- |
3433
+ | checked? | `boolean` | |
3434
+ | defaultChecked? | `boolean` | |
3435
+ | onCheckedChange? | `(checked: boolean) => void` | |
3436
+ | description? | `string` | Second line below the label, also read as the switch's description |
3437
+ | icon? | `IconComponent` | Icon component before the label |
3438
+ | invalid? | `boolean` | |
3439
+ | value? | `string` | Value inside a SwitchGroup – the group holds the state |
3440
+ | className? | `string` | |
3441
+ | children? | `ReactNode` | |
3442
+
3443
+ ### SwitchGroup (React Native)
3444
+
3445
+ A named group (role "group") of switches with a `value` each; helper and error text describe it
3446
+
3447
+ - Import: `import { SwitchGroup } from '@wirecore/wirelayer-native'`
3448
+ - Category: Forms
3449
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-switchgroup--playground
3450
+ - Also takes: ViewProps
3451
+
3452
+ | Prop | Type | Description |
3453
+ | --- | --- | --- |
3454
+ | defaultValue? | `string[]` | |
3455
+ | onValueChange? | `(value: string[]) => void` | |
3456
+ | label? | `string` | Visible label of the group (names it); otherwise pass aria-label |
3457
+ | helperText? | `string` | |
3458
+ | error? | `string` | Error message – also marks the group and its checkboxes invalid |
3459
+ | invalid? | `boolean` | |
3460
+ | required? | `boolean` | Shows the required mark after the label |
3461
+ | disabled? | `boolean` | |
3462
+ | max? | `number` | At most this many can be ticked – the others are disabled until one is unticked (announced) |
3463
+ | orientation? | `'vertical' \| 'horizontal'` | vertical (default) or horizontal |
3464
+ | children? | `ReactNode` | Checkbox or CheckboxCard elements with a `value` |
3465
+ | value? | `string[]` | Values of the switches that are on (controlled) |
3466
+
3467
+ ### Tabs (React Native)
3468
+
3469
+ Tab panels: TabsList with TabsTrigger buttons (role tab) and one TabsContent per tab; only the selected one is rendered
3470
+
3471
+ - Import: `import { Tabs } from '@wirecore/wirelayer-native'`
3472
+ - Category: Navigation
3473
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-tabs--playground
3474
+ - Also takes: ViewProps
3475
+
3476
+ | Prop | Type | Description |
3477
+ | --- | --- | --- |
3478
+ | value? | `string` | |
3479
+ | defaultValue? | `string` | |
3480
+ | onValueChange? | `(value: string \| null) => void` | |
3481
+ | label? | `string` | Accessible name of the tab list |
3482
+ | children? | `ReactNode` | TabsList with the triggers, then one TabsContent per tab |
3483
+
3484
+ ### TabsContent (React Native)
3485
+
3486
+ Only the selected panel is rendered
3487
+
3488
+ - Import: `import { TabsContent } from '@wirecore/wirelayer-native'`
3489
+ - Category: Navigation
3490
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-tabs--playground
3491
+ - Also takes: ViewProps
3492
+
3493
+ | Prop | Type | Description |
3494
+ | --- | --- | --- |
3495
+ | value | `string` | |
3496
+
3497
+ ### TabsList (React Native)
3498
+
3499
+ The row of tab buttons
3500
+
3501
+ - Import: `import { TabsList } from '@wirecore/wirelayer-native'`
3502
+ - Category: Navigation
3503
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-tabs--playground
3504
+ - Also takes: ViewProps
3505
+
3506
+ | Prop | Type | Description |
3507
+ | --- | --- | --- |
3508
+ | scrollable? | `boolean` | Scrolls sideways when the tabs do not fit (many tabs on a narrow screen) |
3509
+
3510
+ ### TabsTrigger (React Native)
3511
+
3512
+ A tab button (role tab, aria-selected) with optional icon and badge
3513
+
3514
+ - Import: `import { TabsTrigger } from '@wirecore/wirelayer-native'`
3515
+ - Category: Navigation
3516
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-tabs--playground
3517
+ - Also takes: Omit<PressableProps, 'children'>
3518
+
3519
+ | Prop | Type | Description |
3520
+ | --- | --- | --- |
3521
+ | value | `string` | |
3522
+ | icon? | `IconComponent` | Icon component before the label |
3523
+ | badge? | `number \| string` | Count (99+) or short text after the label, e.g. open items – part of the accessible name |
3524
+ | className? | `string` | |
3525
+ | children? | `ReactNode` | |
3526
+
3527
+ ### TagsInput (React Native)
3528
+
3529
+ Free entries as chips: the return key or the delimiter adds, Backspace on the empty field selects the last entry (again removes it); every chip has a remove button. Additions and removals are announced.
3530
+
3531
+ - Import: `import { TagsInput } from '@wirecore/wirelayer-native'`
3532
+ - Category: Forms
3533
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-tagsinput--playground
3534
+
3535
+ | Prop | Type | Description |
3536
+ | --- | --- | --- |
3537
+ | value? | `string[]` | |
3538
+ | defaultValue? | `string[]` | |
3539
+ | onValueChange? | `(value: string[]) => void` | |
3540
+ | placeholder? | `string` | |
3541
+ | max? | `number` | Most entries allowed |
3542
+ | delimiter? | `string` | Characters that finish an entry besides Enter (default ",") |
3543
+ | validate? | `(value: string) => boolean` | Accept a check, e.g. for e-mail addresses |
3544
+ | disabled? | `boolean` | |
3545
+ | invalid? | `boolean` | |
3546
+ | suggestions? | `readonly string[]` | Suggestions while typing (entries already added are left out); a tap adds one |
3547
+ | filter? | `boolean` | Filters the suggestions by the typed text, ignoring case and accents (default true) |
3548
+ | manualFilter? | `boolean` | The suggestions are filtered elsewhere (server): no local filtering, listen to onFilterChange |
3549
+ | onFilterChange? | `(text: string) => void` | Typed text – e.g. to load matching suggestions from a server (manualFilter) |
3550
+ | loading? | `boolean` | Shows "Loading" in the suggestions (aria-busy) |
3551
+ | loadingText? | `string` | Text of the loading row |
3552
+ | hasMore? | `boolean` | More suggestions can be loaded: "Load more" calls onLoadMore |
3553
+ | onLoadMore? | `() => void` | |
3554
+ | dataSource? | `DataSource<string>` | Suggestions from a server instead of `suggestions`: asked with the typed text after a typing pause |
3555
+ | minSearchLength? | `number` | Fewest characters the typed text needs before the data source is asked (default 1) |
3556
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3557
+ | className? | `string` | |
3558
+
3559
+ ### Text (React Native)
3560
+
3561
+ Text in the WireLayer fonts and colours – React Native's own Text would use the system font.
3562
+
3563
+ - Import: `import { Text } from '@wirecore/wirelayer-native'`
3564
+ - Category: Basics
3565
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_basics-text--playground
3566
+ - Also takes: RNTextProps
3567
+
3568
+ | Prop | Type | Description |
3569
+ | --- | --- | --- |
3570
+ | variant? | `VariantProps<typeof text>['variant']` | |
3571
+
3572
+ ### Textarea (React Native)
3573
+
3574
+ Multi-line text field: sizes, auto height between minRows and maxRows, counter with announcements, clear button, spinner
3575
+
3576
+ - Import: `import { Textarea } from '@wirecore/wirelayer-native'`
3577
+ - Category: Basics
3578
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_basics-text--playground
3579
+ - Also takes: TextInputProps
3580
+
3581
+ | Prop | Type | Description |
3582
+ | --- | --- | --- |
3583
+ | invalid? | `boolean` | Marks the textarea as invalid (also inherited from a surrounding Field) |
3584
+ | disabled? | `boolean` | Disables the textarea (also inherited from a surrounding Field) |
3585
+ | size? | `Size` | |
3586
+ | success? | `boolean` | Confirmed value: green border (also inherited from a Field with `success`) |
3587
+ | autoResize? | `boolean` | Grows with its text instead of scrolling (between minRows and maxRows) |
3588
+ | minRows? | `number` | At least this many rows |
3589
+ | maxRows? | `number` | With autoResize: at most this many rows, then it scrolls |
3590
+ | showCount? | `boolean` | Counter "12 / 200" below the field (needs `maxLength`); the remaining characters are announced once typing pauses |
3591
+ | loading? | `boolean` | Shows a spinner in the corner and marks the field busy (aria-busy) |
3592
+ | clearable? | `boolean` | Shows a button that empties the field while it has text (calls onChangeText with "") |
3593
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear input") |
3594
+ | ref? | `Ref<ComponentRef<typeof TextInput>>` | |
3595
+
3596
+ ### TimeGrid (React Native)
3597
+
3598
+ Free time slots for a booking (44 pt each): radio buttons for one time, toggle buttons for a range (start, then end). Taken slots stay visible but cannot be chosen; the number of free slots is announced.
3599
+
3600
+ - Import: `import { TimeGrid } from '@wirecore/wirelayer-native'`
3601
+ - Category: Forms
3602
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-timegrid--playground
3603
+
3604
+ | Prop | Type | Description |
3605
+ | --- | --- | --- |
3606
+ | value? | `T` | Chosen start time ("HH:mm"); with range { start, end } (start times of the first and last slot) |
3607
+ | defaultValue? | `T` | |
3608
+ | onValueChange? | `(value: T) => void` | |
3609
+ | times? | `(string \| TimeGridSlot)[]` | The bookable times; default every `interval` minutes from `start` up to `end` |
3610
+ | start? | `string` | First slot ("HH:mm") when `times` is not given |
3611
+ | end? | `string` | End of the last slot ("HH:mm") when `times` is not given |
3612
+ | interval? | `number` | Minutes between the slots when `times` is not given |
3613
+ | disabledTimes? | `string[]` | Times that are taken |
3614
+ | range? | `boolean` | A start and an end slot instead of one |
3615
+ | hourCycle? | `'h12' \| 'h23'` | 12 or 24 hours; default from the locale |
3616
+ | label? | `string` | Name of the group (default "Available times") |
3617
+ | loading? | `boolean` | Shows that the slots are being loaded |
3618
+ | disabled? | `boolean` | |
3619
+ | size? | `'sm' \| 'md' \| 'lg'` | |
3620
+ | columns? | `number` | Slots per row (default 3) |
3621
+ | className? | `string` | |
3622
+
3623
+ ### Timeline (React Native)
3624
+
3625
+ Events in time along a rail – optionally on both sides, as a feed that loads older entries
3626
+
3627
+ - Import: `import { Timeline } from '@wirecore/wirelayer-native'`
3628
+ - Category: Data
3629
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-timeline--playground
3630
+ - Also takes: ViewProps
3631
+
3632
+ | Prop | Type | Description |
3633
+ | --- | --- | --- |
3634
+ | items | `TimelineItem[]` | |
3635
+ | label | `string` | Accessible name of the list |
3636
+ | align? | `'start' \| 'end' \| 'alternate'` | Content beside the rail: `start` (default), `end` or `alternate` (every second on the other side) |
3637
+ | activeIndex? | `number` | Current event: filled marker, read as current |
3638
+ | renderContent? | `(item: TimelineItem, index: number) => ReactNode` | Replaces time, title and description |
3639
+ | renderOpposite? | `(item: TimelineItem, index: number) => ReactNode` | Content on the other side of the marker |
3640
+ | renderMarker? | `(item: TimelineItem, index: number) => ReactNode` | Content of the marker instead of the icon |
3641
+ | feed? | `boolean` | A feed (role feed, articles) that grows with older entries |
3642
+ | hasMore? | `boolean` | Shows "Load older entries" |
3643
+ | loading? | `boolean` | Older entries are loading (busy) |
3644
+ | setSize? | `number` | Number of all entries (default: unknown while there are more) |
3645
+ | onLoadMore? | `() => void` | |
3646
+ | className? | `string` | |
3647
+
3648
+ ### TimePicker (React Native)
3649
+
3650
+ The trigger opens the times every `step` minutes as radio buttons; 24 or 12 hours follow the locale
3651
+
3652
+ - Import: `import { TimePicker } from '@wirecore/wirelayer-native'`
3653
+ - Category: Forms
3654
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-timepicker--playground
3655
+
3656
+ | Prop | Type | Description |
3657
+ | --- | --- | --- |
3658
+ | value? | `string \| null` | "HH:mm", e.g. "14:30" ("HH:mm:ss" with withSeconds); with timeZone "14:30+02:00" |
3659
+ | defaultValue? | `string \| null` | |
3660
+ | onValueChange? | `(value: string \| null) => void` | |
3661
+ | min? | `string` | Earliest time ("HH:mm") – also the start of the list |
3662
+ | max? | `string` | Latest time ("HH:mm") – also the end of the list |
3663
+ | step? | `number` | Minutes between the times in the list |
3664
+ | options? | `TimeOption[]` | Own times for the list instead of every `step` minutes, optionally named |
3665
+ | withSeconds? | `boolean` | Adds seconds to the value ("HH:mm:ss") |
3666
+ | hourCycle? | `'h12' \| 'h23'` | 12 or 24 hours; default from the locale |
3667
+ | timeZone? | `string` | IANA zone ("Europe/Berlin"): the list is in the zone, the value gets its offset ("14:30+02:00") |
3668
+ | referenceDate? | `string` | Day whose offset applies with timeZone (ISO, default today) |
3669
+ | showTimeZone? | `boolean` | Short zone name after the time ("CEST") |
3670
+ | clearable? | `boolean` | Clear button in the field while it has a value |
3671
+ | size? | `'sm' \| 'md' \| 'lg'` | |
3672
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3673
+ | closeLabel? | `string` | |
3674
+ | disabled? | `boolean` | |
3675
+ | invalid? | `boolean` | |
3676
+ | className? | `string` | |
3677
+
3678
+ ### TimeRangePicker (React Native)
3679
+
3680
+ Start and end time in one field ("09:00 – 17:30"): the sheet lists the start times, then the end times after it
3681
+
3682
+ - Import: `import { TimeRangePicker } from '@wirecore/wirelayer-native'`
3683
+ - Category: Forms
3684
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-timerangepicker--playground
3685
+
3686
+ | Prop | Type | Description |
3687
+ | --- | --- | --- |
3688
+ | value? | `TimeRange \| null` | Start and end ("09:00" – "17:30") |
3689
+ | defaultValue? | `TimeRange \| null` | |
3690
+ | onValueChange? | `(value: TimeRange \| null) => void` | |
3691
+ | min? | `string` | Earliest time ("HH:mm") |
3692
+ | max? | `string` | Latest time ("HH:mm") |
3693
+ | step? | `number` | Minutes between the times in the lists (default 30) |
3694
+ | hourCycle? | `'h12' \| 'h23'` | 12 or 24 hours; default from the locale |
3695
+ | disabled? | `boolean` | |
3696
+ | invalid? | `boolean` | |
3697
+ | size? | `'sm' \| 'md' \| 'lg'` | |
3698
+ | clearable? | `boolean` | Clear button in the field while it has a value |
3699
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3700
+ | closeLabel? | `string` | |
3701
+ | className? | `string` | |
3702
+
3703
+ ### Toaster (React Native)
3704
+
3705
+ Place once at the root of the app; show toasts with toast({ title, description, type, action }), toast.promise(…), toast.update(id, …) and toast.dismiss(id)
3706
+
3707
+ - Import: `import { Toaster } from '@wirecore/wirelayer-native'`
3708
+ - Category: Overlays
3709
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-toast--playground
3710
+
3711
+ | Prop | Type | Description |
3712
+ | --- | --- | --- |
3713
+ | label? | `string` | Accessible name of the notification region |
3714
+ | closeLabel? | `string` | Accessible name of each toast's close button |
3715
+ | placement? | `ToastPlacement` | Top or bottom edge of the screen (default bottom) – on a phone toasts take the width, start/end align the same |
3716
+ | showProgress? | `boolean` | Decorative bar with the time left (toasts with a limit); stands still while the toast is pressed |
3717
+ | swipeToDismiss? | `boolean` | Swipe sideways to dismiss – the close button stays |
3718
+
3719
+ ### Toggletip (React Native)
3720
+
3721
+ Info button that shows an explanation below it on a tap (a tooltip for touch): the explanation sits in a live region and is read when it appears, the focus stays on the button. Another tap, Escape (web) or the screen reader's escape gesture close it.
3722
+
3723
+ - Import: `import { Toggletip } from '@wirecore/wirelayer-native'`
3724
+ - Category: Forms
3725
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-toggletip--playground
3726
+ - Also takes: ViewProps
3727
+
3728
+ | Prop | Type | Description |
3729
+ | --- | --- | --- |
3730
+ | content? | `ReactNode` | The explanation (or children) |
3731
+ | label? | `string` | What it explains – the button is then named "More information about <label>" |
3732
+ | triggerLabel? | `string` | Own accessible name of the button (instead of the one from `label`) |
3733
+ | open? | `boolean` | |
3734
+ | defaultOpen? | `boolean` | |
3735
+ | onOpenChange? | `(open: boolean) => void` | |
3736
+ | icon? | `IconComponent` | Icon component of the button (default Info) |
3737
+ | className? | `string` | |
3738
+ | children? | `ReactNode` | |
3739
+
3740
+ ### Tooltip (React Native)
3741
+
3742
+ Touch: long press shows the text for a few seconds. Web: hover and keyboard focus, Escape hides it, the pointer can move onto the bubble (WCAG 1.4.13). Screen readers get the text as description/hint either way.
3743
+
3744
+ - Import: `import { Tooltip } from '@wirecore/wirelayer-native'`
3745
+ - Category: Overlays
3746
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-tooltip--playground
3747
+
3748
+ | Prop | Type | Description |
3749
+ | --- | --- | --- |
3750
+ | content | `string` | Short help text – read as the trigger's description |
3751
+ | placement? | `'top' \| 'bottom'` | Above (default) or below the trigger |
3752
+ | disabled? | `boolean` | Never opens – the trigger stays as it is |
3753
+ | children | `ReactElement<Record<string, unknown>>` | The trigger, e.g. an IconButton (gets onLongPress, onFocus, onBlur) |
3754
+
3755
+ ### Tour (React Native)
3756
+
3757
+ Coachmarks: the screen is dimmed around the target of each step, a bubble explains it with Back/Next. Each step is a dialog – the screen reader starts at its title; the back button, Escape (web) and "Skip" end it.
3758
+
3759
+ - Import: `import { Tour } from '@wirecore/wirelayer-native'`
3760
+ - Category: Overlays
3761
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_overlays-tour--playground
3762
+
3763
+ | Prop | Type | Description |
3764
+ | --- | --- | --- |
3765
+ | steps | `TourStep[]` | |
3766
+ | open? | `boolean` | Starts the tour |
3767
+ | onOpenChange? | `(open: boolean) => void` | Called with false when it is finished, skipped or closed |
3768
+ | onComplete? | `() => void` | The last step was confirmed |
3769
+
3770
+ ### Tree (React Native)
3771
+
3772
+ Tree: a flat list of rows, indented per level. A branch has a chevron button (aria-expanded) that opens and closes it; the node itself is a radio button (`selectionMode` single), a checkbox (multiple, or `checkable` with a mixed state for partly checked branches). Children load on demand with a loading row, a retry row and announcements; the search keeps the hits with their ancestors.
3773
+
3774
+ - Import: `import { Tree } from '@wirecore/wirelayer-native'`
3775
+ - Category: Data
3776
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-tree--playground
3777
+
3778
+ | Prop | Type | Description |
3779
+ | --- | --- | --- |
3780
+ | items | `TreeNode[]` | |
3781
+ | selectionMode? | `'single' \| 'multiple'` | One node (radio buttons) or several (checkboxes) can be selected |
3782
+ | selectedValue? | `string[]` | |
3783
+ | defaultSelectedValue? | `string[]` | |
3784
+ | onSelectionChange? | `(ids: string[]) => void` | |
3785
+ | expandedValue? | `string[]` | |
3786
+ | defaultExpandedValue? | `string[]` | |
3787
+ | onExpandedChange? | `(ids: string[]) => void` | |
3788
+ | checkable? | `boolean` | A checkbox per node; checking a branch checks its children (pressing a node checks it, no selection) |
3789
+ | checkedValue? | `string[]` | |
3790
+ | defaultCheckedValue? | `string[]` | |
3791
+ | onCheckedChange? | `(ids: string[]) => void` | |
3792
+ | checkStrictly? | `boolean` | Check boxes of parents and children are independent (no cascade) |
3793
+ | checkedStrategy? | `TreeCheckedStrategy` | Which checked ids are reported: `all` (default) – every checked node, `parent` – a fully checked branch instead of its children, `child` – only nodes without children |
3794
+ | loadChildren? | `(node: TreeNode, request: { signal: AbortSignal }) => Promise<TreeNode[]>` | Loads the children of a node with `hasChildren: true` (or `leaf: false`) when it opens; the signal aborts it. Without it (and without `dataSource`) the tree calls `onLoadChildren` and the parent adds the children. |
3795
+ | onLoadChildren? | `(node: TreeNode) => void` | A lazy node opened and there is no loadChildren/dataSource: add its children to the items |
3796
+ | dataSource? | `DataSource<TreeNode>` | Source of the children of lazy nodes (`getChildren`) |
3797
+ | filterValue? | `string` | Search text – controlled, or set it from a search field of your own |
3798
+ | onFilterValueChange? | `(text: string) => void` | |
3799
+ | filterMode? | `'filter' \| 'highlight'` | `filter`: only the hits and their ancestors stay; `highlight`: all nodes stay, the hits are marked |
3800
+ | label? | `string` | Visible label above the tree, also its accessible name |
3801
+ | aria-label? | `string` | Accessible name without a visible label |
3802
+ | filter? | `boolean` | Search field above the tree; hits stay with their ancestors (opened), hits are marked |
3803
+ | expandControls? | `boolean` | Buttons "Expand all" and "Collapse all" above the tree |
3804
+ | showLines? | `boolean` | Guide lines along the children of open branches |
3805
+ | renderNode? | `(node: TreeNode, state: TreeNodeState) => ReactNode` | Content of a node (instead of icon and label); chevron and check box stay |
3806
+ | emptyText? | `string` | Shown without nodes (default "No entries") or without hits ("No matches") |
3807
+ | empty? | `ReactNode` | Replaces the text shown without nodes or hits |
3808
+ | className? | `string` | |
3809
+ | ref? | `Ref<TreeHandle>` | Methods: expandAll, collapseAll, invalidate, focusNode |
3810
+
3811
+ ### Treemap (React Native)
3812
+
3813
+ A list of the items with value and share; the tiles show the shares as areas
3814
+
3815
+ - Import: `import { Treemap } from '@wirecore/wirelayer-native'`
3816
+ - Category: Data
3817
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-treemap--playground
3818
+ - Also takes: Omit<ViewProps, 'children'>
3819
+
3820
+ | Prop | Type | Description |
3821
+ | --- | --- | --- |
3822
+ | items | `TreemapItem[]` | |
3823
+ | label | `string` | Accessible name of the list (and visible title with `showTitle`) |
3824
+ | showTitle? | `boolean` | |
3825
+ | height? | `number` | Height of the area in pt (default 240) – the tiles fill the width |
3826
+ | formatOptions? | `Intl.NumberFormatOptions` | |
3827
+ | locale? | `string` | Default: the LocaleProvider's |
3828
+ | className? | `string` | |
3829
+
3830
+ ### TreeSelect (React Native)
3831
+
3832
+ Select whose options are a tree: the trigger opens a sheet with the tree. One node is a radio button – choosing it closes the sheet; with `multiple` the nodes are check boxes with cascade and the field shows chips.
3833
+
3834
+ - Import: `import { TreeSelect } from '@wirecore/wirelayer-native'`
3835
+ - Category: Forms
3836
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-treeselect--playground
3837
+
3838
+ | Prop | Type | Description |
3839
+ | --- | --- | --- |
3840
+ | items | `TreeNode[]` | |
3841
+ | value? | `T` | Chosen node id (an array of ids with `multiple`) |
3842
+ | defaultValue? | `T` | |
3843
+ | onValueChange? | `(value: T) => void` | |
3844
+ | placeholder? | `string` | |
3845
+ | title? | `string` | Title of the sheet – default: the Field label or the placeholder |
3846
+ | leavesOnly? | `boolean` | Only nodes without children can be chosen; pressing a branch opens it |
3847
+ | defaultExpandedValue? | `string[]` | Open nodes when the sheet opens – default: the path of the chosen node(s) |
3848
+ | disabled? | `boolean` | |
3849
+ | invalid? | `boolean` | |
3850
+ | multiple? | `boolean` | Several nodes, chosen with check boxes; shown as chips in the field |
3851
+ | checkedStrategy? | `TreeCheckedStrategy` | Which checked ids make up the value (`multiple`): `parent` (default) – a fully checked branch instead of its children, `all`, or `child` – only leaves |
3852
+ | checkStrictly? | `boolean` | Check boxes of parents and children are independent (`multiple`) |
3853
+ | maxShown? | `number` | Chips shown before "+N" (`multiple`) |
3854
+ | filter? | `boolean` | Search field above the tree |
3855
+ | clearable? | `boolean` | Button next to the field that clears the value |
3856
+ | clearLabel? | `string` | Accessible name of the clear button (default "Clear selection") |
3857
+ | loading? | `boolean` | Shows a spinner in the field (busy) |
3858
+ | size? | `'sm' \| 'md' \| 'lg'` | Height of the field: 32, 40 (default) or 48 pt |
3859
+ | loadChildren? | `(node: TreeNode, request: { signal: AbortSignal }) => Promise<TreeNode[]>` | Loads the children of lazy nodes (`hasChildren: true`) when they open; they are kept while the field lives |
3860
+ | onLoadChildren? | `(node: TreeNode) => void` | A lazy node opened and there is no loadChildren/dataSource: add its children to the items |
3861
+ | dataSource? | `DataSource<TreeNode>` | Source of the children of lazy nodes (`getChildren`) |
3862
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3863
+ | closeLabel? | `string` | Accessible name of the sheet's close button |
3864
+ | className? | `string` | |
3865
+
3866
+ ### Truncate (React Native)
3867
+
3868
+ Cuts a text after a number of lines (numberOfLines) – with "Show more" or the full text as tooltip. Measures whether it is really cut; screen readers always read the full text.
3869
+
3870
+ - Import: `import { Truncate } from '@wirecore/wirelayer-native'`
3871
+ - Category: Data
3872
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-truncate--playground
3873
+ - Also takes: ViewProps
3874
+
3875
+ | Prop | Type | Description |
3876
+ | --- | --- | --- |
3877
+ | text | `string` | |
3878
+ | lines? | `number` | Lines before the text is cut (default 1) |
3879
+ | tooltip? | `boolean` | The full text on a long press (or hover/focus on the web), only while cut (default true) |
3880
+ | expandable? | `boolean` | "Show more" below the cut text instead of the tooltip |
3881
+ | expanded? | `boolean` | |
3882
+ | defaultExpanded? | `boolean` | |
3883
+ | onExpandedChange? | `(expanded: boolean) => void` | |
3884
+ | moreLabel? | `string` | Text of the button while cut (default "Show more") |
3885
+ | lessLabel? | `string` | Text of the button while expanded (default "Show less") |
3886
+ | className? | `string` | |
3887
+
3888
+ ### VirtualList (React Native)
3889
+
3890
+ A long list that renders only what is in view (FlatList; with `itemGroup` a SectionList with sticky headings). The end loads more (`hasMore` + `onLoadMore`, or a data source) – "Load more" does the same for screen reader and keyboard users; loading, empty and error rows at the end, the data source's state announced.
3891
+
3892
+ - Import: `import { VirtualList } from '@wirecore/wirelayer-native'`
3893
+ - Category: Data
3894
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-virtuallist--playground
3895
+
3896
+ | Prop | Type | Description |
3897
+ | --- | --- | --- |
3898
+ | items? | `readonly T[]` | The items (with `dataSource` the list loads them itself) |
3899
+ | label | `string` | Accessible name of the list |
3900
+ | itemHeight? | `number` | Fixed height of every item in pt: the list knows all positions without measuring (getItemLayout) – faster scrolling and `scrollToIndex` to any item. Leave it out when the items differ in height. |
3901
+ | height? | `DimensionValue` | Height of the scroll area, e.g. 320 or "100%" (default 320) |
3902
+ | itemGroup? | `ItemAccessor<T, string \| null \| undefined>` | Group heading of an item (property name or function): a SectionList whose headings stick to the top |
3903
+ | hasMore? | `boolean` | More items can be loaded: the end of the list (or "Load more") calls onLoadMore |
3904
+ | loading? | `boolean` | The next items are loading: a loading row at the end (aria-busy) |
3905
+ | loadingMore? | `boolean` | |
3906
+ | endThreshold? | `number` | How many items before the end onLoadMore is called (default 5) |
3907
+ | onLoadMore? | `() => void` | The end of the list came near (hasMore) or "Load more" was pressed – load the next items |
3908
+ | onEndReached? | `() => void` | |
3909
+ | dataSource? | `DataSource<T>` | Loads the items page by page while scrolling (instead of `items`); errors show "Try again" |
3910
+ | query? | `Omit<DataQuery, 'page' \| 'pageSize' \| 'cursor'>` | Sorting, filters and search for the data source; a change starts over |
3911
+ | pageSize? | `number` | Items per request of the data source (default 50) |
3912
+ | emptyText? | `string` | Shown when there is no item (default "No entries") |
3913
+ | children | `(item: T, index: number) => ReactNode` | Renders one item |
3914
+ | className? | `string` | |
3915
+ | style? | `StyleProp<ViewStyle>` | |
3916
+ | ref? | `Ref<VirtualListHandle>` | Methods: scrollToIndex, refresh |
3917
+
3918
+ ### Watermark (React Native)
3919
+
3920
+ Repeats a text or image over the content, e.g. "Draft" or "Confidential" – decoration only (drawn as SVG, hidden from screen readers, presses go through).
3921
+
3922
+ - Import: `import { Watermark } from '@wirecore/wirelayer-native'`
3923
+ - Category: Data
3924
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_data-watermark--playground
3925
+ - Also takes: ViewProps, WatermarkOptions
3926
+
3927
+ | Prop | Type | Description |
3928
+ | --- | --- | --- |
3929
+ | className? | `string` | |
3930
+ | children? | `ReactNode` | The content under the watermark |
3931
+
3932
+ ### Wizard (React Native)
3933
+
3934
+ Multi-step form on the Stepper: "Next" checks the step (async with a spinner; a failed check is announced), "Back" keeps everything; an optional summary step before finishing.
3935
+
3936
+ - Import: `import { Wizard } from '@wirecore/wirelayer-native'`
3937
+ - Category: Navigation
3938
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_navigation-wizard--playground
3939
+
3940
+ | Prop | Type | Description |
3941
+ | --- | --- | --- |
3942
+ | steps | `WizardStep[]` | |
3943
+ | step? | `number` | Current step (0-based; steps + summary = done) – controlled with onStepChange |
3944
+ | defaultStep? | `number` | |
3945
+ | onStepChange? | `(step: number) => void` | |
3946
+ | onComplete? | `() => void` | The last step was finished (after its check) |
3947
+ | renderStep | `(index: number, step: WizardStep) => ReactNode` | Content of a step – its fields stay in the form state, so going back loses nothing |
3948
+ | summary? | `ReactNode` | A last step with this summary before finishing |
3949
+ | summaryLabel? | `string` | Name of the summary step (default "Summary") |
3950
+ | completed? | `ReactNode` | Shown after finishing |
3951
+ | orientation? | `'horizontal' \| 'vertical'` | `vertical`: the steps with their labels top to bottom |
3952
+ | className? | `string` | |
3953
+
3954
+ ### YearPicker (React Native)
3955
+
3956
+ Year field ("2026"): picks from a grid of twelve years; range: start – end
3957
+
3958
+ - Import: `import { YearPicker } from '@wirecore/wirelayer-native'`
3959
+ - Category: Forms
3960
+ - Story: https://wirecore.github.io/WireLayer/?path=/story/native_forms-yearpicker--playground
3961
+
3962
+ | Prop | Type | Description |
3963
+ | --- | --- | --- |
3964
+ | defaultValue? | `T` | |
3965
+ | onValueChange? | `(value: T) => void` | |
3966
+ | range? | `boolean` | Start and end instead of one |
3967
+ | min? | `string` | Earliest selectable period (same format as the value) |
3968
+ | max? | `string` | Latest selectable period |
3969
+ | presets? | `(PeriodPreset \| { label: string; value: PeriodRange })[]` | Buttons below the grid: "thisMonth", "lastQuarter", "last3Years" … or own { label, value } |
3970
+ | disabled? | `boolean` | |
3971
+ | invalid? | `boolean` | |
3972
+ | size? | `'sm' \| 'md' \| 'lg'` | |
3973
+ | clearable? | `boolean` | Clear button in the field while it has a value |
3974
+ | aria-label? | `string` | Accessible name without a surrounding Field |
3975
+ | closeLabel? | `string` | |
3976
+ | className? | `string` | |
3977
+ | value? | `T` | Year as "2026"; with range { start, end } |
3978
+
3979
+ ## Functions and composables
3980
+
3981
+ - `announce` (`@wirecore/wirelayer-native`): Reads a text to screen reader users, e.g. "3 entries deleted": iOS and Android through AccessibilityInfo (assertive interrupts the current speech on iOS), the web through a live region – the one of <LiveAnnouncer>, else one at the end of the page.
3982
+ - `applyEventChange` (`@wirecore/wirelayer-native`): –
3983
+ - `bindCheckbox` (`@wirecore/wirelayer-native/form`): Props for Checkbox and Switch
3984
+ - `bindInput` (`@wirecore/wirelayer-native/form`): Props for Input, Textarea, PasswordInput, MaskInput …: `<Input {...bindInput(field)} />`
3985
+ - `bindValue` (`@wirecore/wirelayer-native/form`): Props for Select, MultiSelect, RadioGroup, ChipGroup, SegmentedControl, DatePicker, NumberInput … – a choice in a sheet has no blur, so choosing marks the field touched as well
3986
+ - `cameraPicker` (`@wirecore/wirelayer-native/expo-image-picker`): A new photo from the camera – asks for the permission first
3987
+ - `closeAllDialogs` (`@wirecore/wirelayer-native`): Closes every dialog of the DialogHost – their promises resolve with undefined
3988
+ - `combineValidators` (`@wirecore/wirelayer-native/form`): –
3989
+ - `confirm` (`@wirecore/wirelayer-native`): Asks for a confirmation in the app-wide <ConfirmDialog />: resolves with true, or false when cancelled (also the back button, Escape or a newer confirm/prompt)
3990
+ - `createValidator` (`@wirecore/wirelayer-native/form`): –
3991
+ - `dismissToast` (`@wirecore/wirelayer-native`): –
3992
+ - `documentPicker` (`@wirecore/wirelayer-native/expo-document-picker`): Documents from the system's file picker (Files on iOS, the document picker on Android, the file dialog on the web)
3993
+ - `firstError` (`@wirecore/wirelayer-native/form`): First readable message of TanStack Form errors (strings or Standard Schema issues).
3994
+ - `focusControl` (`@wirecore/wirelayer-native`): Moves the focus to the control of `id`: text fields get the keyboard focus, every control the screen reader focus (iOS/Android); on the web the element with that id. False when nothing has the id.
3995
+ - `fonts` (`@wirecore/wirelayer-native`): The WireLayer fonts, bundled with the app (no CDN). One family per weight, named like the `font-*` classes expect. Load them before the first render: `const [loaded] = useFonts(fonts)` (expo-font).
3996
+ - `hasLength` (`@wirecore/wirelayer-native/form`): –
3997
+ - `imageLibraryPicker` (`@wirecore/wirelayer-native/expo-image-picker`): Photos (and videos) from the photo library
3998
+ - `isEmail` (`@wirecore/wirelayer-native/form`): –
3999
+ - `isIban` (`@wirecore/wirelayer-native/form`): –
4000
+ - `isInRange` (`@wirecore/wirelayer-native/form`): –
4001
+ - `isInteger` (`@wirecore/wirelayer-native/form`): –
4002
+ - `isPhone` (`@wirecore/wirelayer-native/form`): –
4003
+ - `isRequired` (`@wirecore/wirelayer-native/form`): –
4004
+ - `isUrl` (`@wirecore/wirelayer-native/form`): –
4005
+ - `matchesField` (`@wirecore/wirelayer-native/form`): –
4006
+ - `matchesPattern` (`@wirecore/wirelayer-native/form`): –
4007
+ - `openDialog` (`@wirecore/wirelayer-native`): Opens a dialog in the app-wide <DialogHost /> from anywhere (no state in the screen): resolves with the value passed to `close(result)`, or undefined when dismissed. Dialogs opened from a dialog stack on top of it.
4008
+ - `prompt` (`@wirecore/wirelayer-native`): Asks for a text in the app-wide <ConfirmDialog />: resolves with the value, or null when cancelled
4009
+ - `registerLocale` (`@wirecore/wirelayer-native`): –
4010
+ - `setAppearance` (`@wirecore/wirelayer-native`): Switches the colour theme and light/dark mode – the counterpart of `data-theme` / `data-mode` on the web. Custom themes have to be registered as `extraThemes` (see `nativeExtraThemes()` from
4011
+ - `shareFile` (`@wirecore/wirelayer-native/expo-sharing`): Writes the file to the app's cache and opens the share sheet (save to Files, mail, other apps): `<DataTable onExport={shareFile} … />`. Resolves false when the device cannot share.
4012
+ - `shareUri` (`@wirecore/wirelayer-native/expo-sharing`): Opens the share sheet for a file that is already on the device or online (`file://…` or `https://…`), e.g. the `src` of a PdfViewer: `<PdfViewer onShare={shareUri} … />`. Remote files are downloaded to the cache first.
4013
+ - `toast` (`@wirecore/wirelayer-native`): –
4014
+ - `useAppState` (`@wirecore/wirelayer-native`): State of the app: 'active' in the foreground, 'background' or 'inactive' (iOS: app switcher, call)
4015
+ - `useClipboard` (`@wirecore/wirelayer-native/expo-clipboard`): Copies text to the clipboard: `const { copy, copied, error, reset } = useClipboard()` – `copied` is true for `timeout` ms (default 2000), the same API as the web hook.
4016
+ - `useColorScheme` (`@wirecore/wirelayer-native`): The colour scheme of the device: 'light' or 'dark' (`initialValue` while the system does not say)
4017
+ - `useDebouncedCallback` (`@wirecore/wirelayer-native`): A function that runs `fn` once `wait` ms passed without another call – with `cancel`, `flush` and `pending`. Always calls the latest `fn`; cancelled when the component unmounts.
4018
+ - `useDebouncedValue` (`@wirecore/wirelayer-native`): A copy of `value` that follows only after `wait` ms without changes (search fields)
4019
+ - `useDisclosure` (`@wirecore/wirelayer-native`): Open/closed state of a dialog, drawer, sheet …: `const { opened, open, close, toggle } = useDisclosure()`
4020
+ - `useDocumentVisibility` (`@wirecore/wirelayer-native`): 'visible' while the app is in the foreground, else 'hidden' – the counterpart of the web hook (pause timers)
4021
+ - `useFieldControl` (`@wirecore/wirelayer-native`): Props a control inside a Field spreads onto its TextInput/Pressable
4022
+ - `useFormErrors` (`@wirecore/wirelayer-native/form`): The errors of a TanStack form for FormErrorSummary: one entry per touched field with an error, linked to the field; `attempts` (submit attempts) refocuses the summary on every submit: `<FormErrorSummary errors={summary.errors} focusKey={summary.attempts} />`
4023
+ - `useInterval` (`@wirecore/wirelayer-native`): Runs `fn` every `interval` ms while active (starts on mount unless `autoStart: false`)
4024
+ - `useLocale` (`@wirecore/wirelayer-native`): Locale and texts of the nearest LocaleProvider – English (en-US) without one
4025
+ - `useReducedMotion` (`@wirecore/wirelayer-native`): –
4026
+ - `useSelection` (`@wirecore/wirelayer-native`): Selected items of a list: toggle, select all, clear – with "all"/"some" for a header checkbox or an ActionBar
4027
+ - `useStateHistory` (`@wirecore/wirelayer-native`): A value with undo and redo: `set` adds a step, `undo`/`redo` move through them
4028
+ - `useThrottledCallback` (`@wirecore/wirelayer-native`): A function that runs `fn` at most once per `wait` ms (scrolling, gestures)
4029
+ - `useTimeout` (`@wirecore/wirelayer-native`): Runs `fn` once after `delay` ms when started (on mount with `autoStart`)
4030
+ - `useTranslations` (`@wirecore/wirelayer-native`): Texts of the nearest LocaleProvider
4031
+ - `useValidators` (`@wirecore/wirelayer-native/form`): The validators with the texts and number format of the nearest LocaleProvider: `const v = useValidators()`, then `validators: { onChange: v.combine(v.isRequired(), v.isEmail()) }`. Each validator is a Standard Schema, so TanStack Form takes it directly.
4032
+ - `validateFields` (`@wirecore/wirelayer-native/form`): Validates some fields of a TanStack form (e.g. one Wizard step) and marks them touched, so their errors show. Resolves with true when none has an error.
4033
+
4034
+ ## Guides
4035
+
4036
+ ### Built into the components
4037
+
4038
+ | Topic | Implementation |
4039
+ | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4040
+ | Contrast (1.4.3, 1.4.11) | All token pairs ≥ 4.5:1 for text, ≥ 3:1 for borders, selected states, icons and focus – in every theme, light and dark, including hover; `checkTheme()` checks your own themes |
4041
+ | Focus (2.4.7) | Visible focus ring (`focus-visible`) on everything that is interactive |
4042
+ | Labels & descriptions (1.3.1, 4.1.2) | `Field` links label, help text and error through `for`/`aria-describedby`; prefix/suffix are read out as well |
4043
+ | Errors (3.3.1) | `error` sets `aria-invalid`, the error text is a live region |
4044
+ | Required fields (3.3.2) | `required` on the input; the asterisk is `aria-hidden` |
4045
+ | Icon buttons (4.1.2, 2.5.3) | `label` is required and becomes the `aria-label`; a counter badge becomes part of the name (“Notifications, 4 new”); icons are always `aria-hidden` |
4046
+ | Avatars (1.1.1) | With `name`: an image (`role="img"`) with the name instead of spelled-out initials; without `name`: decorative (`aria-hidden`) |
4047
+ | Avatar groups (1.3.1) | `role="group"` with `label`; “+5” is announced as “5 more” |
4048
+ | Breadcrumb (1.3.1, 2.4.8) | `<nav aria-label="Breadcrumb">` with `<ol>`, separators `aria-hidden`, current page `aria-current="page"`, icon-only items keep their text for screen readers |
4049
+ | Status dots (1.4.1) | Never color alone – `StatusDot` always shows a text label, the dot is `aria-hidden` |
4050
+ | Selection controls (2.1.1, 4.1.2) | Checkbox, Switch (`role=\"switch\"`), Radio, Chips (`aria-pressed`) and segments use real inputs or buttons: Tab, Space and arrow keys as in the ARIA Authoring Practices; groups are named; the focus ring sits visibly on the control |
4051
+ | High contrast for selection | Selected chips, segments, checkboxes and switches use the system color `Highlight` in Windows contrast mode |
4052
+ | Select (4.1.2, 2.1.1) | Combobox with listbox: open with Enter/arrow, select with Enter, Escape closes, focus returns to the trigger; disabled options are skipped; named through `Field` |
4053
+ | Tabs (4.1.2, 2.1.1) | `tablist` with a name, arrow keys/Home/End switch, the panel is focusable and named after its tab |
4054
+ | Steps (1.3.1) | `<ol>` with `aria-current=\"step\"`; every step announces its status (completed/current/to do) |
4055
+ | Pagination (2.4.8) | `<nav>` with a name, page buttons as “Page 2 of 3”, current page `aria-current=\"page\"`, the summary “5–8 of 12” is a live region |
4056
+ | Progress (4.1.2) | `progressbar` named after the label, the value as `aria-valuetext` (“68%”) |
4057
+ | Menu (2.1.1, 4.1.2) | Trigger with `aria-haspopup`/`aria-expanded`, arrow keys in the menu, Enter selects, Escape closes, focus returns to the trigger |
4058
+ | Dialog (2.1.2, 2.4.3) | Focus trap, `aria-modal`, named after the title and described by the description, Escape closes, focus returns to the trigger; `role=\"alertdialog\"` for confirmations |
4059
+ | Tooltip (1.4.13) | also appears on keyboard focus, describes the trigger (`aria-describedby`), stays open on hover, Escape closes |
4060
+ | Toasts (4.1.3, 2.2.1) | named live region “Notifications”, every toast `role=\"status\"` with a close button; toasts with an action do not disappear by themselves |
4061
+ | Loading (4.1.3) | A button with `loading` stays focusable (`aria-disabled`, `aria-busy`) and ignores clicks; `Spinner` is a live region |
4062
+ | Alerts (4.1.3) | `Alert` is `role="alert"` (warn, danger) or `role="status"` (info, success) |
4063
+ | Target size (2.5.8) | All controls at least 24 × 24 px |
4064
+ | Motion (2.3.3) | Overlays fade in and out smoothly (Dialog, Menu, Select, Tooltip, Toasts); with `prefers-reduced-motion` there are no animations and a slower spinner – the keyboard tests run in both variants |
4065
+ | High contrast mode | Buttons and badges show an outline in Windows contrast mode (`forced-colors`) |
4066
+
4067
+ ### What stays with the project
4068
+
4069
+ - Every input needs a name: `Field` with `label` – or `aria-label` on the `Input`.
4070
+ - Render clickable cards with `asChild` as `<a>` or `<button>`, never as a clickable `<div>`.
4071
+ - Add router links (RouterLink, Next.js Link) to the breadcrumb through `BreadcrumbItem` with `asChild`.
4072
+ - If a `StatusDot` changes live, give the element `role="status"` so that the change is announced.
4073
+ - Default texts (`Loading`, `Close`) come from the `LocaleProvider` (English without a provider, e.g. German with `locale="de-DE"` after `registerLocale('de', de)`); single texts can be overridden through props like `label` / `dismissLabel`.
4074
+ - Set `lang` and `dir` on the `<html>` element – screen readers choose the pronunciation from it, browsers the writing direction.
4075
+ - Set the focus sensibly after an `Alert` is closed.
4076
+
4077
+ ### Automated checks
4078
+
4079
+ ```sh
4080
+ docker compose run --rm workspace pnpm test # token contrasts + axe in jsdom (Vue and React)
4081
+ docker compose run --rm a11y # axe in a real browser against every story, light + dark
4082
+ docker compose run --rm e2e # keyboard interaction in a real browser (Vue and React)
4083
+ ```
4084
+
4085
+ In Storybook, the **Accessibility** panel also shows the axe results of the current story.
4086
+
4087
+ ### Installation
4088
+
4089
+ The packages are published on npm:
4090
+
4091
+ ```sh
4092
+ pnpm add @wirecore/wirelayer-vue # or
4093
+ pnpm add @wirecore/wirelayer-react # or
4094
+ pnpm add @wirecore/wirelayer-native
4095
+ ```
4096
+
4097
+ ### Adding the styles
4098
+
4099
+ Tailwind CSS v4.1 or newer is required. The library ships the theme, the fonts and the classes of the components:
4100
+
4101
+ ```css
4102
+ @import 'tailwindcss';
4103
+ @import '@wirecore/wirelayer-vue/styles.css'; /* or @wirecore/wirelayer-react/styles.css */
4104
+ ```
4105
+
4106
+ ### Smaller CSS: only the components you use
4107
+
4108
+ `styles.css` brings the classes of all components (about 175 kB, 28 kB gzip). A site that uses only a few imports the
4109
+ theme and fonts with `styles-core.css` instead, and then the classes of each component it uses – one file per
4110
+ component, and one per recipe for recipes it calls itself:
4111
+
4112
+ ```css
4113
+ @import 'tailwindcss';
4114
+ @import '@wirecore/wirelayer-vue/styles-core.css'; /* or @wirecore/wirelayer-react/styles-core.css */
4115
+ @import '@wirecore/wirelayer-vue/sources/Button.css';
4116
+ @import '@wirecore/wirelayer-vue/sources/Field.css';
4117
+ @import '@wirecore/wirelayer-vue/sources/Input.css';
4118
+ @import '@wirecore/wirelayer-blocks-vue/sources/SiteHeader.css';
4119
+ @import '@wirecore/wirelayer-recipes/sources/card.css'; /* card() from @wirecore/wirelayer-recipes */
4120
+ ```
4121
+
4122
+ The file of a component also brings the classes of the components it renders (SiteHeader → IconButton); exports
4123
+ that render components, such as `confirm` or the DataTable feature `dateInput`, have a file too. In development the
4124
+ components warn in the console when the classes of a recipe they render are missing. Recipes you call yourself
4125
+ (`card()`) are not checked – add their files along with the import.
4126
+
4127
+ ### Usage
4128
+
4129
+ ```vue
4130
+ <script setup lang="ts">
4131
+ import { Button, Field, Input } from '@wirecore/wirelayer-vue';
4132
+ import { ArrowRight } from '@lucide/vue';
4133
+ </script>
4134
+
4135
+ <template>
4136
+ <Field label="Email" required>
4137
+ <Input v-model="email" type="email" />
4138
+ </Field>
4139
+ <Button :trailing-icon="ArrowRight">Start project</Button>
4140
+ </template>
4141
+ ```
4142
+
4143
+ ```tsx
4144
+ import { Button, Field, Input } from '@wirecore/wirelayer-react';
4145
+ import { ArrowRight } from 'lucide-react';
4146
+
4147
+ <Field label="Email" required>
4148
+ <Input type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
4149
+ </Field>
4150
+ <Button trailingIcon={ArrowRight}>Start project</Button>
4151
+ ```
4152
+
4153
+ ### Nuxt
4154
+
4155
+ ```ts
4156
+ // nuxt.config.ts
4157
+ import tailwindcss from '@tailwindcss/vite';
4158
+
4159
+ export default defineNuxtConfig({
4160
+ css: ['~/assets/main.css'], // @import 'tailwindcss'; @import '@wirecore/wirelayer-vue/styles.css';
4161
+ vite: { plugins: [tailwindcss()] },
4162
+ });
4163
+ ```
4164
+
4165
+ ```vue
4166
+ <!-- app.vue: set light/dark before the first render (no flash while loading) -->
4167
+ <script setup lang="ts">
4168
+ import { modeScript } from '@wirecore/wirelayer-recipes';
4169
+
4170
+ useHead({ script: [{ innerHTML: modeScript() }] });
4171
+ </script>
4172
+ ```
4173
+
4174
+ ### Next.js (App Router)
4175
+
4176
+ ```tsx
4177
+ // app/layout.tsx – globals.css: @import 'tailwindcss'; @import '@wirecore/wirelayer-react/styles.css';
4178
+ import { modeScript } from '@wirecore/wirelayer-recipes';
4179
+ import './globals.css';
4180
+
4181
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
4182
+ return (
4183
+ <html lang="en" suppressHydrationWarning>
4184
+ <head>
4185
+ <script dangerouslySetInnerHTML={{ __html: modeScript() }} />
4186
+ </head>
4187
+ <body>{children}</body>
4188
+ </html>
4189
+ );
4190
+ }
4191
+ ```
4192
+
4193
+ The components are client components (`'use client'` is built in) and can be used directly in server components.
4194
+ Exception: **icons as props** (`leadingIcon={ArrowRight}`) are functions and must not be passed from a server to a
4195
+ client component – move such places into a `'use client'` component of their own.
4196
+
4197
+ `@wirecore/wirelayer-recipes` comes along with the framework packages; with pnpm, add it directly for `modeScript`.
4198
+
4199
+ ### Light, dark and themes
4200
+
4201
+ Light/dark is switched by the `data-mode` attribute, the color theme by the `data-theme` attribute – e.g. on the
4202
+ `<html>` element:
4203
+
4204
+ ```html
4205
+ <html data-mode="dark" data-theme="ocean"></html>
4206
+ ```
4207
+
4208
+ Without `data-mode` the page follows the system setting (`prefers-color-scheme`) – light or dark, without any
4209
+ JavaScript. `data-mode="light"` or `data-mode="dark"` forces a mode, also for a part of the page. Without `data-theme`
4210
+ the theme “WireLayer” (`data-theme="wirecore"`) applies. With Tailwind you can style specifically with `dark:` – it
4211
+ follows the same rules. More under _Foundations › Themes_.
4212
+
4213
+ ### Customizing: defaults and classes per part
4214
+
4215
+ Every component consists of named parts of its recipe (`base`, `icon`, `row`, `trigger` …, see
4216
+ `@wirecore/wirelayer-recipes`). `RecipesProvider` sets default variants and additional classes for everything below it
4217
+ (inner providers extend outer ones), the `classes` prop adds classes for a single component. Explicitly set props and
4218
+ `class`/`className` always win; classes are merged with tailwind-merge.
4219
+
4220
+ ```vue
4221
+ <RecipesProvider
4222
+ :recipes="{
4223
+ button: { defaultVariants: { size: 'sm' }, classes: { base: 'tracking-wide' } },
4224
+ dataTable: { defaultVariants: { size: 'sm' }, classes: { th: 'bg-bg-2' } },
4225
+ }"
4226
+ >
4227
+ <App />
4228
+ </RecipesProvider>
4229
+
4230
+ <Button :classes="{ icon: 'text-primary' }" :leading-icon="Plus">New</Button>
4231
+ ```
4232
+
4233
+ ```tsx
4234
+ <RecipesProvider recipes={{ card: { classes: { base: 'rounded-none' } } }}>
4235
+ <App />
4236
+ </RecipesProvider>;
4237
+
4238
+ <DataTable classes={{ row: 'h-14' }} … />;
4239
+ ```
4240
+
4241
+ The names are the exports of the recipes (`button`, `iconButton`, `dataTable` …) and are checked by TypeScript, as are
4242
+ the variants and parts. Your own components use the same through `useRecipe('button', button)`.
4243
+
4244
+ ### Hooks and composables
4245
+
4246
+ Around 40 hooks (React) and composables (Vue) with the same names and the same logic – for your own components and
4247
+ pages: state (`useDisclosure`, `useSelection`, `useStateHistory`), time (`useDebouncedValue`, `useInterval`, `useIdle`),
4248
+ browser (`useClipboard`, `useLocalStorage`, `useMediaQuery`, `useReducedMotion`, `useFullscreen`), observers
4249
+ (`useElementSize`, `useIntersection`, `useScrollSpy`), focus (`useFocusTrap`, `useFocusReturn`) and keyboard shortcuts
4250
+ (`useHotkeys`, shown in the `HotkeysDialog`). Examples: _Utilities › Hooks_ in the
4251
+ Vue and React Storybooks; React Native has a subset with the same names.
4252
+
4253
+ ```ts
4254
+ import { useDisclosure, useLocalStorage } from '@wirecore/wirelayer-vue'; // or @wirecore/wirelayer-react
4255
+
4256
+ const { opened, open, close } = useDisclosure();
4257
+ const note = useLocalStorage('note', ''); // React: const [note, setNote] = useLocalStorage('note', '')
4258
+ ```
4259
+
4260
+ ### Blocks and ConditionBuilder
4261
+
4262
+ `@wirecore/wirelayer-blocks-vue` and `@wirecore/wirelayer-blocks-react` build on `@wirecore/wirelayer-vue` and `@wirecore/wirelayer-react`
4263
+ (peer dependency) and bring larger building blocks: SiteHeader, CtaSection, ModeToggle, AuthForm, AuthLayout and the
4264
+ ConditionBuilder (nested AND/OR rules). Examples: _Blocks_ in the Vue and React Storybooks.
4265
+
4266
+ ```sh
4267
+ pnpm add @wirecore/wirelayer-blocks-vue # or @wirecore/wirelayer-blocks-react
4268
+ ```
4269
+
4270
+ The ConditionBuilder is also the editor for the advanced filter of the DataTable. The table filters by itself (or passes
4271
+ the tree to the server as `condition`); it gets the editor from outside – without it, it shows no button and points this
4272
+ out on the console during development:
4273
+
4274
+ ```tsx
4275
+ import { ConditionBuilder } from '@wirecore/wirelayer-blocks-react';
4276
+ import { DataTable } from '@wirecore/wirelayer-react/data-table';
4277
+
4278
+ <DataTable
4279
+ data={rows}
4280
+ columns={columns}
4281
+ advancedFilter
4282
+ renderAdvancedFilter={(props) => <ConditionBuilder {...props} />}
4283
+ />;
4284
+ ```
4285
+
4286
+ ```vue
4287
+ <DataTable :data="rows" :columns="columns" advanced-filter>
4288
+ <template #advancedFilter="{ fields, value, setValue, label }">
4289
+ <ConditionBuilder :fields="fields" :model-value="value" :label="label" @update:model-value="setValue" />
4290
+ </template>
4291
+ </DataTable>
4292
+ ```
4293
+
4294
+ ### DataTable feature modules
4295
+
4296
+ Parts of the DataTable that bring a lot of code along are imported on their own – an app only bundles the ones it passes
4297
+ in `features` (fixed for the life of a table). The DatePicker alone is about 40 KB (gzip).
4298
+
4299
+ | Feature | Import | Adds | Without it |
4300
+ | ------------- | ---------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------- |
4301
+ | `virtualRows` | `@wirecore/wirelayer-react/virtual` (peer dependency TanStack Virtual) | only the visible rows are rendered with `virtual` | all rows are rendered, a hint in development |
4302
+ | `dateInput` | `@wirecore/wirelayer-react/data-table` | DatePicker for `date` and `datetime` filters/editors | the browser's date input |
4303
+ | `numberInput` | `@wirecore/wirelayer-react/data-table` | NumberInput for `number` filters and editors | the browser's number input |
4304
+
4305
+ ```tsx
4306
+ import { DataTable, dateInput, numberInput } from '@wirecore/wirelayer-react/data-table';
4307
+ import { virtualRows } from '@wirecore/wirelayer-react/virtual';
4308
+
4309
+ // Once for all tables of the app
4310
+ const features = [virtualRows, dateInput, numberInput];
4311
+
4312
+ <DataTable data={rows} columns={columns} features={features} scrollHeight="480px" virtual />;
4313
+ ```
4314
+
4315
+ ```vue
4316
+ <DataTable :data="rows" :columns="columns" :features="features" scroll-height="480px" virtual />
4317
+ ```
4318
+
4319
+ Vue: the same imports from `@wirecore/wirelayer-vue/data-table` and `@wirecore/wirelayer-vue/virtual`.
4320
+
4321
+ ### AI assistants (MCP, llms.txt)
4322
+
4323
+ So that Claude, Cursor and others use the components correctly, the API is available as text and as an MCP server:
4324
+
4325
+ - **`/llms.txt`** and **`/llms-full.txt`** in this Storybook: an overview and all props (React and Vue names),
4326
+ hooks and these guides in one file.
4327
+ - **In every package** (`@wirecore/wirelayer-vue`, `-react`, `-native`, `-css`): `llms.txt` and `llms-full.txt` in that
4328
+ package's own syntax – Vue with events and slots, HTML as a class reference. Point the assistant at
4329
+ `node_modules/@wirecore/wirelayer-vue/llms.txt` (e.g. in CLAUDE.md); they match the installed version.
4330
+ - **MCP server** `@wirecore/wirelayer-mcp` with the tools `list_components`, `get_component`, `search_components` and
4331
+ `get_guide`:
4332
+
4333
+ ```sh
4334
+ claude mcp add wirelayer -- npx -y -p @wirecore/wirelayer-mcp wirelayer-mcp
4335
+ ```
4336
+
4337
+ The package is called `@wirecore/wirelayer-mcp`, the command `wirelayer-mcp` (the former name `wirecore-mcp` still works).
4338
+
4339
+ Both are generated from the source code (`pnpm --filter @wirecore/wirelayer-mcp collect`); a test checks that they are
4340
+ up to date.
4341
+
4342
+ ### Language and writing direction
4343
+
4344
+ By default the components speak English (`en-US`). `LocaleProvider` switches texts, number and date formats and the
4345
+ writing direction for everything below it – English is built in; other languages are registered once (see below),
4346
+ get their texts through `translations` or fall back to English:
4347
+
4348
+ ```vue
4349
+ <LocaleProvider locale="de-DE"><!-- after registerLocale('de', de) -->
4350
+ <App />
4351
+ </LocaleProvider>
4352
+ ```
4353
+
4354
+ ```tsx
4355
+ import { messages } from '@wirecore/wirelayer-recipes';
4356
+
4357
+ <LocaleProvider locale="fr-FR" translations={{ ...messages.en, common: { ...messages.en.common, close: 'Fermer' } }}>
4358
+ <App />
4359
+ </LocaleProvider>;
4360
+ ```
4361
+
4362
+ The app sets `lang` and `dir` on the `<html>` element itself. For languages like Arabic or Hebrew (`dir="rtl"`),
4363
+ spacing, borders, directional icons and the arrow keys are mirrored. Your own components read the texts with
4364
+ `useTranslations()` and the locale and direction with `useLocale()`. In Storybook the **Language** toolbar item
4365
+ switches between English and the registered languages (Arabic also shows the right-to-left layout).
4366
+
4367
+ ### Registering languages
4368
+
4369
+ German, French, Spanish, Italian, Portuguese (Portugal and Brazil), Dutch, Polish, Czech, Hungarian, Latvian, Arabic
4370
+ and Turkish ship as separate modules – they cost nothing as long as an app does not import them. Registered once at
4371
+ startup, they apply to every region of the language (`fr` also for `fr-CA`):
4372
+
4373
+ ```ts
4374
+ import { registerLocale } from '@wirecore/wirelayer-vue'; // likewise @wirecore/wirelayer-react and @wirecore/wirelayer-native
4375
+ import { ar } from '@wirecore/wirelayer-vue/locales/ar';
4376
+ import { de } from '@wirecore/wirelayer-vue/locales/de';
4377
+ import { fr } from '@wirecore/wirelayer-vue/locales/fr';
4378
+ import { ptBR } from '@wirecore/wirelayer-vue/locales/pt-BR';
4379
+
4380
+ registerLocale('de', de); // de-DE, de-AT, de-CH …
4381
+ registerLocale('fr', fr);
4382
+ registerLocale('ar', ar); // ar-EG, ar-MA … – right to left
4383
+ registerLocale('pt-BR', ptBR); // a region takes precedence over its language (pt)
4384
+ ```
4385
+
4386
+ Instead of registering, a module can also be passed directly: `<LocaleProvider locale="fr-FR" :translations="fr">`.
4387
+ Plurals follow the rules of the language (`Intl.PluralRules`, e.g. the six forms of Arabic), numbers in the texts
4388
+ follow the locale (`ar-EG` writes Arabic-Indic digits, `de-DE` only groups from 10.000 on). The texts should be proofread by
4389
+ native speakers before use.
4390
+
4391
+ ### Server data and loading more
4392
+
4393
+ Components with lists, pages or parts that load later support two ways – both with the same names:
4394
+
4395
+ - **Manual:** the app loads by itself and passes the result in (`items`, `data`, `events` …). The component reports
4396
+ what it needs – `filterChange` (search text), `loadMore` (end reached), `pageChange`, `loadChildren`,
4397
+ `rangeChange` – and shows the state with `loading`, `hasMore` and `totalCount`/`rowCount`. When the server searches,
4398
+ `manualFilter` prevents a second filtering in the browser.
4399
+ - **Data source:** with `dataSource` and `getItems`, the component asks by itself – the first page when it opens, a
4400
+ search after a typing pause, further pages while scrolling. Outdated requests are canceled, loading and results are
4401
+ announced, errors are shown with “Try again”. `getChildren` loads children in trees, `getItemsByKeys` the labels of
4402
+ selected values that are not loaded (yet). Nothing is requested on the server.
4403
+
4404
+ ```ts
4405
+ import type { DataSource } from '@wirecore/wirelayer-recipes';
4406
+
4407
+ export const customers: DataSource<Customer> = {
4408
+ async getItems({ page = 1, pageSize = 50, search = '', signal }) {
4409
+ const query = new URLSearchParams({ page: String(page), size: String(pageSize), q: search });
4410
+ const response = await fetch(`/api/customers?${query}`, { signal });
4411
+ const { rows, total } = await response.json();
4412
+ return { items: rows, totalCount: total };
4413
+ },
4414
+ };
4415
+ ```
4416
+
4417
+ ```vue
4418
+ <Select v-model="customer" :data-source="customers" filter :min-search-length="2" item-value="id" item-label="name" />
4419
+ ```
4420
+
4421
+ | Component | Manual | `dataSource` | Loading more |
4422
+ | ------------------------------------------------------ | ------------------------------------------------------------- | -------------------------------------------- | ------------------------------------ |
4423
+ | Select, MultiSelect, Combobox, Autocomplete, Listbox | `filterChange`, `loadMore`, `loading`, `hasMore` | ✓ | at the end of the list |
4424
+ | VirtualSelect, TagsInput (suggestions) | like Select | ✓ | at the end of the list |
4425
+ | Mentions | `search`, `loading` | ✓ (per trigger) | – |
4426
+ | CommandPalette | `filterChange`, `loading`, `filter: false` | ✓ (after its own matches) | – |
4427
+ | VirtualList | `loadMore`, `loading`, `hasMore` | ✓ | while scrolling |
4428
+ | DataView | `manual`, `totalCount`, `pageChange`, `loadMore`, `loading` | ✓ (pages or infinite) | pages, “Load more”, scrolling |
4429
+ | DataTable | `manual`, `rowCount`, sorting/filter/page, `loadMore` | ✓ (also the advanced filter as `condition`) | pages, scrolling (virtual) |
4430
+ | Tree, VirtualTree, TreeSelect, CascadeSelect, OrgChart | `loadChildren` (event) | ✓ (`getChildren`) or `loadChildren` function | children when expanded |
4431
+ | PickList | source list: `filterChange`, `loadMore`, `loading`, `hasMore` | – | source list at the end |
4432
+ | NotificationCenter | `loadMore`, `loading`, `hasMore`, `unreadCount` | ✓ | “Load more” |
4433
+ | LogViewer | `loadMore`, `loading`, `hasMore` | ✓ (older lines) | “Load older entries” |
4434
+ | Timeline, ChatMessages | `loadMore`, `loading`, `hasMore` | – | “Load more” or older ones at the top |
4435
+ | Kanban | `loadMore` (per column), `hasMore`/`loading` of the column | – (cards are app state) | “Load more” per column |
4436
+ | Gallery | `loadMore`, `loading`, `hasMore` | – | at the last two images |
4437
+ | Scheduler | `rangeChange`, `loading` | ✓ (`range` of the view) | date range when paging |
4438
+ | Gantt | `loading` | – (tasks are app state) | – |
4439
+ | Pagination, Carousel | `count`, `pageChange` | – | – |
4440
+
4441
+ Older names remain as aliases: `endReached`/`loadingMore` (VirtualList), `scrollEnd` (DataTable) and `search`
4442
+ (CommandPalette) correspond to `loadMore`, `loading` and `filterChange`. In React the events are called `onLoadMore`,
4443
+ `onFilterChange` …
4444
+
4445
+ ### PDF viewer
4446
+
4447
+ `PdfViewer` (`@wirecore/wirelayer-vue/pdf`, `@wirecore/wirelayer-react/pdf`) shows PDFs with [pdf.js](https://mozilla.github.io/pdf.js/):
4448
+ pages with a text layer (selection, search, screen readers), links, the structure of tagged PDFs, toolbar, thumbnails,
4449
+ table of contents, password prompt, printing and download. `pdfjs-dist` is an optional peer dependency
4450
+ (**Apache-2.0** – compatible with MIT projects; keep the license text when shipping pdf.js). The legacy build of pdf.js
4451
+ is used (older Safari and Firefox versions).
4452
+
4453
+ ```sh
4454
+ pnpm add pdfjs-dist
4455
+ ```
4456
+
4457
+ Set up once: the pdf.js stylesheet (`pdfjs-dist/legacy/web/pdf_viewer.css`, text and link layer) and the
4458
+ worker URL (`pdfjs-dist/legacy/build/pdf.worker.min.mjs`). With Vite (Nuxt as well):
4459
+
4460
+ ```ts
4461
+ import 'pdfjs-dist/legacy/web/pdf_viewer.css';
4462
+ import workerSrc from 'pdfjs-dist/legacy/build/pdf.worker.min.mjs?url';
4463
+ ```
4464
+
4465
+ ```vue
4466
+ <PdfViewer src="/contract.pdf" :worker-src="workerSrc" v-model:page="page" height="80vh" />
4467
+ ```
4468
+
4469
+ Next.js (webpack/Turbopack) – in a `'use client'` file:
4470
+
4471
+ ```tsx
4472
+ import 'pdfjs-dist/legacy/web/pdf_viewer.css';
4473
+ import { PdfViewer } from '@wirecore/wirelayer-react/pdf';
4474
+
4475
+ const workerSrc = new URL('pdfjs-dist/legacy/build/pdf.worker.min.mjs', import.meta.url).toString();
4476
+
4477
+ <PdfViewer src="/contract.pdf" workerSrc={workerSrc} page={page} onPageChange={setPage} />;
4478
+ ```
4479
+
4480
+ Alternatively, copy the file to `public/` (`workerSrc="/pdf.worker.min.mjs"`). For fonts that are not embedded in the
4481
+ PDF, copy the folders `pdfjs-dist/standard_fonts/` and `pdfjs-dist/cmaps/` to `public/` and pass them as
4482
+ `standardFontDataUrl="/pdfjs/standard_fonts/"` and `cMapUrl="/pdfjs/cmaps/"` (with a trailing slash).
4483
+
4484
+ pdf.js runs only in the browser: the component loads it after mounting and renders the loading state on the
4485
+ server – it is SSR-safe. If you do not want pdf.js code in the server bundle at all, wrap the viewer in
4486
+ `<ClientOnly>` in Nuxt, and use `dynamic(() => import('./Viewer'), { ssr: false })` in Next.
4487
+
4488
+ ### React Native (Expo)
4489
+
4490
+ `@wirecore/wirelayer-native` brings a subset of the components with the same prop API (events are named as in React
4491
+ Native, e.g. `onPress`). Styling through [Uniwind](https://uniwind.dev) – the same Tailwind v4 classes as on the web.
4492
+
4493
+ ```sh
4494
+ pnpm add @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font
4495
+ ```
4496
+
4497
+ ```css
4498
+ /* global.css */
4499
+ @import 'tailwindcss';
4500
+ @import 'uniwind';
4501
+ @import '@wirecore/wirelayer-native/styles.css';
4502
+ ```
4503
+
4504
+ ```js
4505
+ // metro.config.js – for Uniwind, the color themes are themes of their own
4506
+ const { getDefaultConfig } = require('expo/metro-config');
4507
+ const { withUniwindConfig } = require('uniwind/metro');
4508
+ const { nativeExtraThemes } = require('@wirecore/wirelayer-tokens');
4509
+
4510
+ module.exports = withUniwindConfig(getDefaultConfig(__dirname), {
4511
+ cssEntryFile: './global.css',
4512
+ extraThemes: nativeExtraThemes(),
4513
+ });
4514
+ ```
4515
+
4516
+ ```tsx
4517
+ import { Button, fonts, setAppearance } from '@wirecore/wirelayer-native';
4518
+ import { useFonts } from 'expo-font';
4519
+ import { useEffect } from 'react';
4520
+ import './global.css';
4521
+
4522
+ export function App() {
4523
+ const [loaded] = useFonts(fonts); // the fonts ship with the package, no CDN
4524
+ useEffect(() => setAppearance({ theme: 'ocean', mode: 'system' }), []);
4525
+ if (!loaded) return null;
4526
+ return <Button onPress={start}>Start project</Button>;
4527
+ }
4528
+ ```
4529
+
4530
+ A complete example is the Expo app in `apps/expo` (`docker compose up` → http://localhost:8081).
4531
+
4532
+ Select lists, calendars and times open a sheet from the bottom on phones (Select, MultiSelect, Combobox,
4533
+ DatePicker, DateRangePicker, TimePicker, MonthPicker, PhoneInput, ColorPicker, Menu, Drawer) – with search, groups and
4534
+ loading more at the end of the list as on the web (`dataSource`, `hasMore`/`onLoadMore`). Texts and formats come from
4535
+ `LocaleProvider` as on the web (`locale="de-DE"`); the app sets the writing direction through `I18nManager`.
4536
+
4537
+ Forms with TanStack Form run through `@wirecore/wirelayer-native/form` (optional peer dependency `@tanstack/react-form`) –
4538
+ the same names as on the web, only with the events of React Native:
4539
+
4540
+ ```tsx
4541
+ import { Input, FormErrorSummary } from '@wirecore/wirelayer-native';
4542
+ import { bindInput, FormField, useFormErrors, useValidators } from '@wirecore/wirelayer-native/form';
4543
+
4544
+ <form.Field name="email" validators={{ onDynamic: v.combine(v.isRequired(), v.isEmail()) }}>
4545
+ {(field) => (
4546
+ <FormField id="email" field={field} label="Email" required>
4547
+ <Input {...bindInput(field)} keyboardType="email-address" autoComplete="email" />
4548
+ </FormField>
4549
+ )}
4550
+ </form.Field>;
4551
+ ```
4552
+
4553
+ `bindInput` provides `value`/`onChangeText`/`onBlur`, `bindValue` provides `value`/`onValueChange` (a selection in the
4554
+ sheet marks the field as touched). After submitting, `FormErrorSummary` with `useFormErrors` takes the screen reader
4555
+ focus and leads to the field with a tap (FormField `id`). `FileUpload` picks files through pickers of the app:
4556
+ `documentPicker()` from `@wirecore/wirelayer-native/expo-document-picker`, `imageLibraryPicker()`/`cameraPicker()` from
4557
+ `@wirecore/wirelayer-native/expo-image-picker` (optional peer dependencies) or your own `{ pick }` functions.
4558
+
4559
+ Display, feedback and overlays also have the names of the web. The services need their hosts once at the
4560
+ root of the app:
4561
+
4562
+ ```tsx
4563
+ import { ConfirmDialog, DialogHost, LiveAnnouncer, Toaster, confirm, toast } from '@wirecore/wirelayer-native';
4564
+
4565
+ <LiveAnnouncer>
4566
+ <App />
4567
+ <Toaster placement="top" showProgress />
4568
+ <ConfirmDialog />
4569
+ <DialogHost />
4570
+ </LiveAnnouncer>;
4571
+
4572
+ const ok = await confirm({ title: 'Delete server?', status: 'danger', typeToConfirm: 'web-01' });
4573
+ toast.promise(save(), { loading: 'Saving …', success: 'Saved' });
4574
+ ```
4575
+
4576
+ Menus (with checkbox/radio items and submenus) and ContextMenu (long press) open as a sheet, Drawer comes from any
4577
+ edge, Popover and Toggletip sit at the trigger. BottomNavigation, AppShell and NavigationMenu need no router
4578
+ (`onNavigate`); the app passes the distance to the home indicator through `bottomInset` (e.g. from
4579
+ `react-native-safe-area-context`). The hooks have the same names as on the web (`useDisclosure`, `useDebouncedValue`,
4580
+ `useSelection`, `useReducedMotion`, `useAppState`/`useDocumentVisibility` …), `useClipboard` lives in
4581
+ `@wirecore/wirelayer-native/expo-clipboard` (optional peer dependency `expo-clipboard`).
4582
+
4583
+ Data and complex building blocks (part 3) also have the names of the web: VirtualList, DataView, Tree, TreeSelect,
4584
+ CascadeSelect, OrgChart, OrderList, PickList, Sortable, Kanban, Scheduler (list, day, week, month), Gantt (as a list),
4585
+ ChatMessages/ChatMessage/ChatPrompt, CommandPalette, EmojiPicker, JsonViewer, LogViewer, BarsList, Funnel, BulletChart,
4586
+ RadialBar, Heatmap, Treemap and Sankey. Dragging (Sortable, Kanban, Scheduler) always has an alternative: buttons,
4587
+ action sheets and accessibility actions for VoiceOver and TalkBack. Some parts live in their own subpaths:
4588
+
4589
+ ```tsx
4590
+ import { DataTable } from '@wirecore/wirelayer-native/data-table'; // without TanStack; table or one card per row (layout)
4591
+ import { BarChart, LineChart, PieChart, Sparkline } from '@wirecore/wirelayer-native/chart'; // react-native-svg, no Chart.js
4592
+ import { CodeHighlight } from '@wirecore/wirelayer-native/code'; // peer: shiki (JavaScript RegExp engine, no WebAssembly)
4593
+ import { PdfViewer } from '@wirecore/wirelayer-native/pdf'; // peers: react-native-pdf, react-native-blob-util
4594
+ import { shareFile, shareUri } from '@wirecore/wirelayer-native/expo-sharing'; // peers: expo-sharing, expo-file-system
4595
+
4596
+ <DataTable caption="Servers" columns={columns} data={rows} exportFormats={['csv', 'xlsx']} onExport={shareFile} />;
4597
+ <PdfViewer src="https://…/manual.pdf" onShare={({ uri }) => shareUri(uri)} />;
4598
+ ```
4599
+
4600
+ `PdfViewer` needs a development build (config plugins of `react-native-pdf` and `react-native-blob-util`) – in
4601
+ Expo Go and on the web (react-native-web) there is no native PDF view; there the component shows a notice and a
4602
+ link to the file. `trustAllCerts` is off by default. There is no rich text editor in React Native (Tiptap needs
4603
+ the DOM or a WebView); for formatted input, use `Textarea` with `Markdown` as a preview.
4604
+
4605
+ ### HTML and server templates
4606
+
4607
+ `@wirecore/wirelayer-css` provides all components as `.wc-*` classes – one stylesheet, no build pipeline needed:
4608
+
4609
+ ```html
4610
+ <link rel="stylesheet" href="/assets/wirecore/wirecore.css" />
4611
+ <button type="button" class="wc-button wc-button-danger wc-button-sm">Delete</button>
4612
+ ```
4613
+
4614
+ Class scheme, examples and what works without JavaScript: _HTML / CSS › HTML › Getting started_.
4615
+
4616
+ ### License
4617
+
4618
+ WireLayer is licensed under the MIT license. The fonts shipped with `@wirecore/wirelayer-css` (Schibsted Grotesk,
4619
+ JetBrains Mono) are licensed under the SIL Open Font License 1.1 (`dist/fonts/OFL.txt`). Optional peer dependencies such
4620
+ as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the app itself – with their own licenses.
4621
+
4622
+ ### Custom theme
4623
+
4624
+ A theme overrides any colors per mode. `themeToCss` generates the CSS for it,
4625
+ `checkTheme` checks all contrasts against WCAG 2.2 AA – ideally as a test in your project:
4626
+
4627
+ ```ts
4628
+ import { checkTheme, defineTheme, themeToCss } from '@wirecore/wirelayer-tokens';
4629
+
4630
+ export const brand = defineTheme({
4631
+ name: 'brand',
4632
+ label: 'Brand',
4633
+ colors: {
4634
+ light: { primary: 'oklch(0.5 0.18 30)', 'on-primary': '#FFFFFF' },
4635
+ dark: { primary: 'oklch(0.75 0.14 30)', 'on-primary': '#050505' },
4636
+ },
4637
+ });
4638
+
4639
+ // brand.test.ts
4640
+ expect(checkTheme(brand)).toEqual([]);
4641
+
4642
+ // build script → brand.css, import it after @wirecore/wirelayer-vue/styles.css
4643
+ writeFileSync('brand.css', themeToCss(brand));
4644
+ ```
4645
+
4646
+ All bundled themes pass this check in both modes.