posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.31k stars 79 forks source link

Changing themes on created app #296

Closed sprenkamp closed 4 months ago

sprenkamp commented 2 years ago

Heya,

thanks for making this possible. I just started a new dashboarding project and decided to give py-shiny a go.

On question that came up is how to change the style of the created app?

In R this was done over the theme parameter within fluid page e.g. fluidPage(theme = shinytheme("cerulean")). I checked in https://github.com/rstudio/py-shiny/blob/main/shiny/ui/_page.py but cannot find the theme parameter. Is there currently a way to change the style of an application?

jcheng5 commented 2 years ago

Thanks for giving us a try! It is currently hardcoded but near the top of the list in terms of priorities IMHO.

cpsievert commented 4 months ago

Hi there, you might be interested in https://posit-dev.github.io/py-shinyswatch/ and/or the new ui.Theme() API. I'll close this issue since it seems we've addressed the feature request, but feel free to let us know what you think!