---
title: "Discussion on \"How to add multiple themes to your website with CSS and JS\" | Hashnode"
description: "Discussion on \"How to add multiple themes to your website with CSS and JS\". I've been working on my portfolio website of late and wanted to add the \"theme switch\" where users get to select whether they want to view my website in dark mode or light mode. While working on that, I realized this can be extended to not just two, ..."
url: "https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf"
---

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

Discussion

# [How to add multiple themes to your website with CSS and JS](https://blog.tejanshrana.com/how-to-add-multiple-themes-to-your-websites?utm_source=hashnode&utm_medium=feed)

I've been working on my portfolio website of late and wanted to add the "theme switch" where users get to select whether they want to view my website in dark mode or light mode. While working on that, I realized this can be extended to not just two, ...

Feb 18, 2021 · 6 min read · blog.tejanshrana.com  
Updated Mar 2, 2021  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#theme](https://hashnode.com/tag/theme)

## Written by

[Tejansh Rana](https://hashnode.com/@TejanshRana)

@TejanshRana · Dublin, Ireland

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

Architecting, building, and deploying scalable enterprise applications.

To start with, I love building applications and every aspect of it. Right from the inception where the application is still an idea or a solution to a problem or at times, a non solution to a non problem, visualising it to be a full fledged application used by everyone on the planet, to designing the solution and actually building the application, I love every bit of it! Software development, thus, is beyond profession for me, and is more of an obsession. Since I started my career, I've had the opportunity to work with a wide range of technologies ranging from Java, Python, Springboot, Angular, React, Flutter, Scala, Docker, and AWS in domains like Telecom, Banking, and Insurance. With the ever evolving technologies in Software Development, I've also had the privilege to work on the three pillars of software architecture - Monoliths, Microservices, and Serverless. Currently, in my role as a Tech Lead, my responsibilities spread across Solution Architecture, Backend Development, and Cloud Architecture. My go to language and framework for backend development remains to be Java and Springboot with not so occasional stints in Python. I have also been working elaborately with AWS and docker and have a pretty good hands-on experience with it. I lead a team that comprises of some of the best Backend, Frontend, and DevOps Engineers. And over the course of 15 months, we have delivered Bank Of Ireland's digital insurance platform, New Ireland's Broker application which was one of the first Serverless Applications delivered to a financial institution in Ireland, and Arachas' digital insurance platform. I live by the motto "Learn, Build, Deploy" and thus in my free time, you would most likely see me learning something new - a coding language, a framework, an architecture pattern, a new tool for DevOps or automation or just solving a competitive programming challenge. I hope to be able to help other fellow developers or enthusiasts upskill or establish themselves in the industry through one on one help or through my blogs or workshops. In the rare occasion when I am not with my laptop, you would mostly find me in the park with my dog. Look forward to connect with you!

## Responses 3

Markdown supported · ⌘↵ to post

[Lucky Victory Success](https://hashnode.com/@LuckyVictory)

[Feb 25, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/603809b13b9c825a0b8aa7b1)

nice article,I love the way you declared js variables for almost everything.

[Tejansh Rana](https://hashnode.com/@TejanshRana)

[Feb 25, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/603809b13b9c825a0b8aa7b1#reply-603813953b9c825a0b8aa855)

Thank you :)

[John Francis Cortez](https://hashnode.com/@jfrancis)

[Feb 20, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/6030e24872a689446db3d8ff)

This is so AWESOME!

[Tejansh Rana](https://hashnode.com/@TejanshRana)

[Feb 20, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/6030e24872a689446db3d8ff#reply-6030e5bf72a689446db3d977)

Thanks [John Francis Cortez](https://hashnode.com/@jfrancis)! :)

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Feb 19, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/602f5a451591c5239ebdc53d)

I always wondered how you could add multiple themes (dark and light) to your website.

Thanks for this great article, [Tejansh Rana](https://hashnode.com/@TejanshRana)! 👏

[Tejansh Rana](https://hashnode.com/@TejanshRana)

[Feb 19, 2021](https://hashnode.com/posts/how-to-add-multiple-themes-to-your-websites/602eee6ebfecab23c3524ecf/comment/602f5a451591c5239ebdc53d#reply-602f7814df37823860fe2614)

Thanks [Catalin Pit](https://hashnode.com/@Catalinpit)! I’m glad you found this useful :)
