Text

Declarative way to render text with the correct design-system styles applied. It ensures consistent typography, colors, and semantics across the product.


                                                        
                                                        
                                                             <w-text color="primary" type="body">
                                                              This body text uses "primary" color
                                                            </w-text>
                                                        
                                                            

Props

Name

Description

Type

Default

Values

color

The color of the text

string

primary

primary, secondary, muted, inverted, accent, accent-inverted, success, success-inverted, warning, danger, danger-inverted, info, info-inverted

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