2019-05-22 23:22:09 +08:00
---
category: Components
2022-11-09 12:28:04 +08:00
group: Data Display
2019-12-18 12:09:05 +08:00
title: Descriptions
2022-11-30 20:14:41 +08:00
cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*fHdlTpif6XQAAAAAAAAAAAAADrJ8AQ/original
2023-02-09 22:17:31 +08:00
coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*d27AQJrowGAAAAAAAAAAAAAADrJ8AQ/original
2019-05-22 23:22:09 +08:00
---
Display multiple read-only fields in groups.
## When To Use
Commonly displayed on the details page.
2022-11-09 12:28:04 +08:00
## Examples
2022-11-17 17:31:26 +08:00
<!-- prettier - ignore -->
2022-11-09 12:28:04 +08:00
< code src = "./demo/basic.tsx" > Basic< / code >
< code src = "./demo/border.tsx" > border< / code >
< code src = "./demo/text.tsx" debug > border< / code >
< code src = "./demo/size.tsx" > Custom size< / code >
< code src = "./demo/responsive.tsx" > responsive< / code >
< code src = "./demo/vertical.tsx" > Vertical< / code >
< code src = "./demo/vertical-border.tsx" > Vertical border< / code >
< code src = "./demo/style.tsx" debug > Customize label & wrapper style< / code >
2023-05-17 14:22:48 +08:00
< code src = "./demo/component-token.tsx" debug > Component Token< / code >
2022-11-09 12:28:04 +08:00
2019-05-22 23:22:09 +08:00
## API
### Descriptions
2019-07-11 14:14:33 +08:00
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
2020-07-01 22:37:55 +08:00
| bordered | Whether to display the border | boolean | false | |
2020-10-21 10:33:43 +08:00
| colon | Change default props `colon` value of Descriptions.Item | boolean | true | |
2020-07-01 22:37:55 +08:00
| column | The number of `DescriptionItems` in a row,could be a number or a object like `{ xs: 8, sm: 16, md: 24}` ,(Only set `bordered={true}` to take effect) | number | 3 | |
2021-08-10 15:38:25 +08:00
| contentStyle | Customize content style | CSSProperties | - | 4.10.0 |
2020-10-21 10:33:43 +08:00
| extra | The action area of the description list, placed at the top-right | ReactNode | - | 4.5.0 |
2020-12-30 17:08:43 +08:00
| labelStyle | Customize label style | CSSProperties | - | 4.10.0 |
2020-01-17 17:23:48 +08:00
| layout | Define description layout | `horizontal` \| `vertical` | `horizontal` | |
2020-10-21 10:33:43 +08:00
| size | Set the size of the list. Can be set to `middle` ,`small`, or not filled | `default` \| `middle` \| `small` | - | |
| title | The title of the description list, placed at the top | ReactNode | - | |
2019-05-22 23:22:09 +08:00
### DescriptionItem
2021-09-01 10:56:50 +08:00
| Property | Description | Type | Default | Version |
| ------------ | ------------------------------ | ------------- | ------- | ------- |
| contentStyle | Customize content style | CSSProperties | - | 4.9.0 |
| label | The description of the content | ReactNode | - | |
| labelStyle | Customize label style | CSSProperties | - | 4.9.0 |
| span | The number of columns included | number | 1 | |
2020-12-24 12:02:57 +08:00
> The number of span Description.Item. Span={2} takes up the width of two DescriptionItems. When both `style` and `labelStyle`(or `contentStyle`) configured, both of them will work. And next one will overwrite first when conflict.
2023-04-11 10:25:24 +08:00
## Design Token
< ComponentTokenTable component = "Descriptions" > < / ComponentTokenTable >