Skip to content

Number input

A stepper: a numeric input between decrement and increment buttons. Respects min, max and step; hold to repeat.

CSS + mian.js JSON Markdown Registry item

Quantity

Decimal step

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/number-input.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-numberWrapper.
[data-mn-step="-1" | "1"]The two buttons.

Accessibility

  • The input stays a native number input; ArrowUp and ArrowDown step it. The buttons are skipped by Tab to avoid three stops for one value.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page