# Slider: Steps and format

> `step` snaps the value, `largeStep` sets the Page Up and Shift + arrow jump, and `format` formats every number the slider shows or announces.

Example: https://hextaui.com/docs/slider/examples/steps
Component docs: https://hextaui.com/docs/slider.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/slider-steps.json
```

This adds `components/examples/slider/steps.tsx` with the Slider component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/slider/steps.tsx"
import { Slider, SliderLabel, SliderValue } from "@/components/ui/slider"

export function SliderSteps() {
  return (
    <Slider
      defaultValue={1}
      min={0.5}
      max={2}
      step={0.25}
      largeStep={0.5}
      format={{ minimumFractionDigits: 2 }}
      className="max-w-xs"
    >
      <SliderLabel>Playback speed</SliderLabel>
      <SliderValue />
    </Slider>
  )
}
```

## Props in this example

### Slider

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `number \| number[]` | – |  |
| `min` | `number` | `0` |  |
| `max` | `number` | `100` |  |
| `step` | `number` | `1` |  |
| `largeStep` | `number` | `10` |  |
| `format` | `Intl.NumberFormatOptions` | – |  |
| `className` | `string \| (state) => string` | – |  |

## More Slider examples

- [Sizes](https://hextaui.com/docs/slider/examples/sizes.md)
- [Range](https://hextaui.com/docs/slider/examples/range.md)
- [Value bubble](https://hextaui.com/docs/slider/examples/value-bubble.md)
- [Controlled](https://hextaui.com/docs/slider/examples/controlled.md)
- [Vertical](https://hextaui.com/docs/slider/examples/vertical.md)
- [With icons](https://hextaui.com/docs/slider/examples/icons.md)
- [Disabled](https://hextaui.com/docs/slider/examples/disabled.md)
- [Long labels](https://hextaui.com/docs/slider/examples/long-label.md)
- [Right to left](https://hextaui.com/docs/slider/examples/rtl.md)
