Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1660·evergreen

zIndex for Toaster

Author: len0xxCreated Aug 17, 2023Updated Aug 27, 2023

Currently for some reason it's not possible to change zIndex for Toaster component. But it's very likely to be possible. The documentation says that this component has a property called zIndex, but as I said it's impossible to use it:

image

One of possible solutions:

typescript
import Toaster from 'evergreen-ui/src/toaster/src'
const toaster = new Toaster({ zIndex: 40 })
toaster.danger('Error occurred!')

Another solution:

typescript
import { toaster } from 'evergreen-ui'
toaster.danger('Error occurred', { zIndex: 40 })

Source: segmentio/evergreen

View original on GitHubView discussion on GitHub