moonstone/BodyText

Moonstone styled text block components and behaviors.

import BodyText from '@enact/moonstone/BodyText';

Members

BodyTextComponent

A simple text block component, ready to use in Moonstone applications.

BodyText may be used to display a block of text and is sized and spaced appropriately for a Moonstone application.

Usage:

<BodyText>
 I have a Ham radio. There are many like it, but this one is mine.
</BodyText>
import BodyText from '@enact/moonstone/BodyText';

BodyTextBaseComponent

A simple text block component.

This component is most often not used directly but may be composed within another component as it is within BodyText.

import {BodyTextBase} from '@enact/moonstone/BodyText';
Properties
centered
Boolean

Centers the contents.

Applies the centered CSS class which can be customized by theming.

css
Object

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

noWrap
Boolean

Toggles multi-line (false) vs single-line (true) behavior. noWrap mode automatically enables moonstone/Marquee so long text isn't permanently occluded.

Default: false
size
'small''large'

Sets the text size to one of the preset sizes. Available sizes: 'large' (default) and 'small'.

Default: 'large'

BodyTextDecoratorHigher-Order Component

Applies Moonstone specific behaviors to BodyText.

import {BodyTextDecorator} from '@enact/moonstone/BodyText';
ArrayBooleanFunctionModuleNumberObjectString