Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Gauge

Shows one reading on a 270- or 180-degree arc, colored by the same thresholds as Meter.

ComponentsGauge
datastatic
<arc-gauge>

Overview

Gauge is the radial version of Meter: the same value, range and thresholds, drawn as an arc instead of a bar. A neutral track carries a value arc in the zone color with a matching glow, and the reading is in the middle in mono type, with an optional `unit` and a `label` under it. `variant="full"`, the default, is a 270-degree horseshoe with the reading inside. `variant="half"` is a 180-degree semicircle with the reading on the baseline. The colors follow the HTML `<meter>` rules, with Meter's `low`, `high` and `optimum`. When the optimum is in the high segment, as for battery level, values above `high` are green (success), values between `low` and `high` yellow (warning), and values below `low` red (error). When the optimum is in the low segment, as for an error rate, it's the other way round. With no thresholds, the range splits into thirds. `mode` changes the coloring. `zones` is the default described above. `plain` draws one color, `--gauge-fill` (the accent by default), for a quantity that's neither good nor bad. `diverging` draws from `center` toward the value, in `--gauge-below` on one side and `--gauge-above` on the other, for a lean either way, such as -1 to +1. `center` defaults to halfway between `min` and `max`. The arc sweeps in on first paint and again on every change. It uses `role="meter"` with `aria-valuenow`, `aria-valuemin` and `aria-valuemax`, and with a `unit` set, `aria-valuetext` gives the reading with its unit, so screen readers say "72%" and not a bare number.

Guidelines

Do

  • Use it for a single reading that should stand out on a dashboard, such as CPU load, battery or a health score
  • Set `low`, `high` and `optimum` to match what your numbers mean, as you would on Meter
  • Set a `label`. It's shown under the reading and is the accessible name
  • Set `unit` when the number alone is ambiguous: "72" means different things as %, ms or GB
  • Use the `half` variant when vertical space is tight, as in a stat row or a card header

Don't

  • Don't use it in dense layouts or lists of readings. Meter shows the same data in a fraction of the height
  • Don't use it for a number with no meaningful range. Use Stat
  • Don't use it for task progress. Use Progress
  • Don't set `min` equal to or greater than `max`. The arc renders empty
  • Don't rely on color alone for the zone. Keep the value and label visible, or add text beside it

Features

  • `value` is clamped between `min` and `max`
  • `no-value` hides the reading in the middle
  • A custom color's glow reads the matching `-rgb` property, such as `--gauge-fill-rgb`

Preview

Usage

<arc-gauge
  label="CPU Load"
  value="72"
  unit="%"
  min="0"
  max="100"
  low="50"
  high="80"
  optimum="0"
></arc-gauge>

API

labelstring''
Label text displayed beneath the value and used as the accessible name.
unitstring''
Unit suffix rendered after the value (e.g. "%", "ms", "GB").
valuenumber0
Current gauge value. Clamped between min and max. Reflected as an attribute.
minnumber0
Minimum value representing the empty end of the arc.
maxnumber100
Maximum value representing the full end of the arc.
lownumber0
Threshold below which the value is considered low. Used for color zone calculation.
highnumber0
Threshold above which the value is considered high. Used for color zone calculation.
optimumnumber0
The optimal value. Determines which end of the range is "good" for color zone logic.
variant'full' | 'half''full'
Arc shape: full is a 270-degree horseshoe, half a 180-degree semicircle.
mode'zones' | 'plain' | 'diverging''zones'
How the arc is coloured. zones (the default) colours by the low/high/optimum thresholds in status colours. plain is one colour, --gauge-fill (default the accent), for a quantity that is not good or bad. diverging draws from center toward the value, --gauge-below on one side and --gauge-above on the other (default chart series 1 and 2), for a lean either way, such as −1 to +1. A custom colour's glow reads the matching -rgb property (--gauge-fill-rgb and so on).
centernumber0
The midpoint of a diverging gauge. Defaults to halfway between min and max. Ignored by the other modes.
showValuebooleantrue
Whether to render the numeric value in the center of the arc. Defaults to true; disable via the showValue property.

See also