How can I change rebass 'Text'(div) component to other semantic element?

102 views Asked by At

The default HTML element for the Text component is div. I'd like to change the Text component HTML element to other tags such as H1, H2, H3, and P for semantic. How can I change the rebass Text component HTML element to other tags for semantic?

1

There are 1 answers

0
octocat512 On

Rebass Text component has "as" prop to support semantics.

<Text as="h1">Hello World</Text>