feat(slider): add Slider component - #836
Merged
Merged
Conversation
Adds a Slider built on Base UI's Slider for picking a number, or a range between two numbers. A recessed track holds a raised indicator with grip lines at its ends, each thumb's value shows in a badge below the track, and the minimum and maximum sit at either end. Supports sm and base sizes, Intl.NumberFormat formatting, and Base UI's value, step, and change props. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://nanda-deseng-2163-kumo-docs.design-engineering.workers.dev (commit 4859ed0)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
commit: |
Contributor
Contributor
|
I'm Bonk, and I've done a quick review of your PR. Posted 2 inline findings. Review notes
|
mattrothenberg
approved these changes
Oct 5, 2026
- Use rounded-md outer and rounded inner corners for the sm size. - Darken the thumb grip. - Align the value badge with the min and max labels. - Always show the value badge and range labels; remove showValue and showRange. - Honor a caller's thumbAlignment, keeping edge as the default. - Remove vertical orientation support. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2 of 4 tasks
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
Adds a
Slidercomponent for picking a number, or a range between two numbers, by dragging a thumb along a track. It's built on Base UI's Slider (already bundled at 1.8.0), sovalue,defaultValue,min,max,step,format,onValueChange,disabledand the rest are passed through.Props on top of Base UI's
label: rendered withSlider.Label, so it names the slider and its thumb.getAriaLabel: accessible name per thumb, for ranges or sliders without a visible label.size:"sm"(24px track) or"base"(32px track), exposed throughKUMO_SLIDER_VARIANTSandsliderVariants().Each thumb's value always shows in a brand badge below the track, and the minimum and maximum always show at either end. The slider is horizontal only, so
orientationis not accepted.Styles
bg-kumo-recessedwith aring-kumo-linering. Corners arerounded-lgoutside androunded-mdinside at the base size, androunded-mdandroundedatsm. The indicator is a raisedbg-kumo-basebar withshadow-smand a ring, inset 3px from the track border.thumbAlignmentdefaults to"edge", so the grips stay inside the track at the minimum and maximum. Callers can still override it.ring-kumo-focusring shows on keyboard focus. Dragging uses a grabbing cursor, and disabled sliders are dimmed.format/localeand applied to the badges, the range labels and the announced value. The badges and range labels arearia-hidden, because each thumb already announces its formatted value.Slideris generic over its value type, as Base UI'sRootis, soonValueChangereceives anumberfor a single value andreadonly number[]for a range.Wiring: component exports, the
components/sliderentry invite.config.tsandpackage.json, the registry category (Input), Base UI props inADDITIONAL_COMPONENT_PROPS(so they show in the props table), a docs page with eight demos, the sidebar nav and the home grid.The scaffolder's
vite.config.tsinjection didn't match the file's current indentation, so I added the entry by hand. ThePLOP_INJECT_COMPONENT_ENTRYpattern inplopfile.jsstill expects 8-space indentation.Validation
8 new Slider unit tests:
onValueChangeThe full kumo unit suite passes (1,428 tests).
tsc --noEmit(kumo and docs),vp lintandvp fmtare clean. The registry regenerates with all Slider props.I checked every demo on the docs page locally. The grips sit 6–8px inside the indicator, and nothing overlaps.
Reviews
bonk has reviewed the change
automated review not possible because: requesting human design review first; bonk can run on the PR afterwards.
Tests
Tests included/updated
Automated tests not possible - manual testing has been completed as follows:
Additional testing not necessary because:
🤖 Generated with Claude Code