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/masonry.md.
v0.0.57
  • 简体中文
  • Masonry

    数据展示@rockshin/tao-ui

    将不同高度的卡片放入均衡的列中。

    组件采用 tao-ui 原生实现,公共 API 对齐 Ant Design 6.7.0。外观、主题 token 与 Semantic DOM 定制遵循 tao-ui,主题通过 TaoProvider 配置。

    6.7.0 items/itemRender 契约支持响应式列数与 fresh 尺寸监听;布局使用原生定位,DOM 顺序保持输入顺序。

    何时使用

    适合图片墙或高度不同的内容卡片,不要求逐行对齐。

    代码演示

    均衡列布局

    Tile 1
    Tile 2
    Tile 3
    Tile 4
    Tile 5
    Tile 6
    TSX

    响应式列数与间距

    390 × 640
    TSX

    指定列

    Tile 1
    Tile 2
    Tile 3
    Tile 4
    Tile 5
    Tile 6
    TSX

    跟随内容高度变化

    390 × 640
    TSX

    重排并观察布局

    Tile 1
    Tile 2
    Tile 3
    Tile 4
    Tile 5
    Tile 6

    Item → column:

    TSX

    API

    Masonry

    属性说明类型默认值