---
title: "Discussion on \"Implementing Dark Theme in a React App with Vite, TypeScript, and Tailwind CSS\" | Hashnode"
description: "Discussion on \"Implementing Dark Theme in a React App with Vite, TypeScript, and Tailwind CSS\". A step-by-step guide to setting up a dark theme in your React application using Vite as the build tool, TypeScript for type safety, and Tailwind CSS."
url: "https://hashnode.com/posts/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css/64a1c4e486b0d0503dbdc07e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Implementing Dark Theme in a React App with Vite, TypeScript, and Tailwind CSS](https://heyitsanmolj.hashnode.dev/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css?utm_source=hashnode&utm_medium=feed)

A step-by-step guide to setting up a dark theme in your React application using Vite as the build tool, TypeScript for type safety, and Tailwind CSS.

Jul 2, 2023 · 12 min read · heyitsanmolj.hashnode.dev  
Read the article

-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#tailwind-css](https://hashnode.com/tag/tailwind-css)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)

## Written by

[Anmol Jhamb](https://hashnode.com/@heyitsanmolj)

@heyitsanmolj · Gurgaon, India

  
[View profile](https://hashnode.com/@heyitsanmolj)

## Responses 2

Markdown supported · ⌘↵ to post

[Ramalakshmanan](https://hashnode.com/@srlaxman1497)

[Jan 19, 2024](https://hashnode.com/posts/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css/64a1c4e486b0d0503dbdc07e/comment/65aa58ae7e222ca4260e8db0)

Thanks for the article. was really helpful. Just wanted to highlight a thing. I was encountering one minor issue the second useffect was setting the theme to light whenever we refreshed the app. I guess this was due to React.StrictMode

[Anmol Jhamb](https://hashnode.com/@heyitsanmolj)

[Jan 19, 2024](https://hashnode.com/posts/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css/64a1c4e486b0d0503dbdc07e/comment/65aa58ae7e222ca4260e8db0#reply-65aa599deb2a4eff769ab43f)

OH, that's right! Sorry, I seemed to have forgotten to mention that fact. I hope everything is working as expected now! Feel free to ask if there are any other issues.

[Abhay Singh Rathore](https://hashnode.com/@abhaysinghr1)

[Jul 3, 2023](https://hashnode.com/posts/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css/64a1c4e486b0d0503dbdc07e/comment/64a23e308db091c401036341)

Great tutorial! Implementing a dark theme in a React app using Vite, TypeScript, and Tailwind CSS is definitely a useful feature to enhance the user experience.

[Anmol Jhamb](https://hashnode.com/@heyitsanmolj)

[Jul 3, 2023](https://hashnode.com/posts/implementing-dark-theme-in-a-react-app-with-vite-typescript-and-tailwind-css/64a1c4e486b0d0503dbdc07e/comment/64a23e308db091c401036341#reply-64a2524a8db091c401036566)

Thank You!!
