# Slider

Draggable input for selecting numeric values within a range

## Example[​](#example "Direct link to Example")

<!-- -->

```tsx
import { cn, Slider } from "@databricks/appkit-ui/react"

type SliderProps = React.ComponentProps<typeof Slider>

export default function SliderExample({ className, ...props }: SliderProps) {
  return (
    <Slider
      defaultValue={[50]}
      max={100}
      step={1}
      className={cn("w-[60%]", className)}
      {...props}
    />
  )
}

```

## Slider[​](#slider-1 "Direct link to Slider")

Draggable input for selecting numeric values within a range

**Source:** [`packages/appkit-ui/src/react/ui/slider.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/slider.tsx)

### Props[​](#props "Direct link to Props")

| Prop                    | Type                          | Required | Default | Description |
| ----------------------- | ----------------------------- | -------- | ------- | ----------- |
| `name`                  | `string`                      |          | -       | -           |
| `disabled`              | `boolean`                     |          | -       | -           |
| `orientation`           | `enum`                        |          | -       | -           |
| `dir`                   | `enum`                        |          | -       | -           |
| `min`                   | `number`                      |          | -       | -           |
| `max`                   | `number`                      |          | -       | -           |
| `step`                  | `number`                      |          | -       | -           |
| `minStepsBetweenThumbs` | `number`                      |          | -       | -           |
| `value`                 | `number[]`                    |          | -       | -           |
| `defaultValue`          | `number[]`                    |          | -       | -           |
| `onValueChange`         | `((value: number[]) => void)` |          | -       | -           |
| `onValueCommit`         | `((value: number[]) => void)` |          | -       | -           |
| `inverted`              | `boolean`                     |          | -       | -           |
| `form`                  | `string`                      |          | -       | -           |
| `asChild`               | `boolean`                     |          | -       | -           |

### Usage[​](#usage "Direct link to Usage")

```tsx
import { Slider } from '@databricks/appkit-ui';

<Slider /* props */ />

```
