-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Slider] Implement variant prop #27130
Comments
The Regarding the |
To have an overview of our application. It's dashboard editor, same concept as invision or photoshop. So we have a theme for the editor and one for the content (dashboard). We already have two different Themes with their variants but a single Theme type mapping. On top of that users can add new themes with their own variants dynamically. We allow users to define variants for each of our components (some of them are MUI ones). We are using MUI Theme. Somehow we want to be able to extend Slider the same way we can do with Buttons. Defining for example the pretto.fr customization as a variant ( https://next.material-ui.com/components/slider/#customized-sliders ). At run time we get the list of variants for each component. Does it makes sense to have different slider variants in an 'application' ? I would say no, but eventually customers will decide if they want or not to use this flexibility. It's a problem of consistency , nothing really important for us as what we are doing now is styling ( using styled ) Slider's parent div to allow variants (we could style directly Slider as well).
|
@mnajdova Due to this line https://github.com/mui-org/material-ui/blob/v5.2.7/packages/mui-material/src/Slider/Slider.js#L657 it seems it isn't possible to actually possible to create a new size |
I don't think having variant prop for Slider would work. Haven't seen a slider have more than one variants. It's better to push people to Experimented with Joy UI on this but it does not seem to be useful with the complexity it increases. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @david-ic3 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Material-UI : v5.0.0-beta.0 with Typescript
It's possible to add variants to Buttons as described in your documentation here.
Can't get this work with the Slider (compile error as variants is not a Slider prop).
Is this expected ?
The text was updated successfully, but these errors were encountered: