Skip to content

Toast

Provides brief notifcations to the user
import { Toast } from '@ensdomains/thorin'
<>
  <Button onClick={() => toggleState('toast')}>Show Toast</Button>
  <Toast
    description="This is an example toast."
    open={getState('toast')}
    title="Example Toast"
    variant="desktop"
    onClose={() => setState('toast', false)}
  >
    <Button shadowless size="small">
      Click Me
    </Button>
  </Toast>
</>

Props
#

name
type
default
onClose*
Required
() => void
-
bottom
any
-
description
string
-
left
any
-
msToShow
number
8000
open*
Required
boolean
-
popped*
Required
boolean
-
right
any
4
setPopped*
Required
(popped: boolean) => void
-
state*
Required
"preEnter" | "entering" | "entered" | "preExit" | "exiting" | "exited" | "unmounted"
-
title*
Required
string
-
top
any
4
variant
"touch" | "desktop"
desktop
Edit on GitHub