Text

A component for rendering text.

import { Text } from '@cerberus/react'

Usage

Hello, world!

This is small text

API

export type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
export type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'
export interface TextProps extends BoxProps {
as?: TextElements | Headings
}
define function Text(props: TextProps): ReactNode

Props

The Text component accepts the following props along with the props from the Box component.

NameDefaultDescription
asThe text-based element to render the component as.

On this page