Components
IconButton
Code

IconButton

A button designed specifically for usage with a single icon.

<IconButton label="Delete">
  <IconTrash />
</IconButton>

Parameters

props

  • Type: @vtex/shoreline-components.IconButtonProps & @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

label

  • 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)