[Toast] Toast does not appear to have any styles
See original GitHub issueDescribe the bug When using useToast
, none of the default styles are applied. In fact, there is no toast.ts file in the @chakra-ui/theme package at all.
Expected Behavior I should have the toast look like a toast on the website
Link to minimal reproduction https://codesandbox.io/s/funny-snyder-bm1r9?fontsize=14&hidenavigation=1&theme=dark
Steps to Reproduce: See reproduction above.
Suggested solution(s) Add some default styles
Desktop (please complete the following information):
- OS: Mac OS 10.15.5
- Browser: Chrome 83
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Toast style is not working correctly · Issue #202 · fkhadra/react ...
In my project, I made a new file toast.css and pasted styles from this path: node_modules/react-toastify/dist/ReactToastify.css . And in my file ...
Read more >Bootstrap toast does not show up - Stack Overflow
It mean you are accessing the jquery code before the file is loaded. Instead of placing jQuery code in the head section place...
Read more >Toasts overview - Android Developers
A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message...
Read more >Using React-Toastify to style your toast messages
To create promise toasts, add the following to your App. js file: const myPromise = new Promise((resolve) => fetch("https://jsonplaceholder. ...
Read more >Toasts · Bootstrap v5.0
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s an adjusted version: https://codesandbox.io/s/heuristic-brown-b51fb?file=/src/App.tsx
Hi @cereallarceny,
The
useToast
hook needs access to the theme inChakraProvider
. The way you set this up,useToast
is above the provider that’s why you can’t see any styles.To fix this, move the
ChakraProvider
andCSSReset
to theindex.js
file.PS: The reason there’s no toast.ts is that
Toast
re-uses the styles from the alert theme.