mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-18 15:55:06 +00:00
Add props to README, fixes #4
This commit is contained in:
parent
d55abad2fa
commit
824cf496a5
12
README.md
12
README.md
@ -31,7 +31,17 @@ import CircularProgressbar from 'react-circular-progressbar';
|
||||
<CircularProgressbar percentage={60} />
|
||||
```
|
||||
|
||||
See the [live demo page](http://www.kevinqi.com/react-circular-progressbar/) for examples and configuration options.
|
||||
## Props
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| `percentage` | Numeric percentage to display, from 0-100. Required. |
|
||||
| `strokeWidth` | Width of circlar line. Default: `false`. |
|
||||
| `initialAnimation` | Toggle whether to animate progress starting from 0% on initial mount. Default: `false`. |
|
||||
| `classForPercentage` | Function which returns an additional class to apply to top-level svg element, which can be used for coloring/styling percentage ranges differently. Example: `(percent) => percent < 100 ? 'incomplete' : 'complete'`. |
|
||||
| textForPercentage | Function which returns text to display, can be configured based on percentage. Example: ``(pct) => `${pct}%` ``. |
|
||||
|
||||
See the [demo page JSX](docs/demo.jsx) to see code used on the live demo page.
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user