跳至正文

Progress

Native progress element for determinate or indeterminate work.

浏览器
Chrome 123+Firefox 121+Safari 17.5+
层级
0
压缩后大小
93 B
强制布局预算
0 ms
axe 预算
0
支持 SSR
是
公开契约
测试环境

交互示例

Progress

示例

Indeterminate work

Omit value when the amount of completed work is unknown.

import { Progress } from "@gunkin/uiify";

export default function Example() {
  return (
    <>
      <label htmlFor="file-progress">Preparing files</label>
      <Progress id="file-progress" />
    </>
  );
}

API

Progress

属性类型默认值说明
valuenumber—Current progress value; omit it for indeterminate progress.
maxnumber1Maximum progress value accepted by the native element.
Accessible name*native <label> / aria-label / aria-labelledby—Provide an accessible name with aria-label, aria-labelledby, or a native label.
classNamestring—Class applied to the native progress element.
styleCSSProperties—Native progress element styles.
refRef<HTMLProgressElement>—Ref forwarded to the native progress element.

键盘

按键操作

无障碍

Native progress element. Associate a label or accessible name; omitting value exposes indeterminate progress. Browser rendering varies, and UIify does not simulate updates or announce them.

样式钩子

data-uiify-progress
本页由机器翻译,尚未经人工审核。