These are the accepted values as properties of the Button component.

Note that some properties are inherited from other sets.

Here's an example using some of the properties:

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

Set to true to make the button width expand full width.

Example:

 <Button block label="A block button" />
border?: string

borderColor sets the color of borders in the design system, allowing you to control the visual appearance of elements' outlines.

Check the token table to know which values to use

Example:

   <borderColor="neutral-900" />
borderBottomStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderBottomWidth?: string

borderBottomWidth focuses on adjusting the thickness of the bottom border in the design system, allowing you to fine-tune the visual appearance of the bottom border for elements.

Check the token table to know which values to use

Example:

   <borderBottomWidth="hairline" />
borderColor?: string

Border Color of component

Check the token table to know which values to use

Example:

   <borderColor="neutral-900" />
borderLeftStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderLeftWidth?: string

borderBottomWidth is used to control the thickness of the bottom border in the design system, giving you control over the visual appearance of the bottom edges of elements.

Check the token table to know which values to use

Example:

   <borderBottomWidth="hairline" />
borderRadius?: string

borderRadius defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadius="micro" />
borderRadiusLeftBottom?: string

borderRadiusLeftBottom defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusLeftBottom="micro" />
borderRadiusLeftTop?: string

borderRadiusLeftTop defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusLeftTop="micro" />
borderRadiusRightBottom?: string

borderRadiusRightBottom defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusRightBottom="micro" />
borderRadiusRightTop?: string

borderRadiusRightTop defines the roundness or curvature of corners in the design system, allowing you to create different shapes and styles for elements by adjusting this property.

Check the token table to know which values to use

Example:

   <borderRadiusRightTop="micro" />
borderRightStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderRightWidth?: string

borderRightWidth is used to control the thickness of the right border in the design system, giving you control over the visual appearance of the right edges of elements.

Check the token table to know which values to use

Example:

   <borderRightWidth="hairline" />
borderStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderTopStyle?: "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset"

Defines the border style of a component. You need to define borderWidth before use this property.

Example:

   <View borderWidth="hairline" borderStyle="dashed" />
borderTopWidth?: string

borderTopWidth specifically adjusts the thickness of the top border in the design system, giving you precise control over the visual aspect of the top border of elements.

Check the token table to know which values to use

Example:

   <borderTopWidth="hairline" />
borderWidth?: string

The borderWidth determines the thickness of borders in the design system. It's a crucial property for defining the visual weight of elements.

Check the token table to know which values to use

Example:

   <borderWidth="hairline" />
boxShadow?: string

Efeito de sombra

Example:

  <boxShadow="myBoxShadow" />

Deprecated

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" />
disabled?: boolean

Set to true to make the button inactive.

Example:

 <Button disabled label="An inactive button" />
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" />
id?: string

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

Example:

 <View id="id" />
label?: string

Text displayed inside the button.

Example:

 <Button label="My Button" />
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" />
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" />
onPress?: (() => void)

Type declaration

    • (): void
    • Function to be executed when the button is pressed.

      Example:

      <Button
      label="Touch me"
      onPress={() => { console.log("Hello world") }}
      />

      Returns void

opacity?: "none" | "solid" | "light" | "half" | "heavy" | "transparent"

Changes the element opacity

Example:

<opacity="light" />
overflowWrap?: "normal" | "break-word"

Controls how word-breaks are handled.

Example:

<overflowWrap="normal" />
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" />
size?: "medium" | "small" | "micro"

Use small for a smaller button

Example:

 <Button size="small" label="A small button" />
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" />
transform?: string

"Prepare a position transforming of element"

Example:

 <View transform="rotate(45deg)" />
transition?: string

"Prepare a transition of visual state change"

Example:

 <View transition="background-color 0.5s ease-in-out" />
variant?: "text" | "solid" | "ghost" | "outlined"

Visual variations of the button.

Solid is a common surface button Ghost is deprecated Outlined is for outlined button Text is only text, but with same dimensions

Example:

 <Button variant="ghost" label="A ghost button" />
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

Set to true to make the button width expand.

Example:

 <Button wide label="A wide button" />
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" />