Text

Used for text.

Basic

Use the type attribute to define Text's type.

DefaultPrimarySuccessInfoWarningDanger

Sizes

Use attribute size to set additional sizes with large, default or small.

LargeDefaultSmall

Ellipsis

Pass the truncated prop to render an ellipsis when the text exceeds the width of the viewport or max-width set. line-clamp prop to render multiline ellipsis.

Self element set width 100px
Squeezed by parent element
The -webkit-line-clamp CSS property
allows limiting of the contents of
a block to the specified number of lines.

Override

Use attribute tag to override element

span

This is a paragraph.

Bold
Italic
This is subscript
This is superscript
Inserted
Deleted
Marked

Mixed

Text mixed component

Element-Plus
Rate
This is text mixed icon and component

API

Attributes

NameDescriptionTypeDefault
typetext typeenum
sizetext sizeenumdefault
truncatedrender ellipsisbooleanfalse
line-clamp 2.4.0maximum linesstring / number
tagcustom element tagstringspan

Slots

NameDescription
defaultdefault content

Source

ComponentStyleDocs

Contributors