| title | TabsLayout |
|---|---|
| parent | Surfaces, shells and resources |
| grand_parent | Components |
{: .no_toc }
Arranges a surface's mounts as tabs.
import { BUILTIN_LAYOUTS } from '@textui/widgets';
const tabs = BUILTIN_LAYOUTS.find((layout) => layout.name === 'tabs');| Prop | Type | Default | |
|---|---|---|---|
surface |
SurfaceName |
required | |
mounts |
Mount[] |
required | |
state |
SurfaceState |
required |
Plus everything on BoxProps.
One mount visible, a strip naming the others. Each tab's label comes from the mount's display metadata, so opening a mount is all it takes to add a tab.
This is the surface-level counterpart to Tabs. Use that one for panels you are laying out yourself; use this when the panels are mounts and their set changes at runtime.
- Tabs - the plain control
- StackLayout - all of them at once