Skip to content
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 new API #216

Closed
Tracked by #10
colmtuite opened this issue Mar 21, 2024 · 0 comments · Fixed by #373
Closed
Tracked by #10

[Slider] Implement new API #216

colmtuite opened this issue Mar 21, 2024 · 0 comments · Fixed by #373
Assignees
Labels
component: slider This is the name of the generic UI component, not the React module!

Comments

@colmtuite
Copy link
Contributor

colmtuite commented Mar 21, 2024

ARIA Pattern.

<Slider.Root defaultValue={50}>
    <Slider.Output />
    <Slider.Control>
        <Slider.Track>
            <Slider.Indicator />
            <Slider.Thumb />
        </Slider.Track>
    </Slider.Control>
</Slider.Root>

Breaking Changes

  • Thumbs can no longer swap positions/be dragged past each other, the related disableSwap prop has been dropped
  • A new Control subcomponent is added to represent the click/touch area of the slider. Previously this component's functionality was implemented in the root, but it was introduced because Slider.Root in the new API is expected to contain the Output element and a label as well.
  • The Rail component which referred to the visible bar along which the thumb can move is now renamed to be the Track
  • The component representing the filled portion of the slider track is is renamed from Track to Indicator
  • Thumb's internal input element is no longer exposed (it used to be via slots.input)
  • The Mark component/slot, and the marks prop have been dropped
  • The step prop defaults to 1 and can no longer be null.
  • The ValueLabel slot/component and related features have been dropped. This design can be implemented using Tooltip as in this demo
  • The restricted values feature will be redesigned, and decoupled from any props related to the visual marks: [Slider] Arbitrarily restrict the possible values of the slider #412
  • The isRtl prop is replaced with direction: 'ltr' | 'rtl' for consistency
  • A new minStepsBetweenValues prop (default 0) is added to prevent thumb overlap
  • The scale prop is deprecated

Related issues

Each of these related issues should be considered when designing and implementing this new component. When this issue is resolved, these related issues should be closed.

Search keywords:

@colmtuite colmtuite added the component: slider This is the name of the generic UI component, not the React module! label Mar 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Mar 21, 2024
@colmtuite colmtuite assigned mj12albert and unassigned michaldudak Mar 27, 2024
@colmtuite colmtuite moved this from Backlog to In progress in Base UI Mar 27, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Base UI Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: slider This is the name of the generic UI component, not the React module!
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants