Mechanical
A mechanical slider has a knob connected to a cable or lever; as you move the knob back and forth, it pushes and pulls on the mechanism, moving it. A dash control on a car, for example, may have an air source control that slides horizontally, adjusting between the two extremes of fresh or recirculating air. A cable behind the dash moves a flapper valve that determines if the air comes from the outside, the passenger compartment or a mix of the two.
Resistive
Externally, electronic sliders appear the same as mechanical ones. Behind the control panel, however, the knob moves a contact across a strip of electrically resistive material. The slider has wired connections at the contact and at each end of the strip, so as you move the control from side to side, electricity flowing through the material sees a change in resistance. Audio mixing consoles, for example, use vertical sliders to control the volume of each input channel. A graphic equalizer also uses sliders to set the amount of boost or cut for every frequency band.
Optical
As with the resistive slider, an optical one is also electronic. Internally, an optical slider has a light source that shines through a transparent material marked with black lines. A light sensor on the other side of the transparent material picks up the changes in brightness, and a digital circuit counts the number of lines that go by. The mechanism is accurate and immune to dust as well having virtually no wear from friction. It is also inherently better-suited than a resistive slider to controlling the digital circuits found in modern equipment.
Virtual
Sliders make ideal graphical controls on computer screens, as you can easily adjust the position of a linear pointer with a mouse or a finger gesture on a touch screen. Virtual sliders exist as software control objects and come in many varieties. Simple onscreen controls have an image of a knob that moves horizontally or vertically along a picture of a slot. As you move the control, it changes a data setting for a particular item on the screen, such as the brightness control of a computer monitor. More sophisticated sliders let you scroll through a series of images, as with the Cover Flow feature of Apple̵7;s iTunes software.