- Implementation
- TabbedLayout Props
- TabbedLayoutTab
Common Examples
To use theTabbedLayout, pass one or more tabs with a unique key, a localized label, and content. The kit forbids children.AppShell or Window. When the artifact is a drawer, the layout surfaces a close button wired through useAppSurface.Display modes
stacked shows one panel at a time. vertical-split and horizontal-split show both panels. Splits are offered only with exactly two tabs and a component width of at least 720px. Below that, the layout forces stacked and hides the mode picker. The last chosen mode is restored when the layout grows past the threshold.Seed the starting mode with defaultMode. The layout coerces to stacked when a split is unavailable.Single tab
A single tab shows neither a tab strip nor the mode menu — only its content. The drawer close button still appears when applicable.Selection
PassdefaultSelectedKey for uncontrolled selection, or selectedKey with onSelectionChange to own it. Selection changes the visible panel only in stacked mode. Split modes show both panels.Overflow and narrow widths
Extra tabs overflow the strip. Below 720px the layout stays stacked.Split resize
Split modes include a drag handle between panes.Internationalization
TabbedLayout owns these localized strings:ai-kit.tabbedLayout.layoutOptionsai-kit.tabbedLayout.layoutMenuai-kit.tabbedLayout.modeStackedai-kit.tabbedLayout.modeVerticalSplitai-kit.tabbedLayout.modeHorizontalSplitai-kit.tabbedLayout.closeai-kit.tabbedLayout.resizePanesai-kit.tabbedLayout.tabs
label values before passing them. Mount AiKitIntlProvider inside CartoTheme to switch the chrome strings.React Accessibility
- The tab strip is a labeled tablist. Split pane resize exposes a localized name.
- Close appears only when the artifact is a drawer, and uses the localized close label.