Skip to content

Text Component

The text-v1 component provides consistent typography styles across your application.

<text-v1 variant="body">This is some text</text-v1>

Large heading text:

<text-v1 variant="heading">Main Heading</text-v1>

Standard body text:

<text-v1 variant="body">This is body text for paragraphs.</text-v1>

Smaller text for captions or secondary information:

<text-v1 variant="small">Small text for captions</text-v1>
AttributeTypeDefaultDescription
variant'heading' | 'body' | 'small''body'Text style variant
data-keystring-Translation key for i18n
<text-v1 variant="heading" data-key="welcome"></text-v1>
<text-v1 variant="body">
This text component supports multiple lines
and will maintain proper spacing and formatting.
</text-v1>

The component renders semantic HTML based on the variant:

  • heading<h1>, <h2>, etc.
  • body<p>
  • small<small>