GWAN.DEV


Foundations

Icons

Actions

Buttons

Form Controls

Input

Text Area

Select Dropdown

Filter Dropdown

Checkbox

Radio Button

Switch

File Uploader

Color Picker

Multi Select

Search Input

Slider

OTP Input

Date Picker

Time Picker

Date Range Picker

Data Display

Table

Pagination

Progress Bar

Stat Card

Circular Progress

Navigation

Side Menu

Menu Bar

Tabs

Breadcrumb

Ellipsis

Content & Layout

Card

Divider

Banner

Carousel

Accordion

Timeline

Stepper

List

Overlays

Modal

Drawer

Popover

Command Palette

Dropdown Menu

Context Menu

Indicators

Tags

Chips

Badge

Avatar

Avatar Group

Tooltip

Skeleton

Spinner

Feedback

Snackbar

Alert

Callout

State

Slider

Playground
Actions
  1. Interact with the preview to see callbacks fire.
Content
number | [number, number]

Current value. Pass a [low, high] pair instead for a range with two thumbs.

Default—
40
string

Label above the track.

Default—
Appearance
boolean

Shows the value above the thumb while dragging.

Defaultfalse
SLIDER_SIZE

Track and thumb size.

DefaultSLIDER_SIZE.MD
Behaviour
number

Lowest value.

Default0
number

Highest value.

Default100
number

Increment between values.

Default1
boolean

Blocks dragging and dims the slider.

Defaultfalse
Events
(value: number | [number, number]) => void

Called with the new value, or [low, high] in range mode.

Default—
Logged in Actions
Advanced
string

Extra classes on the wrapper.

Default""
Usage
import { useState } from "react";
import { Slider } from "gwan-design-system";

const Example = () => {
  const [value, setValue] = useState(40);

  return (
    <Slider
      value={value}
      label="Volume"
      onChange={setValue}
    />
  );
};