Text

A component that displays text using the typography styles from Medusa's design system.

In this guide, you'll learn how to use the Text component.

Text

Was this example helpful?

Usage#

Code
import { Text } from "@medusajs/ui"
Code
<Text>Text</Text>

API Reference#

This component is based on the p element and supports all of its props

PropTypeDefault
asChild
boolean
false
as
"p"
|"span"
|"div"
"p"
size
"xsmall"
|"small"
|"base"
|"large"
|"xlarge"
"base"
weight
"regular"
|"plus"
"regular"
family
"sans"
|"mono"
"sans"
leading
"normal"
|"compact"
"normal"
Was this helpful?

Examples#

Text Sizes#

Base size

Large size

XLarge size

Was this example helpful?

Text Weights#

Regular weight

Plus weight

Was this example helpful?

Text Fonts#

Sans font

Mono font

Was this example helpful?

Text Leading#

Normal leading

Compact leading

Was this guide helpful?
Ask Anything
Ask any questions about Medusa. Get help with your development.
You can also use the Medusa MCP server in Cursor, VSCode, etc...
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break