Progress rings are used to show the progress of a determinate operation in a circular fashion.
<ods-progress-ring value = "25" ></ods-progress-ring>
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
< OdsProgressRing value = { 25 } />
Use the —size custom property to set the diameter of the progress ring.
<ods-progress-ring value = "25" class = "sense-progress-ring-size-demo" ></ods-progress-ring>
.sense-progress-ring-size-demo {
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
/* Only used for documentation */
.sense-progress-ring-size-demo {
< OdsProgressRing value = { 25 } className = "sense-progress-ring-size-demo" ></ OdsProgressRing >
Use the label attribute to label the progress bar and tell assistive devices how to announce it.
<ods-progress-ring value = "50" label = "Upload progress" ></ods-progress-ring>
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
< OdsProgressRing value = { 50 } label = "Upload progress" ></ OdsProgressRing >
Use the default slot to show a value.
<ods-progress-ring class = "progress-ring-values" value = "50" > 50% </ods-progress-ring>
<ods-icon-button name = "minus" label = "Decrease" class = "sense-progress-button-one" ></ods-icon-button>
<ods-icon-button name = "plus" label = "Increase" class = "sense-progress-button-one" ></ods-icon-button>
const progressRingTwo = document . querySelector ( '.progress-ring-values' );
const subtractButtonTwo = progressRingTwo . nextElementSibling . nextElementSibling ;
const addButtonTwo = subtractButtonTwo . nextElementSibling ;
addButtonTwo . addEventListener ( 'click' , () => {
const value = Math . min ( 100 , progressRingTwo . value + 10 );
progressRingTwo . value = value ;
progressRingTwo . textContent = ` ${ value } %` ;
subtractButtonTwo . addEventListener ( 'click' , () => {
const value = Math . max ( 0 , progressRingTwo . value - 10 );
progressRingTwo . value = value ;
progressRingTwo . textContent = ` ${ value } %` ;
.sense-progress-button-one {
import { useState } from 'react' ;
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
import { OdsIconButton } from '@ods/components/react.icon-button' ;
/* Only used for documentation */
const [ value , setValue ] = useState ( 50 );
function adjustValue ( amount : any ) {
let newValue = value + amount ;
if ( newValue < 0 ) newValue = 0 ;
if ( newValue > 100 ) newValue = 100 ;
< OdsProgressRing value = { value } > { value } % </ OdsProgressRing >
< OdsIconButton className = 'ods-progress-button' name = 'minus' variant = 'secondary' label = 'Decrease' onClick = { () => adjustValue (- 10 ) } > Secondary </ OdsIconButton >
< OdsIconButton className = 'ods-progress-button' name = 'plus' variant = 'secondary' label = 'Increase' onClick = { () => adjustValue ( 10 ) } > Secondary </ OdsIconButton >
import '@ods/components/web.progress-ring' ;
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
Note: You only need to import a web component once in your code , as it registers itself globally when defined, allowing you to use it anywhere within your application without needing to re-import it each time you want to use the component.
import { OdsProgressRing } from '@ods/components/react.progress-ring' ;
This component is still in development and cannot be imported at this time.
Slots Name Description (default) A label to show inside the ring.
Properties Please note, both and are shown in the table below. Unless otherwise specified, the property and attribute names are identical.
Property/Attribute Reflects Type Default value
number 0 label
string ''
Parts Name Description base The component's base wrapper. label The progress ring label.