How to create a dark mode toggle with Tailwind CSS and AlpinejsMichael Andreuzza·Apr 9, 2024·1 min readTable of contentsAdvantages of a theme toggleLets get to the codeThe structureThe Alpine JS codeAdding the classes to your markupToday is toggle day! Read the article See it live and get the code Tailwind CSS TutorialTailwind CSSalpinejsAstro Share this