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/form-layout.md.
v0.0.57
  • 简体中文
  • FormLayout

    布局@rockshin/tao-ui

    为产品级表单提供一致的宽度、区段与操作布局。

    何时使用

    页面需要由多个字段区段与操作区组成完整表单时使用 FormLayout。

    推荐

    • 使用 FormSection 分组相关字段。
    • 使用 FormActions 保持操作位置一致。

    避免

    • 不要用 FormLayout 包裹与表单无关的页面内容。

    代码演示

    基础用法

    Account

    Your login details.

    TSX

    多个区段

    Profile

    Visible to your teammates.

    Contact

    Used for account notifications.

    TSX

    语义化定制

    Layout width is customized through the stable root part.

    TSX

    完整表单组合

    组合布局、字段与操作区,用原生提交展示保存结果。

    Profile

    Public workspace information

    A short introduction

    No changes saved
    TSX

    响应式多列表单

    通过语义 root 使用 CSS Grid,空间不足时自动变为单列。

    390 × 640
    TSX

    分组表单

    用 section 标题表达信息层级,外层布局统一间距。

    Account

    Identity and contact

    Notifications

    Delivery preferences

    TSX

    API

    FormLayout

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