Search code examples
fluentui-react

How to use styles in ProgressIndicator from fluentui-react


There is a property 'styles' that takes a

"IStyleFunctionOrObject<IProgressIndicatorStyleProps, IProgressIndicatorStyles>"

but I have no idea how to set it. Anyone?


Solution

  • styles prop can be a function or object

    What you can customize:

    root: IStyle;
    itemName: IStyle;
    itemDescription: IStyle;
    itemProgress: IStyle;
    progressTrack: IStyle;
    progressBar: IStyle;
    

    Modify background-color of progress bar:

    <ProgressIndicator
      ...
      styles={{
        progressBar: {
          backgroundColor: '#f00',
        }
      }}
    /> 
    

    Codepen example.