# Slider: With icons

> Place icons beside the slider in a flex row. The slider takes the remaining width.

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

## Add this example

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

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

## Source

```tsx title="components/examples/slider/icons.tsx"
import { IconVolume, IconVolume3 } from "@tabler/icons-react"

import { Slider } from "@/components/ui/slider"

export function SliderIcons() {
  return (
    <div className="flex w-full max-w-xs items-center gap-3 text-muted-foreground">
      <IconVolume3 className="size-4 shrink-0" aria-hidden />
      <Slider defaultValue={50} aria-label="Volume" />
      <IconVolume className="size-4 shrink-0" aria-hidden />
    </div>
  )
}
```

## Props in this example

### Slider

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `number \| number[]` | – |  |
| `aria-label` | `string` | – | Names the thumbs. |

## 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)
- [Steps and format](https://hextaui.com/docs/slider/examples/steps.md)
- [Controlled](https://hextaui.com/docs/slider/examples/controlled.md)
- [Vertical](https://hextaui.com/docs/slider/examples/vertical.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)
