Valores aceitos para o componente Button.

Atente-se que algumas propriedades são herdadas de outros conjuntos

Veja abaixo um exemplo utilizando algumas as propriedades:

Hierarchy

Properties

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

A fixação do plano de fundo.

backgroundBlendMode?: "normal" | "multiply" | "hard-light" | "difference"

O modo de mesclagem do plano de fundo.

backgroundClip?: "border-box" | "padding-box" | "content-box" | "text"

A área de recorte do plano de fundo.

backgroundColor?: "none" | "primary-100" | "primary-300" | "primary-500" | "primary-700" | "primary-900" | "secondary-100" | "secondary-300" | "secondary-500" | "secondary-700" | "secondary-900" | "tertiary-100" | "tertiary-300" | "tertiary-500" | "tertiary-700" | "tertiary-900" | "accent-100" | "accent-300" | "accent-500" | "accent-700" | "accent-900" | "neutral-900" | "neutral-700" | "neutral-500" | "neutral-300" | "neutral-100" | "positive-700" | "positive-300" | "warning-700" | "warning-300" | "negative-700" | "negative-300" | "support-01" | "support-02" | "support-03"

Cor de fundo do componente

backgroundImage?: any

A imagem de plano de fundo.

backgroundOrigin?: "border-box" | "padding-box" | "content-box"

A origem do posicionamento do plano de fundo.

backgroundPosition?: string

A posição do plano de fundo.

backgroundPositionX?: string

A posição horizontal do plano de fundo.

backgroundPositionY?: string

A posição vertical do plano de fundo.

backgroundRepeat?: "repeat" | "space" | "round" | "no-repeat" | "repeat-x" | "repeat-y"

A repetição do plano de fundo.

backgroundSize?: "cover" | "contain" | "auto"

O tamanho do plano de fundo.

block?: boolean

Deixe como true para tornar o botão com largura expandida em 100% da área útil

 <Button block label="Um botão em bloco" />
border?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda.

borderBottomWidth?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda inferior.

borderColor?: "none" | "primary-100" | "primary-300" | "primary-500" | "primary-700" | "primary-900" | "secondary-100" | "secondary-300" | "secondary-500" | "secondary-700" | "secondary-900" | "tertiary-100" | "tertiary-300" | "tertiary-500" | "tertiary-700" | "tertiary-900" | "accent-100" | "accent-300" | "accent-500" | "accent-700" | "accent-900" | "neutral-900" | "neutral-700" | "neutral-500" | "neutral-300" | "neutral-100" | "positive-700" | "positive-300" | "warning-700" | "warning-300" | "negative-700" | "negative-300" | "support-01" | "support-02" | "support-03"

Cor das bordas do componente

borderLeftWidth?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda esquerda.

borderRadius?: "none" | "micro" | "small" | "medium" | "circular" | "pill"

O raio de borda.

borderRadiusLeftBottom?: "none" | "micro" | "small" | "medium" | "circular" | "pill"

O raio de borda inferior esquerdo.

borderRadiusLeftTop?: "none" | "micro" | "small" | "medium" | "circular" | "pill"

O raio de borda superior esquerdo.

borderRadiusRightBottom?: "none" | "micro" | "small" | "medium" | "circular" | "pill"

O raio de borda inferior direito.

borderRadiusRightTop?: "none" | "micro" | "small" | "medium" | "circular" | "pill"

O raio de borda superior direito.

borderRightWidth?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda direita.

borderTopWidth?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda superior.

borderWidth?: "none" | "hairline" | "thin" | "thick" | "heavy"

A largura da borda total.

boxShadow?: string

Efeito de sombra

checked?: boolean
color?: "none" | "primary-100" | "primary-300" | "primary-500" | "primary-700" | "primary-900" | "secondary-100" | "secondary-300" | "secondary-500" | "secondary-700" | "secondary-900" | "tertiary-100" | "tertiary-300" | "tertiary-500" | "tertiary-700" | "tertiary-900" | "accent-100" | "accent-300" | "accent-500" | "accent-700" | "accent-900" | "neutral-900" | "neutral-700" | "neutral-500" | "neutral-300" | "neutral-100" | "positive-700" | "positive-300" | "warning-700" | "warning-300" | "negative-700" | "negative-300" | "support-01" | "support-02" | "support-03"

Cor do texto no componente

disabled?: boolean

Deixe como true para tornar o botão inativo

 <Button disabled label="Um botão inativo" />
display?: "none" | "block" | "flex" | "inline" | "inline-block" | "inline-flex"

A exibição do elemento.

fontFamily?: string

A família da fonte.

fontSize?: "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo"

O tamanho da fonte.

fontStyle?: "normal" | "italic" | "oblique"

O estilo da fonte.

fontWeight?: "medium" | "light" | "bold" | "regular"

A espessura da fonte.

id?: string

Preenche o ID do elemento (não tem muito uso prático)

label?: string

Texto que aparece dentro do botão

 <Button label="Botão" />
letterSpacing?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O espaçamento entre as letras do texto.

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

A altura da linha do texto.

margin?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem geral.

marginBottom?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem inferior.

marginHorizontal?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem horizontal (esquerda e direita).

marginLeft?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem esquerda.

marginRight?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem direita.

marginTop?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem superior.

marginVertical?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

A margem vertical (superior e inferior).

onPress?: (() => void)

Type declaration

    • (): void
    • Função que será executada ao apertar o botão

       <Button label="Toque aqui" onPress={() => { console.log("O botão foi pressionado") }} />
      

      Returns void

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

A opacidade do elemento.

overflowWrap?: "normal" | "break-word"

O comportamento de quebra de palavra do texto.

padding?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento geral.

paddingBottom?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento inferior.

paddingHorizontal?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento horizontal (esquerdo e direito).

paddingLeft?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento esquerdo.

paddingRight?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento direito.

paddingTop?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento superior.

paddingVertical?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O preenchimento vertical (superior e inferior).

size?: "small" | "medium"

Utilize tamanho small para conseguir um botão menor

 <Button size="small" label="Um botão inativo" />
textAlign?: "center" | "left" | "right" | "justify"

O alinhamento do texto.

textDecoration?: "none" | "blink" | "underline" | "overline" | "line-through"

A decoração do texto.

textIndent?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O recuo do texto na primeira linha.

textJustify?: "auto" | "inter-character" | "inter-word" | "distribute"

O alinhamento do texto justificado.

textOverflow?: "clip" | "ellipsis"

O comportamento de quebra de texto quando há overflow.

textRendering?: "auto" | "optimizeSpeed" | "optimizeLegibility" | "geometricPrecision"

O método de renderização do texto.

textTransform?: "none" | "capitalize" | "uppercase" | "lowercase"

A transformação do texto.

variant?: "text" | "solid" | "ghost"

Variantes visuais do botão

 <Button variant="ghost" label="Um botão ghost" />
visibility?: "hidden" | "visible" | "collapse"

A visibilidade do elemento.

visualState?: "success" | "danger" | "warning"

Determina o estado visual do componente e seus filhos.

whiteSpace?: "normal" | "pre" | "nowrap" | "pre-wrap" | "pre-line"

O comportamento de quebra de linha do texto.

wide?: boolean

Deixe como true para tornar o botão com largura expandida

 <Button wide label="Um botão em bloco" />
wordSpacing?: "none" | "small" | "medium" | "quark" | "nano" | "extra-small" | "large" | "extra-large" | "big" | "display" | "huge" | "giant" | "jumbo" | "immense"

O espaçamento entre as palavras do texto.