# Text
Text component, used to display text information.
> Available since version 1.3.4
## Basic Usage
Set `text` to set the text content. It is recommended to use the form :text='value'.
```html
```
## Set Theme
Set text theme through the type parameter. We provide five types: primary error success warning default.
```html
```
## Custom Font Color
Set the `color` property.
```html
```
## Bold Text
Set the `bold` property.
```html
```
## Font Size
Set the `size` property.
```html
```
## Data Masking
Set the `format` property, effective when `mode` is `phone` or `name`.
```html
```
## Lines
Set the `lines` property to specify the number of lines of text to display. If set, an ellipsis will be shown when the text exceeds this number of lines. Maximum value is 5.
```html
```
## Line Height
Set `lineHeight` for text line height.
```html
```
## Prefix and Suffix Slots
Set `prefix` and `suffix` slots.
```html
Prefix
Suffix
```
## Price
Set `mode="price"`.
```html
```
## Text Decoration
Set `decoration` for text decoration, such as underline, line-through, etc.
```html
```
## Events
```html
```
```typescript
function clickTest() {
console.log(1)
}
```
## Attributes
| Parameter | Description | Type | Options | Default | Version |
|-----------|-------------|------|----------|---------|----------|
| type | Theme type | string | 'primary' / 'error' / 'warning' / 'success' / 'default' | default | 1.3.4 |
| text | Text content | string / number | - | - | 1.3.4 |
| size | Font size | string | - | - | 1.3.4 |
| mode | Text processing mode | string | 'text' / 'date' / 'phone' / 'name' / 'price' | text | 1.3.4+ |
| bold | Whether bold, default normal | boolean | - | false | 1.3.4 |
| format | Whether to mask data | boolean | Effective when mode is phone or name | false | 1.3.4 |
| color | Text color | string | - | - | 1.3.4 |
| lines | Number of lines to display, if set, ellipsis will show when exceeding. Max value is 5. | number | - | - | 1.3.4 |
| lineHeight | Text line height | string | - | - | 1.3.4 |
| decoration | Text decoration, underline, line-through, etc. | string | 'underline' / 'line-through' / 'overline' | none | 1.3.4+ |
| prefix | Prefix content | string | - | - | 1.3.4+ |
| suffix | Suffix content | string | - | - | 1.3.4+ |
| call | Whether to make a call when clicking text in phone mode | boolean | - | false | 1.3.4 |
## Events
| Event Name | Description | Parameters | Version |
|------------|-------------|------------|----------|
| click | Triggered when text is clicked | event | 1.3.4 |
## Slots
| Slot Name | Description | Version |
|-----------|-------------|---------|
| prefix | Prefix slot | 1.3.4 |
| suffix | Suffix slot | 1.3.4 |
## External Classes
| Class Name | Description | Version |
|------------|-------------|----------|
| custom-class | Root node style | 1.3.4 |
| custom-style | Root node style | 1.3.4 |