Renders aligned key/value metadata as plain terminal text.
This function is framework-independent. Import it from blessed-components/key-value to keep Blessed outside the module graph.
blessed-components/key-value
Entries, alignment, separator, and layout.
Plain text without ANSI sequences or Blessed tags.
RangeError Thrown for empty or multiline keys, non-finite numeric values, an invalid numeric key width, or an invalid gap.
RangeError
import { renderKeyValue } from 'blessed-components/key-value';renderKeyValue({ items: [ { key: 'Status', value: 'Online' }, { key: 'CPU', value: '42%' }, ],});// "Status : Online\nCPU : 42%" Copy
import { renderKeyValue } from 'blessed-components/key-value';renderKeyValue({ items: [ { key: 'Status', value: 'Online' }, { key: 'CPU', value: '42%' }, ],});// "Status : Online\nCPU : 42%"
Renders aligned key/value metadata as plain terminal text.
This function is framework-independent. Import it from
blessed-components/key-valueto keep Blessed outside the module graph.