Back to Element Plus

Descriptions

docs/en-US/component/descriptions.md

2.13.75.3 KB
Original Source

Descriptions

Display multiple fields in list form.

Basic usage

:::demo

descriptions/basic-usage

:::

Sizes

:::demo

descriptions/sizes

:::

Vertical List

:::demo

descriptions/vertical-list

:::

Rowspan ^(2.8.1)

:::demo

descriptions/rowspan

:::

Customized Style

:::demo

descriptions/customized-style

:::

Descriptions API

Descriptions Attributes

NameDescriptionTypeDefault
borderwith or without border^[boolean]false
columnnumbers of Descriptions Item in one line^[number]3
directiondirection of list^[enum]'vertical' | 'horizontal'horizontal
sizesize of list^[enum]'' | 'large' | 'default' | 'small'
titletitle text, display on the top left^[string]''
extraextra text, display on the top right^[string]''
label-width ^(2.8.8)label width of every column^[string] / ^[number]

Descriptions Slots

NameDescriptionSubtags
defaultcustomize default contentDescriptions Item
titlecustom title, display on the top left
extracustom extra area, display on the top right

DescriptionsItem API

DescriptionsItem Attributes

NameDescriptionTypeDefault
labellabel text^[string]''
spancolspan of column^[number]1
rowspan ^(2.8.1)the number of rows a cell should span^[number]1
widthcolumn width, the width of the same column in different rows is set by the max value (If no border, width contains label and content)^[string] / ^[number]''
min-widthcolumn minimum width, columns with width has a fixed width, while columns with min-width has a width that is distributed in proportion (If noborder, width contains label and content)^[string] / ^[number]''
label-width ^(2.8.8)column label width, if not set, it will be the same as the width of the column. Higher priority than the label-width of Descriptions^[string] / ^[number]
aligncolumn content alignment (If no border, effective for both label and content)^[enum]'left' | 'center' | 'right'left
label-aligncolumn label alignment, if omitted, the value of the above align attribute will be applied (If no border, please use align attribute)^[enum]'left' | 'center' | 'right'
class-namecolumn content custom class name^[string]''
label-class-namecolumn label custom class name^[string]''

DescriptionsItem Slots

NameDescription
defaultcustomize default content
labelcustom label