question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toast dark theme transparent background

See original GitHub issue

🐛 Bug report

I think this is a bug as it hurts legibility. I noticed the subtle and accent variants of toasts in dark mode have transparent backgrounds. Should probably have them be a solid color by default?

image

💥 Steps to reproduce

  1. Go to https://chakra-ui.com/docs/feedback/toast
  2. Ensure dark mode is turned on
  3. Click on show subtle-toast
  4. See transparent background

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
antonielcommented, Apr 20, 2021

You could try variant="solid", this variant provides a full filled background with opacity:1

0reactions
dgrcodecommented, Nov 18, 2021

Hey 👋

For other people landing here, what I found to be a nice alternative for the default dark theme to avoid the transparency is the following:

import { useColorModeValue } from "@chakra-ui/react";
const toastVariant = useColorModeValue("subtle", "solid");

toast({
  description: "The description shown on the toast",
  status: "error",
  variant: toastVariant,
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplest way to adjust background color of a react-toastify Toast
The easiest solution is setting the theme property, as mentioned in the docs. You can: Set ...
Read more >
Customizing Your POS Passcode Screen - Toast Central
Uploading Your Restaurant Logo; Switching Between Dark and Light Mode ... Image looks best with a transparent instead of a colored background.
Read more >
Change Android Toast background color - Code2care
You must have seen that by default we get a dark greyish kind of background color for a toast message that is displayed...
Read more >
Toast vector icon isolated on transparent background ... - Alamy
Download this stock vector: Toast vector icon isolated on transparent background, Toast transparency logo concept - R1R23R from Alamy's library of millions ...
Read more >
react-toastify background color - CodeSandbox
Create Sandbox Sign in. Sandbox Info. react-toastify background color. Custom toast background color with react-toastify and Glamor.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found