Text is the used to render text and paragraphs within an interface.
import { Text } from "@deca-ui/react"
(p) DecaUI is awesome
<Text as="h1">(H1) DecaUI is awesome</Text>
<Text as="h2">(H2) DecaUI is awesome</Text>
<Text as="h3">(H3) DecaUI is awesome</Text>
<Text as="h4">(H4) DecaUI is awesome</Text>
<Text as="h5">(H5) DecaUI is awesome</Text>
<Text as="h6">(H6) DecaUI is awesome</Text>
<Text as="p">(p) DecaUI is awesome</Text>
It is possible to have a p
tag with the size and line-height of a h1
tag by using the size
prop.
This renders as a <p> tag
<Text as="p" size="h1">This renders as a {"<p>"} tag</Text>
You can change the font weight of the tag by using the weight
prop.
This renders as bold text
<Text as="p" weight="bold">This renders as bold text</Text>
Made by Heril Saha