Shards React
Shards React

Shards React

Documentation

Progress

You can use the Progress component to display simple or complex progress bars.

Basic Example

You can change the bar's color using the theme prop. The default value is primary.

import React from "react";
import { Progress } from "shards-react";

export default function BasicProgress() {
  return <Progress theme="primary" value={50} />;
}

Labels

You can add labels to your progress bars by providing the value inside of them.

20
import React from "react";
import { Progress } from "shards-react";

export default function BasicProgress() {
  return <Progress value="20">20</Progress>;
}

Multiple

Inside the Progress component you can also nest multiple sub-components.

import React from "react";
import { Progress } from "shards-react";

export default function BasicProgress() {
  return (
    <Progress multi>
      <Progress bar value="50" />
      <Progress bar theme="success" value="20" />
    </Progress>
  );
}

Props

The following props are available for the Progress component.

PropDescriptionTypeDefaultRequired
childrenThe children nodes.Node-No
barWhether it is a bar, or not.Bool-No
multiWhether there are multiple progress bars nested, or not.Bool-No
tagThe component's tag type.String"div"No
animatedWhether it is animated, or not.Bool-No
stripedWhether it is striped, or not.Bool-No
themeThe theme color.String"primary"No
classNameThe class name.String-No
barClassNameThe class name for the bar element.String-No
valueThe value.StringNumber0No
maxThe max value.StringNumber100No