Skip to main content

Text

Import​

import { Text } from '@resultadosdigitais/tangram-components'

Properties​

isItalic​

Typebool
Defaultfalse

Description​

Sets the italic font style.

as​

Typenode | string
Default'p'

Description​

Set element type to be rendered for this component. By default, it will render a <p> element.

forwardedAs​

Typenode | string
Defaultundefined

Description​

Pass as properties to this component if it is encapsulated by the styled of the Styled Component.

children​

Typefunc | node

Description​

The text to be rendered.

textColor​

Typestring
Default'--neutral-text-high-emphasis'

Description​

Sets the text color based on design tokens.

token​

Type
Enum of:
  • Text.tokens.TEXT_XXL_BOLD
  • Text.tokens.TEXT_XXL_EXTRABOLD
  • Text.tokens.TEXT_XXL_REGULAR
  • Text.tokens.TEXT_XL_BOLD
  • Text.tokens.TEXT_XL_EXTRABOLD
  • Text.tokens.TEXT_XL_REGULAR
  • Text.tokens.TEXT_LG_BOLD
  • Text.tokens.TEXT_LG_EXTRABOLD
  • Text.tokens.TEXT_LG_REGULAR
  • Text.tokens.TEXT_MD_BOLD
  • Text.tokens.TEXT_MD_EXTRABOLD
  • Text.tokens.TEXT_MD_REGULAR
  • Text.tokens.TEXT_SM_BOLD
  • Text.tokens.TEXT_SM_EXTRABOLD
  • Text.tokens.TEXT_SM_REGULAR
  • Text.tokens.TEXT_XS_BOLD
  • Text.tokens.TEXT_XS_EXTRABOLD
  • Text.tokens.TEXT_XS_REGULAR
DefaultText.tokens.TEXT_MD_REGULAR

Description​

Sets font size.

truncate​

Typebool
Defaultfalse

Description​

Identifies that the text will be truncated when it exceeds the available size.

wordBreak​

Typebool
Defaultfalse

Description​

Sets the css property word-break to break-all. It controls whether line breaks appear in places where the text would otherwise exceed the available size.

Feedback​