Styling guide

Hello, newly introduced to Solara. I went through the tutorials and the gallery. Can some point me to any guides on customizing the look of Solara components? Thanks!
1 Reply
iisakkirotko
iisakkirotko6mo ago
Hey @Delip Rao! You can customize the style per component via the style argument (on those components where it exists), which gives the HTML element associated with that component the corresponding CSS styles. You can also use the solara.Style component to inject a <style> tag to the page with the styles you want, and apply those via classes argument to the component (again, on the components that support that). You can see here for some examples. You can also customize colours globally, using either solara.lab.theme (see here), or a theme.js file (see here). If you want to incorporate custom (non-colour) styles into all buttons in your app, for example, I'd suggest wrapping solara.Button to MyStyledButton, and using that throughout your app. Hopefully this is sufficient to get you started. Feel free to ask any followup questions that come up
Want results from more Discord servers?
Add your server