The Text component provides a simple way to display text with different styles and sizes. It's useful for headings, labels, and general text content.
To use the Astra Text component, add the <astra-text>
tag to your HTML:
<astra-text>Default text</astra-text>
Choose from different text styles using the variant
attribute:
<astra-text variant="h1">Heading 1</astra-text>
<astra-text variant="h2">Heading 2</astra-text>
<astra-text variant="h3">Heading 3</astra-text>
<astra-text variant="h4">Heading 4</astra-text>
<astra-text variant="label">Label</astra-text>
The Astra Text component is designed with accessibility in mind: