Skip to main content

Button

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

Anchor to children
children
React.ReactNode

Button content

Anchor to disabled
disabled
boolean

Whether the button is disabled

Anchor to onClick
onClick
React.MouseEventHandler<HTMLButtonElement>

Click handler

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

Button size

Anchor to stopPropagation
stopPropagation
boolean

Prevent click from bubbling to parent elements

Anchor to variant
variant
| 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' | 'icon'

Visual style variant

Examples

tsx

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

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

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

Preview

button

Was this page helpful?