SwiftUI.js
Components

Gauge

Gauge shows a current value within a bounded range, matching SwiftUI's summary-style meter while keeping standard `progressbar` semantics.

Gauge shows a current value within a bounded range, matching SwiftUI's summary-style meter while keeping standard `progressbar` semantics.

Examples

Default

Preview unavailable for this example in the static docs build.

Show code
<Gauge label="Storage" value={64} min={0} max={128} currentValueLabel="64 GB" minimumValueLabel="0 GB" maximumValueLabel="128 GB"></Gauge>

API

PropTypeRequiredDescription
labelReactNodeNoThe primary label for the gauge.
valuenumberYesThe current gauge value.
minnumberNoThe lower bound of the gauge range. Default: 0
maxnumberNoThe upper bound of the gauge range. Default: 1
currentValueLabelReactNodeNoOptional label describing the current value.
minimumValueLabelReactNodeNoOptional label for the minimum edge of the range.
maximumValueLabelReactNodeNoOptional label for the maximum edge of the range.

Inherits additional props from Omit<IBaseElementComponent<'div'>, 'children'>.

Overview

Gauge shows a current value within a bounded range, matching SwiftUI's summary-style meter while keeping standard progressbar semantics.

Notes

  • Use label to name the gauge for both UI and accessibility.
  • minimumValueLabel and maximumValueLabel help explain the range.

On this page