gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.4k stars 2.52k forks source link

Implement Variants for UI Components #1844

Closed freddyaboulton closed 1 year ago

freddyaboulton commented 2 years ago

We should provide variants for common UI components to enable users to create more customized user interfaces. Example variants for the text box could be "warning", "error".

I think what would be preferable is a series of 'variants' for the textbox (which come with a set of background + text colors) and then when we do theming, allow these variants to be 'themed' along with everything else. This way we can provide the ability to create 'stand out' boxes (for things like asides, warnings, errors, etc) but still ensure that they work with our existing design.

Where possible, I'd like us to control things like colors, spacing, etc via theming so that users don't need to put on a designer hat in order to create the UIs the want (other than for layouts) but can drop down and make those modification where necessary with themes.

Originally posted by @pngwn in https://github.com/gradio-app/gradio/issues/1698#issuecomment-1175979199

abidlabs commented 1 year ago

Is this still a relevant issue, given the new theming work? cc @pngwn

pngwn commented 1 year ago

This isn't really a realistic option, we can't know how many variants users would need and doing this for every component seems excessive. I have another idea, will create an issue.