TabsLayout

Arranges a surface’s mounts as tabs.

import { BUILTIN_LAYOUTS } from '@textui/core';

const tabs = BUILTIN_LAYOUTS.find((layout) => layout.name === 'tabs');

Props

| 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.

See also


Back to top

MIT licensed. Pre-1.0 - the surface is still moving.