Skip to content

Center

widgetslayout

Center: centers a single child widget horizontally and/or vertically

Installation

$ bunx termuijs add center

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

Usage

ts
import { Center } from '@termuijs/widgets'
ts
new Center(style: Partial<Style> = {}, opts: CenterOptions = {})

API Reference

Center

PropTypeRequiredDescription
horizontalbooleanoptionalCenter horizontally (default: true)
verticalbooleanoptionalCenter vertically (default: true)
#layout#center