jjranalli/nightwind

Question

Closed this issue · 1 comments

Hi, I'm asking this here because I can't seem to find a better place to:

  1. I currently have a dark theme website, and I want to literally just invert the colors. If I install night-wind as is, will it just invert the color palette?
  2. I noticed you just use {() => nightwind.toggle()} to toggle it, how can I force it to be on or off so I can throw it in a user settings page and not have to worry about it? (Basically can I use nightwind.toggle(true) and nightwind.toggle(false))

Hey there!

  1. Nightwind automatically inverts the color palette whenever you use Tailwindcss color classes such as bg-red-600. To do that, you just need to add [require("nightwind")] in tailwind.config.js. Please note that it doesn't invert every color, just those based on your tailwind.config.js file.
  2. Not at the moment, but you're free to build your own toggle depending on your needs. Check out helper.js if you want to understand what Nightwind functions are actually doing!

Let me know if you have any other questions :)