Shopware Design

Text

Source

Usage

Text is the base typography component for body copy, labels, headings, and supporting descriptions. Use it when you need consistent typography across content and interface text, and when the semantic HTML element and the visual text style should be chosen separately.

import { MtText } from "@shopware-ag/meteor-component-library";

Examples

Sizes

API reference

Props

PropTypeDefault
size"m" | "l" | "s" | "2xs" | "xs" | "xl" | "2xl" | "3xl""s"
weight"bold" | "regular" | "semibold" | "medium""regular"
colorstring"color-text-primary-default"
asstring | Component"p"

Slots

SlotBindings
default{}

Best practices

Do
  • Choose the as prop based on the semantic meaning of the content.
  • Choose size and weight based on visual hierarchy.
  • Keep color choices aligned with the text token system.
Don't
  • Do not use Text only for spacing or layout.
  • Do not use heading-sized text when the content is not actually a heading in the page structure.
  • Do not override the semantics of important content without a clear reason.

Behavior

  • Text renders as a semantic element through the as prop and defaults to a paragraph.
  • size, weight, and color control the visual style while the content stays in the default slot.
  • Larger sizes use the heading font tokens, while smaller sizes use the body font tokens.

Accessibility

  • Use the as prop to preserve the correct document structure, especially for headings.
  • Do not rely on visual styling alone to communicate hierarchy if semantic headings are required.
  • Keep color choices readable against the background and aligned with contrast requirements.