Properties
multi: PropTypes.bool,
bar: PropTypes.bool, // used in combination with multi
tag: PropTypes.string,
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
max: PropTypes.oneOf([
PropTypes.string,
PropTypes.number,
]),
animated: PropTypes.bool,
striped: PropTypes.bool,
color: PropTypes.string,
className: PropTypes.string,
barClassName: PropTypes.string // used to add class to the inner progress-bar element
};
Progress.defaultProps = {
tag: 'progress',
value: 0,
max: 100,
};
Labels
import React from 'react';
import { Progress } from 'reactstrap';
const Example = (props) => {
return (
<div>
<Progress value="25">25%</Progress>
<Progress value={50}>1/2</Progress>
<Progress color="success" value="100">You did it!</Progress>
<Progress multi>
<Progress bar value="15">Meh</Progress>
<Progress bar color="success" value="30">Wow!</Progress>
<Progress bar color="info" value="25">Cool</Progress>
<Progress bar color="warning" value="20">20%</Progress>
<Progress bar color="danger" value="5">!!</Progress>
</Progress>
</div>
);
};
export default Example;
Animated
import React from 'react';
import { Progress } from 'reactstrap';
const Example = (props) => {
return (
<div>
<Progress animated value={2 * 5} />
<Progress animated color="success" value="25" />
<Progress animated color="info" value={50} />
<Progress animated color="warning" value={75} />
<Progress animated color="danger" value="100" />
<Progress multi>
<Progress animated bar value="10" />
<Progress animated bar color="success" value="30" />
<Progress animated bar color="danger" value="20" />
</div>
);
};
export default Example;
Max value
import React from 'react';
import { Progress } from 'reactstrap';
const Example = (props) => {
return (
<div>
<div className="text-center">1 of 5</div>
<Progress value="1" max="5" />
<div className="text-center">50 of 135</div>
<Progress value={50} max="135" />
<div className="text-center">75 of 111</div>
<Progress value={75} max={111} />
<div className="text-center">463 of 500</div>
<Progress value="463" max={500} />
<div className="text-center">Various (40) of 55</div>
<Progress multi>
<Progress bar value="5" max={55}>5</Progress>
<Progress bar color="success" value="15" max={55}>15</Progress>
<Progress bar color="warning" value="10" max={55}>10</Progress>
<Progress bar color="danger" value="10" max={55}>10</Progress>
</Progress>
</div>
);
};