Repository navigation
Conversation
PR Analysis Report📚 Storybook PreviewNew ComponentsSlider
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found. XDSSlider - 1 issue(s)
Component PreviewsIncludes interactive hover previews as animated GIFs. XDSSliderDefaultScreenshot: Interaction Preview: (view video) Run RangeScreenshot: Interaction Preview: (view video) Run With MarksScreenshot: Interaction Preview: (view video) Run Custom StepScreenshot: Interaction Preview: (view video) Run With Format ValueScreenshot: Interaction Preview: (view video) Run DisabledScreenshot: Interaction Preview: (view video) Run Vertical OrientationScreenshot: Interaction Preview: (view video) Run With StatusScreenshot: Interaction Preview: (view video) Run All VariationsScreenshot: Interaction Preview: (view video) Run Generated by PR Enrichment workflow | Storybook | View full report |
|
Slide container has 28px height despite the contents being 20px. We probably shouldn't hardcode that height since we're also applying another 4px margin on the status messages afterwards which makes slider + status appear to ahve 8px between. |
|
Slider thumb in dark mode is difficult to see. Will likely want to use the popover background instead of the card/surface. |
|
Let's make sure slider follows the input guidance and convention for props (ex. description, etc). |
Implements slider with: - Discriminated union: number (single) vs [number, number] (range) - Pointer-based drag with setPointerCapture - Full keyboard support (arrows, page up/down, home/end) - Value display modes: tooltip, text, none - Marks with optional labels - formatValue for custom value formatting - Follows input family conventions (label, status, etc.) Closes #37
Add left: 50% for horizontal tooltip and top: 50% for vertical tooltip so they center correctly relative to the thumb element.
Replace manual tooltip positioning with XDSTooltip component which
handles centering via CSS anchor positioning. Removes custom tooltip
styles and thumb hover/focus/active state tracking — XDSTooltip
manages visibility on hover and focus automatically.
- delay={0} for immediate show
- focusTrigger='always' for keyboard interaction
- placement='above' (horizontal) or 'before' (vertical)
1. Track container height: Remove extra 8px padding (was THUMB_SIZE+8, now THUMB_SIZE). Fixes excessive spacing between slider and status. 2. Thumb dark mode: Use --color-popover instead of --color-surface for better visibility in dark mode. 3. Use XDSField wrapper: Replace manual XDSFieldLabel + description + XDSFieldStatus with XDSField, matching TextInput/Selector pattern. Status messages now use attached variant (directly below track).
- Thumb uses --color-accent background (matching filled track) with a --color-surface inner dot, matching the internal slider design - Disabled thumb uses --color-deemphasized (gray) - Hover state uses color-mix for accent tint - Focus outline via :focus-within on the thumb div — shows 2px solid --color-focus-outline with 2px offset on keyboard focus - Removed elevation shadow (replaced by accent color design)
Revert from XDSField (attached status) to XDSFieldLabel + XDSFieldStatus with variant='detached'. The slider track isn't a bordered input box, so detached status is the right pattern (matching CheckboxInput/Switch). The previous gap issue was from the container height, not the status variant.
- Remove inner dot from thumb — now solid accent color as designed - Fix vertical thumb position: use translate(-50%, 50%) instead of translate(-50%, -50%) for bottom-positioned elements so thumb centers correctly on its track position - Remove unused display:flex/alignItems/justifyContent from thumb
Replace manual XDSFieldLabel + XDSFieldStatus composition with XDSField wrapper using the new statusVariant prop.
* Add XDSSlider component with single and range support Implements slider with: - Discriminated union: number (single) vs [number, number] (range) - Pointer-based drag with setPointerCapture - Full keyboard support (arrows, page up/down, home/end) - Value display modes: tooltip, text, none - Marks with optional labels - formatValue for custom value formatting - Follows input family conventions (label, status, etc.) Closes #37 * Fix tooltip centering above slider thumb Add left: 50% for horizontal tooltip and top: 50% for vertical tooltip so they center correctly relative to the thumb element. * Use XDSTooltip for slider value display Replace manual tooltip positioning with XDSTooltip component which handles centering via CSS anchor positioning. Removes custom tooltip styles and thumb hover/focus/active state tracking — XDSTooltip manages visibility on hover and focus automatically. - delay={0} for immediate show - focusTrigger='always' for keyboard interaction - placement='above' (horizontal) or 'before' (vertical) * Address PR feedback: container height, thumb color, XDSField wrapper 1. Track container height: Remove extra 8px padding (was THUMB_SIZE+8, now THUMB_SIZE). Fixes excessive spacing between slider and status. 2. Thumb dark mode: Use --color-popover instead of --color-surface for better visibility in dark mode. 3. Use XDSField wrapper: Replace manual XDSFieldLabel + description + XDSFieldStatus with XDSField, matching TextInput/Selector pattern. Status messages now use attached variant (directly below track). * Fix: use valid LayerPlacement 'start' instead of 'before' * Update slider thumb to accent color with inner dot + focus outline - Thumb uses --color-accent background (matching filled track) with a --color-surface inner dot, matching the internal slider design - Disabled thumb uses --color-deemphasized (gray) - Hover state uses color-mix for accent tint - Focus outline via :focus-within on the thumb div — shows 2px solid --color-focus-outline with 2px offset on keyboard focus - Removed elevation shadow (replaced by accent color design) * Use detached status pattern for slider Revert from XDSField (attached status) to XDSFieldLabel + XDSFieldStatus with variant='detached'. The slider track isn't a bordered input box, so detached status is the right pattern (matching CheckboxInput/Switch). The previous gap issue was from the container height, not the status variant. * Fix slider: solid accent thumb, fix vertical positioning - Remove inner dot from thumb — now solid accent color as designed - Fix vertical thumb position: use translate(-50%, 50%) instead of translate(-50%, -50%) for bottom-positioned elements so thumb centers correctly on its track position - Remove unused display:flex/alignItems/justifyContent from thumb * Use XDSField with statusVariant='detached' for Slider Replace manual XDSFieldLabel + XDSFieldStatus composition with XDSField wrapper using the new statusVariant prop.
* Add XDSSlider component with single and range support Implements slider with: - Discriminated union: number (single) vs [number, number] (range) - Pointer-based drag with setPointerCapture - Full keyboard support (arrows, page up/down, home/end) - Value display modes: tooltip, text, none - Marks with optional labels - formatValue for custom value formatting - Follows input family conventions (label, status, etc.) Closes #37 * Fix tooltip centering above slider thumb Add left: 50% for horizontal tooltip and top: 50% for vertical tooltip so they center correctly relative to the thumb element. * Use XDSTooltip for slider value display Replace manual tooltip positioning with XDSTooltip component which handles centering via CSS anchor positioning. Removes custom tooltip styles and thumb hover/focus/active state tracking — XDSTooltip manages visibility on hover and focus automatically. - delay={0} for immediate show - focusTrigger='always' for keyboard interaction - placement='above' (horizontal) or 'before' (vertical) * Address PR feedback: container height, thumb color, XDSField wrapper 1. Track container height: Remove extra 8px padding (was THUMB_SIZE+8, now THUMB_SIZE). Fixes excessive spacing between slider and status. 2. Thumb dark mode: Use --color-popover instead of --color-surface for better visibility in dark mode. 3. Use XDSField wrapper: Replace manual XDSFieldLabel + description + XDSFieldStatus with XDSField, matching TextInput/Selector pattern. Status messages now use attached variant (directly below track). * Fix: use valid LayerPlacement 'start' instead of 'before' * Update slider thumb to accent color with inner dot + focus outline - Thumb uses --color-accent background (matching filled track) with a --color-surface inner dot, matching the internal slider design - Disabled thumb uses --color-deemphasized (gray) - Hover state uses color-mix for accent tint - Focus outline via :focus-within on the thumb div — shows 2px solid --color-focus-outline with 2px offset on keyboard focus - Removed elevation shadow (replaced by accent color design) * Use detached status pattern for slider Revert from XDSField (attached status) to XDSFieldLabel + XDSFieldStatus with variant='detached'. The slider track isn't a bordered input box, so detached status is the right pattern (matching CheckboxInput/Switch). The previous gap issue was from the container height, not the status variant. * Fix slider: solid accent thumb, fix vertical positioning - Remove inner dot from thumb — now solid accent color as designed - Fix vertical thumb position: use translate(-50%, 50%) instead of translate(-50%, -50%) for bottom-positioned elements so thumb centers correctly on its track position - Remove unused display:flex/alignItems/justifyContent from thumb * Use XDSField with statusVariant='detached' for Slider Replace manual XDSFieldLabel + XDSFieldStatus composition with XDSField wrapper using the new statusVariant prop.

Implements the slider component per the spec in #37.
Features
value: numberfor simple value selectionvalue: [number, number]for min/max range selectionDesign decisions
onChangeEnd(notonChangeSettled) — most common name (React Aria, Mantine)min/max(notminValue/maxValue) — corpus standardisLabelHiddendefaults tofalse— accessibility-first (internal defaulted totruefor backward compat)statusobject — matches input familyFollows
.context/decisions/input-props-convention.mdCloses #37