Files
element-plus/docs/en-US/component/text.md
gimjin 4f78411bb8 feat(components): add el-text component (#11653)
* test(components): [text] el-text unit test

* docs(components): [text] el-text website documentation

* feat(components): [text] el-text implementation

* fix(components): [text] prop 'as' rename 'tag'

* docs(components): [text] rename slot default, optimize document

* test(components): [text] render text & class change the execution order

* fix(components): [text] use template and render function together
2023-03-10 15:30:56 +08:00

1.3 KiB

title, lang
title lang
Text en-US

Text

Used for text.

Basic

:::demo Use the type attribute to define Text's type.

text/basic

:::

Sizes

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

text/sizes

:::

Ellipsis

:::demo Pass the truncated prop to render an ellipsis when the text exceeds the width of the viewport or max-width set.

text/truncated

:::

Override

:::demo Use attribute tag to override element

text/override

:::

Mixed

:::demo Text mixed component

text/mixed

:::

API

Attributes

Name Description Type Default
type text type ^[enum]'primary' | 'success' | 'warning' | 'danger' | 'info'
size text size ^[enum]'large' | 'default' | 'small' default
truncated render ellipsis ^[boolean] false
tag custom element tag ^[string] span

Slots

Name Description
default default content