Dark/Light/System Theme on TanStack Start @DevLeonardo
Dark/Light/System Theme on TanStack Start  @DevLeonardo
Uploaded August 2025 | Updated November 2026, 4 days ago
A deep dive on how to manually manage the themes of your TanStack Start application. This example uses localStorage but on github you can also find the cookie approach.

Code: github.com/Balastrong/start-theme-demo

_______________________________
Subscribe to my newsletter: https://leonardomontini.dev/newsletter
Support my work: github.com/sponsors/Balastrong ❤️

Hit like and subscribe for more content! :D

You can also follow me on the other platforms:
Discord Community: discord.gg/bqwyEa6We6
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
Instagram: instagram.com/devbalastrong

_______________________________
TIMESTAMPS
00:00 Theme demo
00:24 Utility functions
02:55 Theme Provider & Context
03:48 Prevent FOUC
06:24 Always rely on CSS for initial load
07:44 More safety with TanStack Start
08:50 Validation with Zod
09:37 localStorage vs cookies approach
10:21 Code on GitHub & Hosted demo

#tanstack #start #theme
Dark/Light/System Theme on TanStack StartTanStack Router: Authenticated Routes (Guards)How well measure performance of our DevRel activitiesFantastic JSON Schemas and where to find themAstro Coding Session: Series feature on my blogTanStack Start: A Full-Stack React Framework but Client-FirstTanStack React Form: Basic Validation (with shadcn/ui & React)Copilot Chat writes Unit Tests for you!TanStack React Form: Advanced ValidationUsing Copilot Chat 2024 UpdatesYour next side project wont fail this time 💡Spot the Code Smell #09 - Indentation
Dev Leonardo |

Dark/Light/System Theme on TanStack Start

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER