Texto ​

Utilizado para texto.

Básico ​

Utilice el atributo type para definir el tipo de texto.

DefaultPrimarySuccessInfoWarningDanger

Tamaños ​

Use el atributo size para establecer tamaños adicionales con los siguientes valores large, default o small.

LargeDefaultSmall

Elipsis ​

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. Starting from version 2.14.6, isTruncated is exposed to indicate whether the text is truncated. You can use it to show a tooltip only when truncation occurs.

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.
Show tooltip only when the text is truncated

Sobrescribir ​

Use el atributo tag para sobreescribir el elemento HTML contenedor

span

This is a paragraph.

Bold
Italic
This is subscript
This is superscript
Inserted
Deleted
Marked

Mixto ​

Combinando otros componentes con Text

Element-Plus
Rate
This is text mixed icon and component

API ​

Atributos ​

NombreDescripciónTipoPor defecto
typetipo de textoenum—
sizetamaño del textoenumdefault
truncatedmostrar puntos suspensivosbooleanfalse
line-clamp 2.4.0maximum linesstring / number—
tagetiqueta de elemento personalizadastringspan

Slots ​

NombreDescripción
defaultcontenido por defecto

Expuesto ​

NombreDescripcíonTipo
isTruncated 2.14.6whether the text is truncatedobject

Fuente ​

Componentes • Style • Documentación

Contribuidores ​