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

[docs] Provide a hook or function we can dynamic inject our custom theme options #41391

Closed
Vxee opened this issue Mar 7, 2024 · 2 comments
Closed
Labels
docs Improvements or additions to the documentation support: docs-feedback Feedback from documentation page support: Stack Overflow Please ask the community on Stack Overflow

Comments

@Vxee
Copy link

Vxee commented Mar 7, 2024

Related page

https://mui.com/material-ui/react-button/

Kind of issue

Other

Issue description

I created a couple of theme configurations that follow the official customize components style guidelines. These configurations are designed to enhance the visual consistency of components. I intend to develop a Chrome extension that incorporates these theme options. When activated, this extension will apply my custom theme, overriding the default Material-UI theme, particularly when browsing Material-UI documentation pages. This will allow users to immediately experience the updated style upon enabling the extension. Additionally, by sharing my theme configuration on GitHub, I hope to assist a wider audience. However, upon inspecting the MUI doc site's source code, I haven't found a direct method to dynamically inject my theme configuration. Given that the configuration is an object, one potential approach is to compile it before performing the injection.
image
image

Context

No response

Search keywords: chrome extension, dynamic inject theme

@Vxee Vxee added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Mar 7, 2024
@zannager zannager added the docs Improvements or additions to the documentation label Mar 7, 2024
@samuelsycamore samuelsycamore removed their assignment Mar 7, 2024
@ZeeshanTamboli
Copy link
Member

You can utilize createTheme to dynamically inject your custom theme. You can also access your custom theme using the useTheme hook.

@ZeeshanTamboli ZeeshanTamboli added support: Stack Overflow Please ask the community on Stack Overflow and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 29, 2024
Copy link

👋 Thanks for using our open-source projects!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support with Material UI please check out https://mui.com/material-ui/getting-started/support/. Thanks!

If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation support: docs-feedback Feedback from documentation page support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

5 participants