Skip to main content

Toaster
component

A notification component that shows up from the bottom, in various states.You can view the Storybook for more interactive examples.

Was this section helpful?

Toaster

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

export default function MyComponent() {
const handleClick = () => {
toast.success('Success toast!')
}

return (
<>
<Button onClick={handleClick}>
Show success Toast
</Button>
<Toaster />
</>
)
}

Preview

Toast notification types and usage

A success toast notification

An error toast notification

Was this section helpful?

Success toast

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

export default function MyComponent() {
const handleClick = () => {
toast.success('Success toast!')
}

return (
<>
<Button onClick={handleClick}>
Show success Toast
</Button>
<Toaster />
</>
)
}