---
title: Button
description: >-
  A versatile button component with multiple variants and sizes for user
  interactions.
source_url:
  html: 'https://shopify.dev/docs/api/shop-minis/components/primitives/button'
  md: 'https://shopify.dev/docs/api/shop-minis/components/primitives/button.md'
api_name: shop-minis
---

# Button

A versatile button component with multiple variants and sizes for user interactions.

#### Props

* **children**

  **React.ReactNode**

  Button content

* **disabled**

  **boolean**

  Whether the button is disabled

* **on​Click**

  **React.MouseEventHandler\<HTMLButtonElement>**

  Click handler

* **size**

  **'default' | 'sm' | 'lg' | 'icon'**

  Button size

* **stop​Propagation**

  **boolean**

  Prevent click from bubbling to parent elements

* **variant**

  **| 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' | 'icon'**

  Visual style variant

Examples

## Preview

![button](https://shopify.dev/assets/assets/images/templated-apis-screenshots/shop-minis/Button-CIXtNuGa.png)

### Examples

* ####

  ##### tsx

  ```tsx
  import {Button} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    const handleClick = () => {
      console.log('Button pressed')
    }

    return <Button onClick={handleClick}>Continue</Button>
  }
  ```

* ####

  ##### Description

  A button with the Shop brand color background

  ##### tsx

  ```tsx
  import {Button} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    const handleClick = () => {
      console.log('Button pressed')
    }

    return <Button onClick={handleClick}>Continue</Button>
  }
  ```

* ####

  ##### Description

  A button for less prominent actions

  ##### tsx

  ```tsx
  import {Button} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    return <Button variant="secondary">Cancel</Button>
  }
  ```

* ####

  ##### Description

  A button for dangerous actions like delete

  ##### tsx

  ```tsx
  import {Button} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    return <Button variant="destructive">Delete</Button>
  }
  ```

* ####

  ##### Description

  A button in a disabled state

  ##### tsx

  ```tsx
  import {Button} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    return <Button disabled>Continue</Button>
  }
  ```

***
