Components
Button
Code

Button

Buttons triggers allow users to identify and start the most important actions in a container.

<Button>Action label</Button>

Parameters

props

  • Type: @vtex/shoreline-components.ButtonProps & @types/react.React.RefAttributes<typescript.HTMLButtonElement>

Props

asChild (optional)

Merge button props with immediate child.

  • Type: boolean

  • Default: false

children

  • Type: @types/react.React.ReactNode

loading (optional)

Disable the button and show a spinner.

  • Type: boolean

  • Default: false

size (optional)

Increase or decrease padding.

  • Type: normal | large

  • Default: 'normal'

variant (optional)

Change between color combinations.

  • Type: primary | secondary | tertiary | critical | criticalTertiary

  • Default: 'secondary'

View source (opens in a new tab)