Metric shape, including optional application metadata.
Parent node, renderer data, and optional box settings.
Handle for the created box, updates, and cleanup.
RangeError
Propagates validation errors from renderMetricBars.
import blessed from 'blessed';
import { metricBars } from 'blessed-components/metric-bars/blessed';
const screen = blessed.screen({ smartCSR: true });
const score = metricBars({
parent: screen,
box: { top: 0, left: 0, width: 60, height: 5 },
data: {
barWidth: 16,
label: 'Overall',
value: '85%',
metrics: [
{ label: 'Quality', value: 78 },
{ label: 'Popularity', value: 99 },
],
},
});
screen.render();
score.destroy();
screen.destroy();
Creates display-only MetricBars backed by a Blessed
BoxElement.Import from
blessed-components/metric-bars/blessed. The adapter disables Blessed tags, updates content through renderMetricBars, and leaves terminal rendering under caller control.