Extensions

Press shift + S to search API reference.

React component

Props

interface TextProps extends AriaProps, AllStylesProps
as"p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "li" | "em" | "strong" | "kbd" | "mark" | "q" | "s" | "samp" | "small" | "sub" | "sup" | "time" | "var" | "blockquote"

The element that is rendered. Defaults to p.

childrenReact.ReactNode | string

The contents of the text.

classNameundefined | string

Additional class names to apply, separated by spaces.

dataAttributesDataAttributesProp

Data attributes that are spread onto the element, e.g. dataAttributes={{'data-*': '...'}}.

idundefined | string

The id attribute.

roleundefined | string

The role attribute.

sizeTextSizeProp

The size of the text. Defaults to default. Can be a responsive prop object.

styleReact.CSSProperties

Additional styles.

variantTextVariant

The variant of the text. Defaults to default.