Repository navigation
fix(slider): fill the track at the range ends and center the grips - #843
Merged
Merged
Conversation
Base UI positions edge-aligned thumbs as a percentage of the control's full width, but the control's padding made the track narrower than that, and the indicator stopped at the thumb's center. Move the padding to a wrapper, stretch the indicator over the whole thumb, and center each grip in its thumb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
LGTM! |
commit: |
Contributor
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://nanda-slider-edge-fixes-kumo-docs.design-engineering.workers.dev (commit 2e842f1)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
mattrothenberg
approved these changes
Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
📐 Bundle SizeConsumer fixtures bundled against
npm tarball: 551 files, 1.50 MB packed, 6.96 MB unpacked.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes two layout bugs in the new
Slider(#836):Causes
thumbAlignment="edge", Base UI works out each thumb's position as a percentage of theSlider.Control's full width, padding included, then applies that percentage inside theSlider.Track. The control's 3px padding made the track 6px narrower, so thumbs landed slightly off at both ends.Changes
sliderVariants()) move fromSlider.Controlto a wrapperdiv. The control and track are now the same width, so the thumb positions match the pointer maths.pr-2(and-ml-2 pl-2for ranges) withbox-content!, so it covers whole thumbs: it fills the track at the max and is exactly one thumb wide at 0.box-contentis forced because unlayered* { box-sizing: border-box }resets, like the docs site's, would otherwise beat the utility.Validation
Measured in the docs at a 282px track:
The Slider unit tests (10), lint and format checks pass.
No new changeset:
Sliderhasn't been released yet, and.changeset/slider-component.mdalready covers it.🤖 Generated with Claude Code