You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/api/components/keyboard-toolbar/index.mdx
+20-22Lines changed: 20 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,6 +332,26 @@ The property that allows to specify custom text for `Done` button.
332
332
</KeyboardToolbar>
333
333
```
334
334
335
+
### `KeyboardToolbar.Group`
336
+
337
+
This component defines a group of inputs that form an isolated navigation region. When the user presses the prev/next arrows on `KeyboardToolbar`, the focus will only cycle through inputs **within the same group**. Inputs outside the group are not reachable from within, and inputs inside the group are not reachable from outside.
338
+
339
+
This is useful for scenarios like bottom sheets, tab views, or any UI where a subset of inputs should have independent navigation.
340
+
341
+
```tsx
342
+
<BottomSheet>
343
+
<KeyboardToolbar.Group>
344
+
<TextInputplaceholder="First name" />
345
+
<TextInputplaceholder="Last name" />
346
+
<TextInputplaceholder="Email" />
347
+
</KeyboardToolbar.Group>
348
+
</BottomSheet>
349
+
```
350
+
351
+
:::info Toolbar button state
352
+
When a grouped input is focused, the toolbar's prev/next buttons reflect the position within that group (not the global list of inputs). For example, the "prev" button will be disabled when focused on the first input of a group.
Don't forget that you need to specify colors for **both**`dark` and `light` theme. The theme will be selected automatically based on the device preferences.
388
408
:::
389
409
390
-
## Components
391
-
392
-
### `KeyboardToolbar.Group`
393
-
394
-
This component defines a group of inputs that form an isolated navigation region. When the user presses the prev/next arrows on `KeyboardToolbar`, the focus will only cycle through inputs **within the same group**. Inputs outside the group are not reachable from within, and inputs inside the group are not reachable from outside.
395
-
396
-
This is useful for scenarios like bottom sheets, tab views, or any UI where a subset of inputs should have independent navigation.
397
-
398
-
```tsx
399
-
<BottomSheet>
400
-
<KeyboardToolbar.Group>
401
-
<TextInputplaceholder="First name" />
402
-
<TextInputplaceholder="Last name" />
403
-
<TextInputplaceholder="Email" />
404
-
</KeyboardToolbar.Group>
405
-
</BottomSheet>
406
-
```
407
-
408
-
:::info Toolbar button state
409
-
When a grouped input is focused, the toolbar's prev/next buttons reflect the position within that group (not the global list of inputs). For example, the "prev" button will be disabled when focused on the first input of a group.
0 commit comments