← All elements

Brightness Range Slider

by @admin · 0 views

<label class="br"><span aria-hidden="true">☼</span><input type="range" min="0" max="100" value="65" aria-label="Brightness"><span aria-hidden="true">☀</span></label>

About this slider

A chunky brightness control styled on a native range input, with sun icons and a gradient track.

How it works

A native range input is restyled with appearance: none, a gradient track and a round glowing thumb, with separate rules for WebKit and Firefox. Two sun symbols frame it. Because it is a real input, dragging, clicking and keyboard control come built in.

Ways to customise it

  • Change the track gradient.
  • Change the thumb size in both vendor rules.
  • Set min, max and value to your range.

Good to know

The input has an accessible label and a focus outline. Reading its value to dim something on the page requires script.

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More in Slider

View all →