Usage
Use the Text component to provide the hierarchy and structure of a view by providing the title of each top-level section and its body-level content.
When using a heading, they should:
- Clearly describe the section of interface they refer to.
- Highlight the most important pieces of information.
- Sit at the top of the section of interface they’re referring to.
See the Typography documentation for more information.
Examples
Live Preview
Props
Name | Description | Type | Default | Values |
---|---|---|---|---|
color | The color of the text | string | primary | primary, secondary |
tag-type | The Text component should allow defining the tag in which to wrap the text. Useful for changing the semantic meaning of the text. | string | null | p, h1, h2, h3, h4, span, div |
text-align | Specifies the text alignment | string | left | center, left, right |
type | The type property of Text component has 6 types: body, caption, subSectionHeading, sectionHeading and displayHeading. | string | body | body, bodyEmphasis, caption, captionEmphasis, subSectionHeading, sectionHeading, displayHeading |
Slots
Name | Description |
---|---|
default | Default content slot |