carbon-components-svelte/docs/src/pages/components/ProgressBar.svx
metonym ade0557448
feat: upgrade carbon-components to v10.56.0 (#1213)
* chore(deps-dev): upgrade carbon-components to v10.56.0

* feat(progress-bar): add kind prop

* Run "yarn build:docs"

* test(progress-bar): assert kind prop
2022-03-27 08:27:23 -07:00

52 lines
No EOL
1.3 KiB
Text

<script>
import { ProgressBar } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
### Default
Without a specified `value` prop, the progress bar is indeterminate.
<ProgressBar helperText="Loading..." />
### Small size
Specify `size="sm"` to use the small variant.
<ProgressBar size="sm" helperText="Loading..." />
### Percentage
Specify a `value` for the progress bar to be determinate.
<ProgressBar value={40} labelText="Upload status" helperText="40 MB of 100 MB" />
### Custom max value
The default `max` value is `100`.
<ProgressBar value={40} max={200} labelText="Upload status" helperText="40 MB of 200 MB" />
### Hidden label
It's recommended that you provide a `labelText` for accessibility.
Use `hideLabel` to visually hide the label text.
<ProgressBar hideLabel value={40} labelText="Upload status" helperText="40 MB of 100 MB" />
### Inline variant
The inline variant visually hides the `helperText`.
<ProgressBar kind="inline" value={40} labelText="Upload status" helperText="40 MB of 100 MB" />
### Indented variant
<ProgressBar kind="indented" value={40} labelText="Upload status" helperText="40 MB of 100 MB" />
### UX example
This example shows how to animate the progress bar from 0 to 100% with start and end states.
<FileSource src="/framed/ProgressBar/ProgressBarUx" />