Display text with semantic elements, font sizes, colours, and font weights.
Anatomy
<Text />Examples
Semantic elements
as defaults to p. It accepts p, span, div, h1 through h6, strong, em, small, s, b, i, u, mark, sub, and sup. Native attributes, events, and refs follow the selected element.
Choose the element for its meaning. Use size and weight to control its appearance; when omitted, font size and weight follow your existing styles and browser defaults.
A paragraph with important text.
Sizes
size accepts xs (12px), sm (14px), md (16px), lg (18px), and xl (20px), or a custom CSS font size such as 2rem or clamp(1rem, 3vw, 2rem).
Extra small
Small
Medium
Large
Extra large
Custom size
Colours
Use the existing color prop with a theme colour, hex value, RGB function, or raw RGB channels. See the colour property for the full palette.
Primary colour
Success colour
Custom hex colour
Custom RGB colour
Font weights
weight accepts thin (100), extralight (200), light (300), normal (400), medium (500), semibold (600), bold (700), extrabold (800), and black (900). You can also pass these numbers directly. Available weights depend on the font you load.
Light
Normal
Medium
Semibold
Bold
Numeric weight: 900
Spacing and disabled appearance
Text also supports the shared margin and padding props. disabled applies a muted text colour; it is a visual treatment and does not disable interaction.
Currently unavailable