// Generated by scripts/generate-showcase.mjs. Do not edit directly. page InputNumberDetail { layout = "showcase" state playground_size = ctx.url.searchParams.get("pg_size") ?? "md" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Input Number" state playground_name = ctx.url.searchParams.get("pg_name") ?? "default-quantity" state playground_value = ctx.url.searchParams.get("pg_value") ?? "1" state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "" state playground_type = ctx.url.searchParams.get("pg_type") ?? "number" state playground_min = ctx.url.searchParams.get("pg_min") ?? "0" state playground_max = ctx.url.searchParams.get("pg_max") ?? "99" state playground_step = ctx.url.searchParams.get("pg_step") ?? "1" state playground_disabled = ctx.url.searchParams.get("pg_disabled") ?? "false" state playground_required = ctx.url.searchParams.get("pg_required") ?? "false" state playground_class = ctx.url.searchParams.get("pg_class") ?? "" seo { title = "Input Number" description = "Theme-aware, responsive input number component." } view {
Advanced Forms component

Input Number

Theme-aware, responsive input number component.

13 props0 slots0 eventsTheme readyResponsive
Interactive playground

Configure Input Number

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<InputNumber
  size="md"
  name="default-quantity"
  value="1"
  min="0"
  max="99"
  step="1"
/>
Component props13 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Basic usage

Default controls

Use standard decrement and increment buttons alongside a numeric input field.

01
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="default-quantity"
  value="1"
  min="0"
  max="99"
  step="1"
/>
Basic usage

Labeled input style

Add supporting label text and rounded controls for a more form-like number input.

02
Live preview
Component usage.wrn
<InputNumber
  size="md"
  label="Select quantity"
  name="labeled-quantity"
  value="1"
  min="1"
  max="25"
  step="1"
/>
Layout

Vertical buttons

Stack the increment and decrement buttons vertically beside the field.

03
Live preview
Component usage.wrn
<InputNumber
  size="md"
  label="Select quantity"
  name="vertical-quantity"
  value="1"
  min="0"
  max="20"
/>
Layout

Horizontal buttons

Place the increment and decrement buttons on opposite sides of the value.

04
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="horizontal-quantity"
  value="1"
  min="0"
  max="20"
/>
Sizing

Compact size

Use a smaller compact control when the available space is limited.

05
Live preview
Component usage.wrn
<InputNumber
  size="sm"
  name="compact-quantity"
  value="0"
  min="0"
  max="10"
/>
Commerce

Seat quantity selector

Pair the control with pricing information for seat counts or plan add-ons.

06
Live preview
Component usage.wrn
<InputNumber
  size="md"
  label="Additional seats"
  name="additional-seats"
  value="0"
  min="0"
  max="50"
/>
States

Disabled input

Disable manual entry while keeping supported quantity controls available.

07
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="disabled-input"
  value="10"
/>
States

Disabled buttons

Disable increment and decrement controls while leaving the current value visible.

08
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="disabled-buttons"
  value="10"
/>
Behaviour

Custom step size

Set a custom step so every button press changes the value by two.

09
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="custom-step"
  value="0"
  min="0"
  max="20"
  step="2"
/>
Limits

Negative values

Use the min option to permit controlled negative values.

010
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="negative-values"
  value="-10"
  min="-100"
  max="100"
/>
Limits

Maximum limit

Set an upper limit and disable incrementing when that limit is reached.

011
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="maximum-limit"
  value="10"
  min="0"
  max="10"
/>
Validation

Validation states

Communicate whether the current numerical value is valid.

012
Live preview
Component usage.wrn
<InputNumber
  size="md"
  name="invalid-quantity"
  value="10"
  min="0"
  max="5"
/>
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
labelstring"Input Number"No
namestring""No
valuestring""No
placeholderstring""No
typestring"number"No
minstring""No
maxstring""No
stepstring""No
disabledbooleanfalseNo
requiredbooleanfalseNo
classstring""No
} }