Text

Text is the used to render text and paragraphs within an interface.

Import

import { Text } from "@deca-ui/react"

Usage

(H1) DecaUI is awesome

(H2) DecaUI is awesome

(H3) DecaUI is awesome

(H4) DecaUI is awesome

(H5) DecaUI is awesome
(H6) DecaUI is awesome

(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>

Sizes

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>

Font Weight

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>
Headshot

Made by Heril Saha