KeyValue
data
KeyValue: aligned key: value pairs
Terminal
$termuijs render key-value
Installation
$ bunx termuijs add key-value
Copies the source into src/components/key-value/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { KeyValue } from '@termuijs/widgets'ts
new KeyValue(pairs: Array<KeyValuePair> | Record<string, any>, style: Partial<Style> = {}, opts: KeyValueOptions = {},)API Reference
KeyValue
| Prop | Type | Required | Description |
|---|---|---|---|
pairs | Array<KeyValuePair> | Record<string | required | — |
separator | string | optional | Separator between key and value (default: ': ') |
keyColor | import('@termuijs/core').Color | optional | Color for keys |
valueColor | import('@termuijs/core').Color | optional | Color for values |