# Slider Settings 1 - Volume control

> Volume Control.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/slider-slider-settings-1).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/slider-slider-settings-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/slider-slider-settings-1-light-43afbf51bfd7aa52.png
- Registry item: https://shadcnblocks.com/r/slider-slider-settings-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/slider-slider-settings-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `label`, `slider`

## Files

### `example/slider/slider-settings-1.tsx`

```tsx
"use client";

import { Volume2Icon } from "lucide-react";
import { useState } from "react";

import { Label } from "@/components/ui/label";
import { Slider } from "@/components/ui/slider";

export const title = "Volume Control";

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

  return (
    <div className="flex w-full max-w-md flex-col gap-2">
      <div className="flex items-center justify-between">
        <div className="flex items-center gap-2">
          <Volume2Icon className="size-4" />
          <Label htmlFor="slider">Volume</Label>
        </div>
        <span className="text-sm text-muted-foreground">{value[0]}%</span>
      </div>
      <Slider id="slider" onValueChange={setValue} value={value} />
    </div>
  );
};

export default Example;
```
