Skip to content
Enact

ui/BodyText

Text block component to be customized by a theme or application.

A simple, unstyled text block component.

Extends: ui/BodyTextui/BodyText.BodyTextBase
Wrapped with: ui/BodyTextui/BodyText.BodyTextDecorator

A simple, unstyled text block component, without ui/BodyTextui/BodyText.BodyTextDecorator applied.

Properties

Centers the contents.

Applies the centered CSS class which can be customized by /docs/developer-guide/theming//docs/developer-guide/theming/.

Default: false

The type of component to use to render the item. May be a DOM node name (e.g 'div', 'p', etc.) or a custom component.

Default: 'p'

ObjectFunction

Called with a reference to the root component.

When using ui/BodyTextui/BodyText.BodyText, the ref prop is forwarded to this component as componentRef.


Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.

The following classes are supported:

  • bodyText - The root class name

  • centered - Applied when centered prop is true

Applies BodyText behaviors.

Includes: ui/ForwardRefui/ForwardRef.ForwardRef