Accepted values for the Text component.

Note that some properties are inherited from other sets.

Here's an example using some of the properties:

<Text color="neutral-900">Customized text</Text>

Hierarchy

Properties

backgroundAttachment?: "scroll" | "fixed" | "local" | "none"

backgroundAttachment defines how a background image behaves in relation to the scrolling of content on the page.

Param

The option for attaching the background image.

  • "scroll": The background image scrolls with the content when the user scrolls the page.
  • "fixed": The background image remains fixed relative to the viewport and does not move when the user scrolls the page.
  • "local": The background image scrolls with the content of a specific element, such as a div.

Example:

   <backgroundAttachment="scrooll" />
backgroundBlendMode?: "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"

Defines how background layers blend with each other. It applies blending effects between multiple background images, gradients, or colors within the same element.

Example:

   <View backgroundBlendMode="multiply" />
backgroundClip?: "border-box" | "padding-box" | "content-box" | "text"

The background clip area.

Example:

   <backgroundClip="border-box" />
backgroundColor?: string

Background color of component

Check the token table to know which values to use

Example:

   <backgroundColor="background-color" />
backgroundImage?: any

Change the background Image

Example:

   <backgroundImage="myBoxShadow" />
backgroundOrigin?: "border-box" | "padding-box" | "content-box"

Sets the origin of background positioning

Example:

   <backgroundOrigin="border-box" />
backgroundPosition?: string

The position of background

Example:

   <backgroundPosition="center" />
backgroundPositionX?: string

The horizontal position of background

Example:

   <backgroundPositionX="center" />
backgroundPositionY?: string

The vertical position of background

Example:

   <backgroundPositionY="center" />
backgroundRepeat?: "repeat" | "space" | "round" | "no-repeat" | "repeat-x" | "repeat-y"

Allows background repetition

Example:

   <backgroundRepeat="repeat" />
backgroundSize?: "cover" | "contain" | "auto"

Sets the background sizing

Example:

   <backgroundSize="cover" />
block?: boolean

Using the "block" option makes it a block instead of linear text.

Example:

 <Text  block={true}>
borderColor?: string

Border Color of component

Check the token table to know which values to use

Example:

   <borderColor="neutral-900" />
bottom?: string | number

A distance from the bottom.

Example:

  <bottom={20} />
boxShadow?: string

Efeito de sombra

Example:

  <boxShadow="myBoxShadow" />

Deprecated

code?: boolean

Using the "code" option we can activate or disable the function code. This option don`t work with BBCode

Example:

 <Text code>your code here</Text>
color?: string

Text color of components

Check the token table to know which values to use

Example:

   <color="neutral-900" />
contentColor?: boolean

"Use contrast colors for text and background"

Example:

 <View contentColors backgroundColor="primary-500" />
customFontSize?: string

Font size custom definition

Example:

<Text customFontSize="24px" />
display?: "none" | "block" | "flex" | "inline" | "inline-block" | "inline-flex"

Changes the element exhibition

Example:

<display="flex"/>
elevation?: "none" | "low" | "medium" | "high" | "highest"

Adjust elevation of component

Example:

  <View elevation="low" ></View>
filter?: string

Sets a filter to image render.

Example:

<Image filter="sepia(60%)" />
fontFamily?: string

Font-family (require font configuration)

Example:

<fontFamily="default" />
fontSize?: string

Font size definition by Design System

Example:

<Text fontSize="extra-small" />
fontStyle?: "normal" | "italic" | "oblique"

Changes font style

Example:

<fontStyle="normal" />
fontWeight?: "string" | "medium" | "light" | "regular" | "bold"

Changes the font weight

Example:

<fontWeight="light" />
height?: string | number

Adjust component height

Example:

   <height={100} />
id?: string

"Fills the ID of the element (not very practical)."

Example:

 <View id="id" />
ignoreBBCode?: boolean

Using the "ignoreBBCode" option we can activate or disable the function BBCode.

Example:

 <Text ignoreBBCode={false}>
inline?: boolean

Use the "inline" option to use Text inside Text.

Example:

 <Text><Text inline>Danger</Text> zone</Text>
left?: string | number

A distance from the left.

Example:

  <left={20} />
letterSpacing?: "none" | "medium" | "small" | "large" | "quark" | "nano" | "extra-small" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

Changes the letter spacing of text tag

Example:

<letterSpacing="quark" />
lineClamp?: number

Controls how many lines for text-clamp

lineHeight?: "medium" | "small" | "large"

Changes the line height of the text

Example:

<lineHeight="small" />
margin?: string

General margin size

Check the token table to know which values to use

Example:

<margin="quark" />
marginBottom?: string

Bottom margin size

Check the token table to know which values to use

Example:

<marginBottom="quark" />
marginHorizontal?: string

Horizontal (left and right) margin size

Check the token table to know which values to use

Example:

<marginHorizontal="quark" />
marginLeft?: string

Left margin size

Check the token table to know which values to use

Example:

<marginLeft="quark" />
marginRight?: string

Right margin size

Check the token table to know which values to use

Example:

<marginRight="quark" />
marginTop?: string

Top margin size

Check the token table to know which values to use

Example:

<marginTop="quark" />
marginVertical?: string

Vertical (top and bottom) margin size

Check the token table to know which values to use

Example:

<marginVertical="quark" />
maxHeight?: string | number

Adjust component maximum height

Example:

   <maxHeight={100} />
maxWidth?: string | number

Adjust component maximum width

Example:

   <maxwidth={100} />
minHeight?: string | number

Adjust component minimum height

Example:

   <minHeight={100} />
minWidth?: string | number

Adjust component minimum width

Example:

   <minWidth={100} />
mixBlendMode?: "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"

Determines how an element’s content blends with the background or elements behind it. It affects the entire element, including text and images, and creates effects similar to those in graphic design software.

Example:

   <View mixBlendMode="screen" />
objectFit?: "none" | "cover" | "contain" | "fill" | "scale-down"

Sets the object fit

Example:

   <objectFit="cover" />
opacity?: "none" | "solid" | "light" | "half" | "heavy" | "transparent"

Changes the element opacity

Example:

<opacity="light" />
overflow?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The overall overflow behavior.

Example:

  <overflow="hidden" />
overflowWrap?: "normal" | "break-word"

Controls how word-breaks are handled.

Example:

<overflowWrap="normal" />
overflowX?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The horizontal overflow behavior.

Example:

  <overflowX="hidden" />
overflowY?: "scroll" | "overlay" | "auto" | "hidden" | "visible"

The vertical overflow behavior.

Example:

  <overflowY="hidden" />
padding?: string

General padding size

Check the token table to know which values to use

Example:

<padding="quark" />
paddingBottom?: string

Bottom padding size

Check the token table to know which values to use

Example:

<paddingBottom="quark" />
paddingHorizontal?: string

Horizontal (left and right) padding size

Check the token table to know which values to use

Example:

<paddingHorizontal="quark" />
paddingLeft?: string

Left padding size

Check the token table to know which values to use

Example:

<paddingLeft="quark" />
paddingRight?: string

Right padding size

Check the token table to know which values to use

Example:

<paddingRight="quark" />
paddingTop?: string

Top padding size

Check the token table to know which values to use

Example:

<paddingTop="quark" />
paddingVertical?: string

Vertical (top and bottom) padding size

Check the token table to know which values to use

Example:

<paddingVertical="quark" />
position?: "fixed" | "static" | "relative" | "absolute" | "sticky"

The element positioning.

Example:

  <position="relative" />
right?: string | number

A distance from the right.

Example:

  <right={20} />
showScrollbars?: boolean

This property controls the display of scrollbars.

<View showScrollbars>
</View>
textAlign?: "center" | "left" | "right" | "justify"

Sets the type of alignment of text. (Works only with block property)

Example:

<textAlign="center" />
textDecoration?: "none" | "underline" | "overline" | "line-through" | "blink"

Changes text decoration

Example:

<textDecoration="none" />
textIndent?: "none" | "medium" | "small" | "large" | "quark" | "nano" | "extra-small" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

Changes indentation of first line.

Example:

<textIdent="quark" />
textJustify?: "auto" | "inter-cluster" | "inter-word" | "distribute" | "distribute-all-lines"

Changes justify model of alignment

Example:

<textJustify="auto />
textOverflow?: "clip" | "ellipsis"

Changes text overflow

Example:

<textOverflow="clip" />
textRendering?: "auto" | "optimizeSpeed" | "optimizeLegibility" | "geometricPrecision"

Changes the text render method

Example:

<textRendering="auto"/>
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase"

Changes text transformation

Example:

<textTransform="none" />
top?: string | number

A distance from the top.

Example:

  <top={20} />
transform?: string

"Prepare a position transforming of element"

Example:

 <View transform="rotate(45deg)" />
transformBreakLines?: boolean

This option make a line break in the text when it reaches a "\n" character.

transition?: string

"Prepare a transition of visual state change"

Example:

 <View transition="background-color 0.5s ease-in-out" />
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s1" | "s2" | "b1" | "b2" | "bt" | "cp"

The variation of the text component.

The variant property defines the style variation of the text component. Each variant corresponds to a specific typographic style, providing semantic meaning and visual hierarchy.

  • h1: Represents the largest heading size, typically used for main titles.
  • h2: Represents a slightly smaller heading size, often used for section titles.
  • h3: Represents a heading size smaller than h2, suitable for subsection titles.
  • h4: Represents a heading size smaller than h3, commonly used for sub-subsection titles.
  • h5: Represents a smaller heading size, suitable for minor headings.
  • h6: Represents the smallest heading size, typically used for minor subsection titles.
  • s1: Represents a subtitle text, commonly used for emphasized text.
  • s2: Represents a smaller-subtitle text compared to s1, often used for less emphasized text.
  • b1: Represents the base size for body text, providing good readability.
  • b2: Represents a slightly smaller size compared to b1, suitable for secondary body text.
  • bt: Represents the text size typically used for button labels.
  • cp: Represents a smaller-sized text, suitable for captions or auxiliary information.
 <Text variant="h1">My header</Text>
visibility?: "hidden" | "visible" | "collapse"

Changes the element visibility

Example:

<visibility="visible" />
visualState?: "success" | "danger" | "warning"

"Determines the visual state of the component and its children."

Example:

 <View visualState="success" />
whiteSpace?: "normal" | "nowrap" | "pre" | "pre-wrap" | "pre-line" | "break-spaces"

Controls how white spaces (spaces, tabs, and line breaks) are handled.

Example:

<whiteSpaceValues="normal" />
wide?: boolean

Using the "wide" option makes it a block instead of linear text.

Example:

 <Text  wide={true}>

Deprecated

width?: string | number

Adjust component width

Example:

   <width={100} />
wordSpacing?: "none" | "medium" | "small" | "large" | "quark" | "nano" | "extra-small" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

Changes the spacing size between words

Example:

<wordSpacing="quark" />
zIndex?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Value of z-index

Example:

  <zIndex={1} />