Skip to content

Stack

widgetslayout

Stack: a widget that layers children on top of each other

Installation

$ bunx termuijs add stack

Copies the source into src/components/stack/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Stack } from '@termuijs/widgets'
ts
new Stack(children: Widget[], style?: Partial<Style>, opts?: StackOptions)

API Reference

Stack

PropTypeRequiredDescription
childrenWidget[]required
activeIndexnumberoptionalWhich child is on top (receives key events)
#layout#stack