Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

tailwind css dark mode

<div class="bg-white dark:bg-gray-800">
  <h1 class="text-gray-900 dark:text-white">Dark Mode!!</h1>
  <p class="text-gray-600 dark:text-gray-300">
    Example Text
  </p>
</div>

<script>
  // Change in Tailwinds Config.
  module.exports = {
  darkMode: 'media',
}
</script>
Source by tailwindcss.com #
 
PREVIOUS NEXT
Tagged: #tailwind #css #dark #mode
ADD COMMENT
Topic
Name
4+3 =