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

[feat] ability to change theme at runtime? #44470

Open
JounQin opened this issue Nov 19, 2024 · 2 comments
Open

[feat] ability to change theme at runtime? #44470

JounQin opened this issue Nov 19, 2024 · 2 comments
Assignees
Labels
customization: theme Centered around the theming features status: waiting for author Issue with insufficient information

Comments

@JounQin
Copy link

JounQin commented Nov 19, 2024

Summary

Is that possible to change theme at runtime? For example we need to sync our website's theme with our other websites which could be changed by users manually, so we need to fetch the theme first and then generate the theme at runtime.

Examples

No response

Motivation

No response

Search keywords: runtime theme

@JounQin JounQin added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 19, 2024
@zannager zannager added the customization: theme Centered around the theming features label Nov 19, 2024
@sai6855
Copy link
Contributor

sai6855 commented Nov 19, 2024

@JounQin In following demo, i've changed button's variant in theme at runtime. is this what you are looking for?

https://stackblitz.com/edit/react-jhvgqn?file=Demo.tsx

@sai6855 sai6855 added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 19, 2024
@DiegoAndai
Copy link
Member

Hey @JounQin! Thanks for the report.

Are you using Emotion of Pigment CSS as a styling engine? If it's Emotion, then @sai6855's example should work for you.

@DiegoAndai DiegoAndai assigned DiegoAndai and unassigned siriwatknp Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

5 participants