Concepts
OverviewCompositionTestingLayout
Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrapComponents
AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltipUtilities
Feature FlagsForLocal StoragePortalShowsplitPropsThemeimport { Text } from '@cerberus/react'Usage
Hello, world!
This is normal text
This is small textRaw HTML
To render raw HTML, you can utilize the React dangerouslySetInnerHTML combined with the whiteSpace property.
This is a raw paragraph with a bold word and a
line break.
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): ReactNodeProps
The Text component accepts the following props along with the props from the Box component.
| Name | Default | Description |
|---|---|---|
| as | The text-based element to render the component as. |
On this page