← 全部 UI 规范

组件契约

loader

由 chiralkit 标志的 path 构成的不确定加载指示器——两个镜像对称的半边围绕圆环中心摆动。

版本
v1.0.0

Props

名称类型取值默认值
sizeenumsm, md, lgmd
labelstring—Loading
speedenumslow, normal, fastnormal

无障碍

category
static-display
native_element
span (custom element host)
role
status
labeling
aria-label (from `label` prop, default 'Loading')
reduced_motion
collapses swing rotation to a static opacity pulse (2s ease-in-out); no rotation, no translation
notes
Indeterminate progress indicator — no APG pattern applies (not a `progressbar`). Inner SVG is aria-hidden; host is the accessibility surface. Stroke inherits `currentColor`; consumers verify ≥ 3:1 non-text contrast (WCAG 1.4.11) against the surface.
经过校验的原始 JSON
{
  "name": "loader",
  "version": "1.0.0",
  "props": {
    "size": {
      "type": "enum",
      "values": [
        "sm",
        "md",
        "lg"
      ],
      "default": "md"
    },
    "label": {
      "type": "string",
      "default": "Loading"
    },
    "speed": {
      "type": "enum",
      "values": [
        "slow",
        "normal",
        "fast"
      ],
      "default": "normal"
    }
  },
  "a11y": {
    "category": "static-display",
    "native_element": "span (custom element host)",
    "role": "status",
    "labeling": "aria-label (from `label` prop, default 'Loading')",
    "reduced_motion": "collapses swing rotation to a static opacity pulse (2s ease-in-out); no rotation, no translation",
    "notes": "Indeterminate progress indicator — no APG pattern applies (not a `progressbar`). Inner SVG is aria-hidden; host is the accessibility surface. Stroke inherits `currentColor`; consumers verify ≥ 3:1 non-text contrast (WCAG 1.4.11) against the surface."
  }
}
ChiralFM