ComponentsControls

VolumeControl

A customizable slider that allows users to adjust video volume interactively, integrated with the video player's state and theme.

Usage

import { VolumeControl } from 'react-native-video-toolkit';
import React from 'react';

const MyVolume = () => {
  return <VolumeControl />;
};

Props

PropTypeRequiredDefaultDescription
orientation'horizontal' | 'vertical'No'horizontal'Orientation of the slider (horizontal or vertical).
widthnumberNo100Width of the slider (applies when orientation="horizontal").
heightnumberNo4Height of the slider track.
thumbWidthnumberNo12Width of the draggable thumb.
trackColorstringNoTheme secondaryColor of the inactive track section.
progressColorstringNoTheme primaryColor of the active track section.
styleStyleProp<ViewStyle>NoOptional styles for the container.

Examples

Default VolumeControl

import { VolumeControl } from 'react-native-video-toolkit';

<VolumeControl />;

Vertical Slider

import { VolumeControl } from 'react-native-video-toolkit';

<VolumeControl orientation="vertical" height={120} width={6} />;

Custom Size & Style

import { VolumeControl } from 'react-native-video-toolkit';

<VolumeControl width={150} height={6} thumbWidth={16} style={{ marginVertical: 10 }} />;

  • Volume values range from 0 (muted) to 100 (max).
  • The control calls setVolume(newVolume) automatically.
  • renderBubble is disabled by default (no value tooltip) to keep the UI minimal.