Skip to content

Gauge

widgetsdata

Gauge: a self-contained metric display with label, bar, and value

Installation

$ bunx termuijs add gauge

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

Usage

ts
import { Gauge } from '@termuijs/widgets'
ts
new Gauge(label: string, style: Partial<Style> = {}, opts: GaugeOptions = {})

API Reference

Gauge

PropTypeRequiredDescription
labelstringrequired
colorColoroptionalColor of the filled portion
showLabelbooleanoptionalShow percentage label
#data#gauge