[slider] Arbitrarily restrict the possible values of the slider
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
In `@mui/base` the `marks` and `step` props were used together to restrict the possible values of the slider to some arbitrary numbers like this:
```jsx
```
([Here](https://v6.mui.com/base-ui/react-slider/#css-DiscreteSliderValues.tsx) is a full demo from the docs)
However it doesn't make sense to have `marks`, which should be only about the visual marks, dictate the step.
We decided to redesign this feature using the component-per-node API, e.g.:
```jsx
```
- If any `RestrictedValue` component is present, the `step` prop should be ignored
- The `RestrictedValue` component could render a span with some minimal positioning styles
Contributor guide
Assessment
This issue has not been assessed yet.