<ProgressBar />

実例

Progress

There are two components for indicating progress: ProgressBar and ProgressCircular. As the names imply, the ProgressBar displays a linear progress bar while the ProgressCircular displays a circular progress indicator.

They have the ability to show the current progress or a looping animation in cases where the current progress is not known.

Both components implement the same props.

To change the progress the value property is used. It should be a value between 0 and 100.

<ProgressBar value={this.state.currentProgress} />
<ProgressCircular value={this.state.currentProgress} />

Secondary value

It is sometimes necessary to display two different values in the same progress indicator. An example could be an app that streams a video. The progress bar could show both how much of the video has elapsed in addition to how much of the video that has been buffered.

To do this the secondaryValue property can be used.

<ProgressBar
  value={this.state.elapsed}
  secondaryValue={this.state.buffered}
/>

Indeterminate mode

There is also an indeterminate property which makes the component ignore both the value and secondaryValue properties. Instead, it show a looping animation. This can be useful for cases where the total progress is unknown, e.g. when waiting for some data to arrive.

<ProgressBar indeterminate />

Prop一覧

名前 型 / デフォルト値 概要
modifier string The appearance of the progress indicator. (翻訳中) Optional.
value number Current progress. Should be a value between 0 and 100. (翻訳中) Optional.
secondaryValue bool Current secondary progress. Should be a value between 0 and 100. (翻訳中) Optional.
indeterminate bool If this property is set, an infinite looping animation will be shown. (翻訳中) Optional.

プリセットのmodifier

Name 概要
material マテリアルデザインのスタイルでプログレスバーを表示します。

議論

お困りですか?

Onsen UIに関する質問は、Stack Overflowにてonsen-uiタグを付与してください。Onsen UIチームはあなたの問題解決をお手伝いします。

バグ報告や機能要望については、GitHub Issuesに記載をお願いいたします。

あわせて、下記の情報も参考にしてください。