Skip to content

How can I add a backdrop to my toast #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ahmadi3d opened this issue Dec 25, 2024 · 1 comment
Open

How can I add a backdrop to my toast #1196

ahmadi3d opened this issue Dec 25, 2024 · 1 comment

Comments

@ahmadi3d
Copy link

Hello,

I want to display an "Are you sure?" toast to my users that they can't skip. I tried using a modal or backdrop, but it requires manual styling because the modal takes up the entire page, and my text is aligned to the left. I've shared an image to show this.

Lastly, is there a way to remove the closing delay when I call closeToast? There's a noticeable delay before the toast disappears.

Thank you!
image

@Link2Twenty
Copy link

This would probably be better as a modal rather than a toast from a user interact point of view but you can achieve this by inerting all other content using the inert tag and give the toast a box shadow of 0 0 100vmax rgba(0,0,0,0.3) or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants