[RFC][base-ui][Switch] The input component should be opt-in #40618
Labels
component: switch
This is the name of the generic UI component, not the React module!
package: base-ui
Specific to @mui/base
RFC
Request For Comments
What's the problem?
The docs and demos related to the Switch component include the hidden
checkbox
input. This is not a common pattern when building Switch components, and it might be confusing.What are the requirements?
Simplify the switch component and hook for the base use case.
What are our options?
Proposed solution
The input component should be opt-in, meaning:
useSwitch
hook should work without it. The input component is helpful for form submission so that I wouldn't remove it, but it's not a common enough use case to have it by default.Switch
component shouldn't include the input by defaultResources and benchmarks
Search keywords:
The text was updated successfully, but these errors were encountered: