Componentmedia0.99 KB gzipZero dependencies

VolumeSlider

Vertical or horizontal slider with fill animation, mute toggle, and ARIA roles

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add volume-slider

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { VolumeSlider } from "@/components/ui/volume-slider" <VolumeSlider value={0.7} onValueChange={setVolume} />

Source code

volume-slider.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxvolume-slider.tsx129 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface VolumeSliderProps {  value?: number;  defaultValue?: number;  onValueChange: (value: number) => void;  orientation?: "horizontal" | "vertical";  className?: string;} export function VolumeSlider({  value: controlledValue,  defaultValue = 0.7,  onValueChange,  orientation = "horizontal",

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { VolumeSlider } from "@/components/ui/volume-slider"; <VolumeSlider />
PropTypeDescription
valuenumberControlled value.
defaultValuenumberInitial value when uncontrolled. (Default: 0.7)
onValueChange(value: number) => voidCallback invoked on value change.
orientation"horizontal" | "vertical"Layout and keyboard navigation axis. (Default: "horizontal")
classNamestringOptional Tailwind or custom CSS classes merged with component styles.