SingleLayout

Shows one mount and ignores the rest.

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

console.log(BUILTIN_LAYOUTS.map((layout) => layout.name));

Props

| Prop | Type | Default | | | — | — | — | — | | surface | SurfaceName | required | | | mounts | Mount[] | required | | | state | SurfaceState | required | |

Plus everything on BoxProps.

A layout is not mounted directly - it is registered, and a surface names it. registerBuiltins registers all seven, and a surface picks one through its layout state.

single shows the active mount and draws nothing for the others. It is the right choice for a surface that holds one thing at a time and does not need a strip of tabs to say so.

See also


Back to top

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