Skip to content

Slider

A styled native range input with a filled track. Works without JS; mian.js paints the fill in WebKit.

CSS + mian.js JSON Markdown Registry item

With readout

60

Colours

Installation

Everything ships in one stylesheet and one small script. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">
<script src="https://mian.ro/dist/mian.js" defer></script>

Prefer to own the files? /r/slider.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-sliderOn an <input type="range">.
<output for>Optional live readout: mian.js keeps it in sync.

Accessibility

  • Native range semantics: arrow keys, Page Up/Down, Home/End. Label it and add aria-valuetext when the number needs a unit.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page