For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/skeleton.md.
v0.0.57
  • 简体中文
  • Skeleton

    反馈@rockshin/tao-ui

    在数据加载时保留内容结构。

    何时使用

    适合已知结构内容的首次加载。占位应接近最终布局,数据就绪后替换为真实内容。

    示例

    加载与内容切换

    loading 为 false 时显示 children。

    390 × 640
    TSX

    匹配内容布局

    分别设置头像形状、标题宽度和每行正文宽度。

    TSX

    表单与按钮占位

    子组件可独立组合,无需使用完整文章占位结构。

    TSX

    图片与自定义节点

    Skeleton.Image 提供图片占位;Skeleton.Node 可放置自定义轮廓。

    TSX

    圆角与全局尺寸

    子组件继承 TaoProvider 尺寸;语义样式可调整间距而无需改变占位结构。

    TSX

    API

    Skeleton

    属性说明类型默认值
    className节点类名string | undefined-
    style节点样式CSSProperties | undefined-