1

I am novice in Javascript. Recently I started using Tailwind Css. Now I want to add it in my blogger template. But I don't know how to add a dark mode toggle button in Tailwind Css. How Can I add a toggle Dark mode toggle button in Tailwind Css.

N.B. As I'm using blogger platform, so There's no way to add it from local library. So I use CDN.

<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.15/dist/tailwind.min.css" rel="stylesheet">

Do I need any other CDN ? Or Javascript code ?

Md. Ibrahim
  • 147
  • 7

1 Answers1

2

Can you please check the below code link? Hope it will work for you. We have used Tailwind’s library which is flowbite And it provides a dark-mode toggle switch inbuild so we can apply this.

Please refer to this link: https://codesandbox.io/embed/fervent-fast-6v9fn5?autoresize=1&fontsize=14&hidenavigation=1&theme=dark

you can also follow this document: https://flowbite.com/docs/customize/dark-mode/

Yudiz Solutions
  • 4,216
  • 2
  • 7
  • 21