This message was deleted.
# infisical-feedback
s
This message was deleted.
😅 1
v
We actually used to have the dark mode website and then switched it to light mode 😄
w
Mines dark mode still?
j
I'm sure there's a Tailwinds toggle available to let people pick. I've been having the same internal debate about my upcoming website. For me, I have two main audiences: admins and developers, so I lean toward support both.
w
Ye I use it on my sites theres a useTheme hook from next-themes
Copy code
'use client'

import { Moon, Sun } from 'lucide-react'
import { useTheme } from 'next-themes'

import * as React from 'react'

import { Button } from '@/components/ui/button'

export function ThemeSwitcher() {
  const { setTheme, theme } = useTheme()

  return (
    <>
      <Button
        size="icon"
        className="fixed right-10 top-10 z-50"
        onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}
      >
        <Sun className="stroke-text hidden h-6 w-6 w500:h-4 w500:w-4 dark:inline" />
        <Moon className="stroke-text inline h-6 w-6 w500:h-4 w500:w-4 dark:hidden" />
        <span className="sr-only">Toggle theme</span>
      </Button>
    </>
  )
}