Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark/light theme toggle to default themes #1641

Closed
cspotcode opened this issue Jul 30, 2021 · 7 comments
Closed

Add dark/light theme toggle to default themes #1641

cspotcode opened this issue Jul 30, 2021 · 7 comments
Labels
enhancement Improved functionality

Comments

@cspotcode
Copy link
Contributor

Search Terms

theme

Problem

These days, docsites often have a toggle to switch between light and dark themes, and they default to matching the OS's theme preference.

Suggested Solution

Colors from here: https://github.com/rockerBOO/typedoc-default-themes-dark
Toggle UI via https://github.com/GoogleChromeLabs/dark-mode-toggle
And ask Futuristick to give it their frontend polish and make it pretty.

@cspotcode cspotcode added the enhancement Improved functionality label Jul 30, 2021
@Gerrit0 Gerrit0 added this to To Do in Version 0.22 Aug 1, 2021
@Rami-Sabbagh
Copy link

I really like TypeDoc and using it for many of my projects, and it would be very cool to have a dark mode.
As my own libraries documentation websites kill me at night 😬

@furkanarabaci
Copy link

Yes please, would be awesome!

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 4, 2021

Will be available through typedoc@beta shortly - just need to fix a few more issues.

image

image

image

@Gerrit0 Gerrit0 moved this from To Do to In Progress in Version 0.22 Sep 4, 2021
@Gerrit0 Gerrit0 moved this from In Progress to Done in Version 0.22 Sep 5, 2021
@aaclayton
Copy link

Is there a way to suggest the default theme that should be used? Currently the default for new users is "OS", but if I wanted to have the default theme prefer dark by default, is it possible?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 19, 2022

#1840 (comment)

@aaclayton
Copy link

aaclayton commented Apr 19, 2022

Thanks, this isn't quite what I'm looking for because I'm not wanting to force all users to have a specific theme, but rather to change the default for a user who has not yet selected a preference to be "Dark" (desired default) instead of "OS" (current default). I can play with this plugin idea and likely accomplish it via a similar approach, unless that alters your answer.

It would be a nice thing for the default theme to expose as a configuration option I think.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 19, 2022

Re-reading my linked post... that's kind of confusing, but your desired behavior is what that plugin does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
No open projects
Development

No branches or pull requests

5 participants