圆形进度指示器
CircularProgressIndicator 沿圆形轨道显示确定或不确定进度。
示例
默认
数值动画
不确定进度
参考
结构
| 元素 | 部件 | 选择器 |
|---|---|---|
<div> | root | [data-scope="circular-progress-indicator"][data-part="root"]鼠标左键单击复制 |
<svg> | svg | [data-scope="circular-progress-indicator"][data-part="svg"]鼠标左键单击复制 |
<path> | track条件显示 | [data-scope="circular-progress-indicator"][data-part="track"]鼠标左键单击复制 |
<path> | active-indicator条件显示 | [data-scope="circular-progress-indicator"][data-part="active-indicator"]鼠标左键单击复制 |
属性
| 名称 | 说明 | 默认值 | 控件 |
|---|---|---|---|
indeterminate可选 | Whether the progress value is unknown. boolean | undefined | false | |
value可选 | Current progress value. number | undefined | 0 | |
min可选 | Minimum progress value. number | undefined | 0 | |
max可选 | Maximum progress value. number | undefined | 1 | |
direction可选 | Direction used to draw the active indicator. clockwisecounterclockwise | "clockwise" | |
shape可选 | Visual shape of the active indicator. flatwavy | "flat" | |
size可选 | CSS length used for the component size. string | undefined | - | |
thickness可选 | CSS length used for the track and active indicator thickness. string | undefined | - | |
trackGap可选 | CSS length used for the gap between active indicator and track. string | undefined | - | |
waveAmplitude可选 | CSS length used for the wavy active indicator amplitude. string | undefined | - | |
wavelength可选 | CSS length used for the wavy active indicator wavelength. string | undefined | - | |
ariaLabel可选 | Accessible label. string | undefined | - | - |
ariaValueText可选 | Accessible value text. Defaults to a percentage for determinate progress. string | undefined | - | - |
样式10
| Token | 说明 |
|---|---|
--md-progress-indicator-colorColor回退值 var(--md-color-on-container, var(--md-sys-color-primary)) | Shared active indicator color for progress indicators. |
--md-progress-indicator-track-colorColor回退值 var(--md-color-container, var(--md-sys-color-secondary-container)) | Shared track color for progress indicators. |
--md-circular-progress-indicator-active-indicator-colorColor回退值 var(--md-progress-indicator-color) | Active arc color for the circular indicator. |
--md-circular-progress-indicator-track-colorColor回退值 var(--md-progress-indicator-track-color) | Track arc color for the circular indicator. |
--md-circular-progress-indicator-sizeLayout回退值 40dp × typography/density scale | Default size for the circular indicator. |
--md-circular-progress-indicator-with-wave-sizeLayout回退值 48dp × typography/density scale | Default size when using the wavy shape. |
--md-circular-progress-indicator-track-thicknessLayout回退值 4dp × typography/density scale | Stroke thickness for track and active arcs. |
--md-circular-progress-indicator-track-active-indicator-gapLayout回退值 4dp × typography/density scale | Gap between active arc and track arc. |
--md-circular-progress-indicator-wave-amplitudeWave回退值 1.6dp × typography/density scale | Amplitude for the wavy active arc. |
--md-circular-progress-indicator-wave-wavelengthWave回退值 15dp × typography/density scale | Wavelength for the wavy active arc. |