© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
dataphysix

❔ Blazor: darkmode not working

Anyone familiar with the NDC talk 'Building beautiful Blazor apps with Tailwind CSS' by Chris Sainty? He shows a darkmode toggle. When pulling the git repo his example works as demonstrated. When implementing this myself I can't get this to work properly. In the dev tools html view I see the class being added to the html tag. But neither my theme changes or toggle moves. If I open the settings > appearance and set the theme on browser level my app changes theme and I see the toggle moving. My tailwind.config.js has the
darkmode: 'class'
darkmode: 'class'
line. I also added a
StateHasChanged()
StateHasChanged()
class to no avail. Any suggestions ?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

MudBlazor darkmode toggle not working
C#CC# / help
2y ago
Blazor Datagrid selection not working
C#CC# / help
8mo ago
Blazor Isolated CSS not working
C#CC# / help
17mo ago
Blazor StateHasChanged not working properly?
C#CC# / help
2y ago