> 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.

# Descriptions

数据展示`@rockshin/tao-ui`

[代码演示](#代码演示)[API](#api)

以结构化详情展示带标签的字段。

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

items、响应式列数与跨列遵循 6.7.0；默认在手机一列、桌面三列之间适配，使用 tao-ui 断点。

## 何时使用

用于只读的账户、订单或配置详情。

## 代码演示


### 基础详情
```tsx preview
import { Descriptions } from "@rockshin/tao-ui";

const items = [
  { key: "name", label: "Name", children: "Ada Lovelace" },
  { key: "plan", label: "Plan", children: "Team" },
  { key: "region", label: "Region", children: "London" },
  { key: "status", label: "Status", children: "Active" },
];

export default function Example() {
  return <Descriptions title="Account" items={items} />;
}
```

### 边框与紧凑尺寸
```tsx preview
import { Descriptions } from "@rockshin/tao-ui";

const items = [
  { key: "name", label: "Name", children: "Ada Lovelace" },
  { key: "plan", label: "Plan", children: "Team" },
  { key: "region", label: "Region", children: "London" },
  { key: "status", label: "Status", children: "Active" },
];

export default function Example() {
  return (
    <Descriptions
      title="Account"
      items={items}
      bordered
      size="small"
      column={2}
    />
  );
}
```

### 垂直字段
```tsx preview
import { Descriptions } from "@rockshin/tao-ui";

const items = [
  { key: "name", label: "Name", children: "Ada Lovelace" },
  { key: "plan", label: "Plan", children: "Team" },
  { key: "region", label: "Region", children: "London" },
  { key: "status", label: "Status", children: "Active" },
];

export default function Example() {
  return (
    <Descriptions layout="vertical" items={items} column={2} colon={false} />
  );
}
```

### 跨列与填满余位
```tsx preview="iframe-follow"
import { Descriptions } from "@rockshin/tao-ui";

export default function Example() {
  return (
    <Descriptions
      bordered
      column={3}
      items={[
        { label: "Name", children: "Ada", span: 2 },
        { label: "Status", children: "Active" },
        {
          label: "Notes",
          children: "Available to all workspace members",
          span: "filled",
        },
        { label: "Owner", children: "Engineering" },
        { label: "Region", children: "Global", span: "filled" },
      ]}
    />
  );
}
```

### 响应式列数
```tsx preview="iframe-follow"
import { Descriptions } from "@rockshin/tao-ui";

const items = [
  { key: "name", label: "Name", children: "Ada Lovelace" },
  { key: "plan", label: "Plan", children: "Team" },
  { key: "region", label: "Region", children: "London" },
  { key: "status", label: "Status", children: "Active" },
];

export default function Example() {
  return (
    <Descriptions
      title="Responsive account"
      bordered
      items={items}
      column={{ xs: 1, sm: 2, lg: 3 }}
    />
  );
}
```

### 操作与语义样式
```tsx preview
import { useState } from "react";
import { Button, Descriptions } from "@rockshin/tao-ui";

const items = [
  { key: "name", label: "Name", children: "Ada Lovelace" },
  { key: "plan", label: "Plan", children: "Team" },
  { key: "region", label: "Region", children: "London" },
  { key: "status", label: "Status", children: "Active" },
];

export default function Example() {
  const [editing, setEditing] = useState(false);
  return (
    <Descriptions
      title="Billing details"
      extra={
        <Button size="small" onClick={() => setEditing(!editing)}>
          {editing ? "Show less" : "Show all"}
        </Button>
      }
      items={editing ? items : items.slice(0, 2)}
      styles={{
        label: { color: "var(--tao-color-text-secondary)" },
        content: { fontWeight: 600 },
      }}
    />
  );
}
```

## API


### [#](#descriptions)Descriptions



| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |

