Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Examples
  • Audio settings
  • Control sizes
  • Ranges and orientation
  • Permissions and validation
  • Ticks and thumb values
  • Recommendations
  • Usage boundaries
  • API reference

Forms

Slider

Selects numeric values or ranges along a bounded track.

idle

Usage

import { Slider } from "@mizen-labs/ui";

Examples

Audio settings

Adjust playback volume with the keyboard or pointer.

Control sizes

Ranges and orientation

Permissions and validation

Ticks and thumb values

Optional ticks follow step. Values can appear inside the thumb or above the track.

Recommendations

GuidancePractice
Do

Show the current value and units. Give each thumb a name when selecting a range.

Do

Use getAriaLabel to name each thumb in a range.

Usage boundaries

GuidanceBoundary
Scope

Use Number Field when exact entry matters more than relative adjustment. Sliders need meaningful bounds.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
valuenumber | readonly number[]—Controlled value of the slider.
defaultValuenumber | readonly number[]—Initial uncontrolled value of the slider.
minnumber0Minimum allowed value.
maxnumber100Maximum allowed value.
stepnumber1Stepping interval for value changes.
orientation"horizontal" | "vertical""horizontal"Axis orientation of the slider track.
disabledbooleanfalsePrevents interaction and applies disabled styling.
invalidbooleanfalseIndicates validation failure.
size"sm" | "default" | "lg""default"Visual size variant affecting track thickness and thumb dimensions.
onValueChange(value: number | readonly number[], eventDetails: SliderPrimitive.Root.ChangeEventDetails) => void—Callback fired when the slider value changes.
onValueCommitted(value: number | readonly number[], eventDetails: SliderPrimitive.Root.CommitEventDetails) => void—Callback fired when a value change is committed.
getAriaLabel(index: number) => string—Function deriving accessible names for individual thumbs by index.
SliderSliderProps"div"Root slider container coordinating values, context, and thumb anatomy.
SliderControlSliderControlProps"div"Interactive layout wrapper managing track positioning and touch targets.
SliderTrackSliderTrackProps"div"Geometric track along which the thumbs and indicator move.
SliderIndicatorSliderIndicatorProps"div"Visual fill bar representing selected progress or range span.
SliderThumbSliderThumbProps"div"Movable handle supporting pointer and keyboard value adjustment.
SliderLabelSliderLabelProps"label"Accessible label bound to the slider control.
SliderValueSliderValueProps"output"Formatted text representation of the current slider value.
SliderPrimitivetypeof BaseSlider—Low-level Base UI slider primitive namespace.
ticksbooleanfalseShow dots at step intervals. Native step snaps pointer and keyboard changes.
thumbValuebooleanfalseShow each formatted value inside its thumb. Uses format and locale.
thumbAlignment"edge" | "center" | "edge-client-only""edge"Keep thumbs inside track edges by default.
childrenReactNode—Content appears above the default control. Explicit SliderControl children replace default anatomy.
localeIntl.LocalesArgument"en-US"Stable formatting locale for server and client hydration. Pass an explicit locale for translated values.
PreviousSelectNextSwitch

Adjust from 0 to 100 percent with the arrow keys.

Current level: 50%

Dual thumbs define lower and upper boundaries.

Vertical orientation with rotated geometry.

Temporarily unavailable for user interaction.

Value exceeds permitted threshold.

Disabled styling takes precedence.

Dots follow step. Drag or use arrow keys to snap between them.

100%
50