Bootstrap Dark Theme in Blazor WASM

Prathamesh Shende 441 Reputation points
2021-09-27T15:23:46.733+00:00

I have two theme of default bootstrap theme and dark theme of bootstrap
https://bootswatch.com/default/
https://bootswatch.com/darkly/

when I set to light then default theme will run. When dark it should use darkly dark theme.

So how to do this. The css will consume in index.html page of blazor wasm. So how i switch to dark and light theme.

Developer technologies .NET Blazor
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-09-28T07:20:41.703+00:00

    Hi @Prathamesh Shende ,

    According to your description, I suggest you could try to modify the CSS style reference by using the jquery inside the wwwroot's index.html file.

    More details, you could refer to below codes:

    t7gtt.png

    Result:

    gAOg8.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.