Heading is Text set to heading-strong-l, with accessibilityRole="header" so screen readers announce it as a header and let people jump between headings. It takes the same props as Text. See the web Heading page for the full set of variants.
Pick the size with variant. Any heading or display variant works.
onBackground, onSolid, align, truncate and the spacing props work as on Text.
- No as. There are no h1 to h6 elements. Every Heading is a header to screen readers, and the variant sets its size.
- Use variant. Heading always passes a variant, so family, size and weight alone do not change it.
Heading takes every Text prop, the spacing props and every React Native Text prop.