Center
layout
Center: centers a single child widget horizontally and/or vertically
Terminal
$termuijs render center
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
| Prop | Type | Required | Description |
|---|---|---|---|
horizontal | boolean | optional | Center horizontally (default: true) |
vertical | boolean | optional | Center vertically (default: true) |