# Slider URL: /components/slider Source: https://github.com/daangn/seed-design/blob/dev/docs/content/components/slider.mdx A component that allows selecting and entering one or two values within a specified range. Slider can be used within a Field to be used as a Slider Field. ## Anatomy ![Composed of Value Indicator (Optional), Handle, Track (Active, Inactive), Steps, Marker.]() ![Example showing Value Indicator displayed in Active state]() Slider is composed of Track (Active, Inactive), Handle, Steps, and Marker. ## Properties ### Value ![Value Property]() Number of handles changes based on the selected Value. | Value type | Description | | ---------- | -------------------------- | | **Single** | Can select a single value. | | **Range** | Can select two values. | ### State ![State]() | State | Description | | ------------ | ------------------------------------------------------------------------ | | **Enabled** | Standard state where Slider is ready to operate. | | **Active** | The moment user is currently clicking (touching) or dragging the Handle. | | **Disabled** | Slider is visible but completely non-interactive. | ### Tick Mark property Tick Mark can use one of two modes depending on usability. ![Tick Mark property]() #### Continuous mode: Tick Mark for visual guide In continuous mode, tick marks can be provided as reference points so users can easily identify value position. #### Discrete mode: Tick Mark for Snap In discrete mode, tick marks represent the only values users can select (Steps). To display this visually, discrete mode has much larger Tick Marks than continuous mode. ![Count]() Tick Mark can express 2-5 steps total. ### Markers Property ![Markers Property example]() Markers convey Tick Mark information. Count can be set to match steps, and when showing only minimum and maximum values, it is expressed as count 2. ### Active Track ![Active Track]() Active Track shows the path the handle has traveled from start to current position and can be shown or hidden based on user preference. By default, Active Track is shown to visually and clearly convey the size of selected value or degree of progress. When selecting a specific value itself is important, hide Active Track to emphasize the selected value. ## Guidelines ### Slider touch target ![Slider touch target example]() | Touch Target | Description | | ------------ | --------------------------------------------------------------------------------------------------- | | **Handle** | The primary touch target. User clicks and drags to finely adjust value. | | **Track** | The entire track path where handle moves is also a touch target. Tap jump moves to the tapped area. | ### Drag ![Slider Drag behavior example]() Values can be selected through various actions in Slider. Basically, drag Handle to select value. ### Tap jump ![Slider Tap jump behavior example]() ![Slider Tap jump behavior example]() Tapping a desired point on the track moves the handle to that location and selects value. | Mode | Behavior | | ----------------------- | ---------------------------------------------------------------------------------------------- | | **Continuous** | In a Slider from 0 to 100, if user clicks 73% point of track, thumb moves to exactly value 73. | | **Restricted movement** | Auto-corrects (rounds) to nearest Step from clicked location and snaps. | ### Providing steps appropriate for situation ![Providing steps appropriate for situation]() ![Providing steps appropriate for situation]() Slider handles continuous values by default, but should decide whether to provide discrete steps that intentionally restrict movement based on the nature of values users must select. | Mode | Description | Usage example | | ----------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | | **Continuous** | Standard Slider that moves smoothly across track. | Subjective and continuous values like volume, brightness | | **Restricted movement** | Increases/decreases only in set units; cannot select values outside set steps. | Star rating (1-5), quantity (10, 20, 30), discount rate (5% increments) | ### Providing reasonable defaults ![Example of providing reasonable defaults]() Reasonable Default is the initial value of Slider pre-set when users enter a page or encounter a component for the first time. This value aims to reduce user effort and prevent mistakes by providing the safest, most typical, or most recommended state without additional user action. ### Clearly displaying current value ![Clearly displaying current value]() Clearly displaying current value is important for recognizing that the system operates as intended, so it is good to use Value indicator that shows current value when Active. ### Preventing Value Indicator overflow ![Example of preventing Value Indicator overflow]() When Thumb reaches both ends of track, Value Indicator is repositioned inward so it does not exceed the area. ## Specification ### Slider Component spec (JSON): /rootage/components/slider.json ### Slider Tick Component spec (JSON): /rootage/components/slider-tick.json ### Slider Thumb Component spec (JSON): /rootage/components/slider-thumb.json