Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Forms Form-associated

NumberInput <pm-number-input>

Number input with − / + steppers. Arrow keys step, Page Up/Down step ×10; min/max/step are validated natively.

Full screen

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/number-input'; </script> <pm-number-input label="Seats" value="3" min="1" max="50" hint="Up to 50 per team."></pm-number-input>

Sizes

Set with the size attribute; controls keep touch-sized targets on phones.

size="xs"
size="sm"
size="md"
size="lg"
size="xl"

States

Each state is one attribute.

Disabled
Read-only
Required
Error

Attributes

AttributeTypeDefaultDescription
decrease-label
prop: decreaseLabel
string—Name of the minus button (default "Decrease"), for another language.
increase-label
prop: increaseLabel
string—Name of the plus button (default "Increase").
minnumber—Lowest allowed value.
maxnumber—Highest allowed value.
stepnumber1Increment between allowed values.
placeholderstring—Hint text shown while empty (not a replacement for label).
hide-buttons
prop: hideButtons
booleanfalseHide the − / + buttons.
namestring—Form field name: the value is submitted under it.
valuestring—Current value (submitted with the form).
labelstring—Visible label (required for accessibility; use hide-label to visually hide it).
hintstring—Help text under the field, linked to it for screen readers.
errorstring—Custom error message. Setting it marks the control invalid.
size'xs' | 'sm' | 'md' | 'lg' | 'xl'—Control size.
requiredbooleanfalseThe form cannot be submitted until this has a value.
disabledbooleanfalseNot interactive and not submitted.
readonlybooleanfalseFocusable and submitted, but not editable.
hide-label
prop: hideLabel
booleanfalseHide the label visually; it stays the accessible name.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-inputonPmInputOn every value change while editing.
pm-changeonPmChangeWhen the value is committed.

CSS parts

PartDescription
::part(control)The native input.

Methods

stepBy(), checkValidity(), reportValidity(), validate(), focus()

Used in templates

OrdersBilling and invoicesProduct pageShopping cart