Dark Mode Toggle - Copy this Html, Tailwind Component to your project
Generate a simple webpage that uses Tailwind CSS via CDN for layout and styling, and implement a dark mode and light mode toggle. The page should include: A toggle button that allows users to switch between light mode and dark mode. CSS Variables should be used for defining and managing color schemes, such as background color, text color, button color, and link color for both light and dark modes. When the page loads, it should check for the user's previous theme preference (using localStorage) and set the theme accordingly. The toggle button should be styled with Tailwind CSS classes, and its appearance should change based on the current theme. The background and text colors should smoothly transition when switching between light and dark modes (using CSS transitions). Tailwind CSS should be used for layout and basic styling, but the color management (background, text, button colors) should be handled through CSS Variables. The dark mode should be activated when the dark class is added to the <html> or <body> element. Ensure the code is well structured, clean, and easily extensible for future improvements.
