Components
Chat
Chat InputColors
Color AreaColor FieldColor PickerColor SliderColor SwatchColor Swatch PickerColor ThumbColor WheelDrag and drop
Drop ZoneForms
CheckboxCheckbox GroupFieldFormInput OTPInput PhoneNumber FieldRadio GroupSearch FieldSelection BoxTag FieldText FieldTextareaTypography
TypographyUtilities
Visually HiddenNext js
Next.js
Turning your Next.js app into a night owl? Follow this smooth guide to light up the dark mode magic.
Next Themes
Because you are using Next.js, you can use next-themes
to implement dark mode. And since you're using justd-icons
, you can use the IconSun
and IconMoon
icons.
Provider and Switcher
Next, you need to create a theme provider component. You can do it like this:
Loading source code...
Usage After that, you can use it in your root layout file like so:
Add suppressHydrationWarning to the html tag to avoid the hydration error. You can check the Next-Themes documentation for more information.