Components

HorizontalBar

Horizontal progress bar for displaying progress

Overview

HorizontalBar is a horizontal progress bar. role="progressbar" and ARIA attributes are applied by default.

  • Animated — Fill width transitions with CSS animation
  • Accessiblearia-valuenow, aria-valuemin, aria-valuemax applied
  • Customizable — Height, color, and border radius are adjustable

Basic Usage

Customization

Props

PropTypeDefaultDescription
valuenumberrequiredCurrent value (clamped to min/max range)
minnumber0Minimum value
maxnumber100Maximum value
heightnumber8Bar height (px)
radiusnumber999border-radius (px)
fillColorstringvar(--background-brand-default)Fill color
trackColorstringvar(--background-default-tertiary)Track background color
isAnimatedbooleantrueCSS transition animation
trackStyleCSSPropertiesAdditional track styles
fillStyleCSSPropertiesAdditional fill styles
ariaLabelstring'Progress'Accessibility label

Guidelines

  • value is automatically clamped to the min/max range
  • Use DonutChart for comparing ratios of multiple items; use HorizontalBar for single progress indicators