Text
Edit
A text component for styling text.
Usage
import {Text} from '@wordpress/components'; const HeroPanel = () => ( <> <Text variant="title.large" as="h1">Hello World!</Text> <Text variant="body">Greetings to you!</Text> </> );
For most use-cases you can use this component instead of a
h1
,h2
,h3
,h4
,h5
,h6
orp
.