react-toolbox/components/progress_bar/readme.md

44 lines
2.1 KiB
Markdown
Raw Normal View History

2015-07-04 21:28:51 +03:00
# Progress Bar
2015-11-01 14:53:23 +03:00
Minimize visual changes that occur while your app loads content by representing each operation with a single [activity indicator](https://www.google.com/design/spec/components/progress-activity.html). For example, a refresh operation should display either a refresh bar or an activity circle, but not both.
2015-07-04 21:28:51 +03:00
2015-11-01 14:53:23 +03:00
<!-- example -->
```jsx
import ProgressBar from 'react-toolbox/lib/progress_bar';
2015-07-04 21:28:51 +03:00
2015-11-01 14:53:23 +03:00
const ProgressTest = () => (
<div>
2016-05-28 20:37:46 +03:00
<ProgressBar type="circular" mode="indeterminate" />
<ProgressBar type="linear" mode="determinate" value={83} buffer={90} />
2015-11-01 14:53:23 +03:00
</div>
);
2015-07-04 21:28:51 +03:00
```
2016-05-28 20:37:46 +03:00
If you want to provide a theme via context, the component key is `RTProgressBar`.
2015-07-04 21:28:51 +03:00
## Properties
| Name | Type | Default | Description|
2015-11-01 14:53:23 +03:00
|:-----|:-----|:-----|:-----|
| `buffer` | `Number` | `0` | Value of a secondary progress bar useful for buffering.|
| `className` | `String` | `''` | Additional class name to provide custom styling.|
| `max` | `Number` | `100` | Maximum value permitted.|
| `min` | `Number` | `0` | Minimum value permitted.|
| `mode` | `String` | `indeterminate` | Mode of the progress bar, it can be `determinate` or `indeterminate`.|
| `multicolor` | `Boolean` | `false` | If true, the circular progress bar will be changing its color.|
| `type` | `String` | `linear` | Type of the progress bar, it can be `circular` or `linear`.|
| `value` | `Number` | `0` | Value of the current progress.|
2015-07-04 21:28:51 +03:00
2016-05-28 20:37:46 +03:00
## Theme
2016-05-22 22:50:22 +03:00
| Name | Description|
|:---------|:-----------|
| `buffer` | Used to style the buffer element in the linear progress.|
| `circle` | Used for the circle element in the circular progress.|
| `circular` | Used for the root element when the type is circular.|
| `indeterminate` | Added to the root element if mode is indeterminate.|
| `linear` | Used for the root element when the type is linear.|
| `multicolor` | Added to the root if the component is multicolor (circular).|
| `path` | Used for the inner path in the circular progress.|
| `value` | Used to style the value element in the linear progress.|