Skip to main content

Progress

Library
UDS Base
Repository
github.com/telus/universal-design-system
Package
npmjs.com/package/@telus-uds/components-base
Package version
1.6.1
Loading...

Introduction

import { Progress } from '@telus-uds/components-base'

Progress component is a container for displaying one or several Progress.Bars.

Accessibility

Both Progress and its child Progress.Bar components accept the standard React Native accessibility props, but these usually don't need to be provided.

The crucial accessibility props are set within Progress.Bar, and defaults are automatically provided as follows:

  • accessibilityRole (role): progressbar,
  • accessibilityValue.min (aria-valuemin): 0,
  • accessibilityValue.max (aria-valuemax): 100,
  • accessibilityValue.now (aria-valuenow): percentage,
  • accessibilityValue.text (aria-valuetext): %{percentage}%

If necessary, these may be overridden by passing these props to Progress.Bar, but for the majority of cases, it automatically generates the expected values for assistive technology to correctly describe the progress bar's current state.

Props

Progress

NameTypeDefaultDescription
children*nodeUse the `children` prop to supply one or several `ProgressBar`s.
tokenscustomSystem tokens prop, see tokens for more details
variantobjectOfSystem variant prop, see variants for more details

Progress.Bar

NameTypeDefaultDescription
childrennodenullOptional children that can be used to customize the progress bar filling.
percentagenumber0Percentage of completion.
accessibilityLabel*stringAccessibility label for the progress bar.
tokenscustomSystem tokens prop, see tokens for more details
variantobjectOfSystem variant prop, see variants for more details