Number Input — Playground

px
size
variant
State
html.html
<input type="number" kuiNumberInput aria-label="Quantity" />
NameTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | undefinedundefinedControl height from --kui-control-height-*; generated buttons scale to match. Resolved from defaults.numberInput.size, then the parent field, then the global defaults.size, then md.
variant'stacked' | 'split' | undefinedundefinedButton layout. split places minus/plus controls on the sides (recommended); stacked stacks compact arrows on the right. Falls back to defaults.numberInput.variant, then split.
invalidbooleanfalseApplies an error border. Also inherited automatically from a parent kui-field with an error.
idstring | undefined-Id override for the native input. Falls back to the parent kui-field control id.
minstring | number-Native HTML attribute placed directly on the input. Decrement stops and disables at this value.
maxstring | number-Native HTML attribute placed directly on the input. Increment stops and disables at this value.
stepstring | number1Native HTML attribute. Amount the generated buttons and arrow keys step by.
disabledbooleanfalseNative HTML attribute. Sets data-kui-disabled on the container and disables both generated buttons.
readonlybooleanfalseNative HTML attribute. Sets data-kui-readonly on the container and disables both generated buttons.
--kui-input-bgCSS custom propertyFieldShared control background color.
--kui-input-bg-disabledCSS custom propertyvar(--kui-input-bg)Shared background color used for disabled and readonly states.
--kui-number-input-borderCSS custom property--kui-input-borderOptional number-input border override; falls back to the shared input border.
--kui-number-input-dividerCSS custom property--kui-color-borderDivider color between the buttons and the native input.
--kui-number-input-btn-bgCSS custom propertytransparentGenerated button background in the default state.
--kui-number-input-btn-bg-hoverCSS custom property--kui-color-surface-elevatedGenerated button background on hover.
--kui-number-input-btn-textCSS custom property--kui-color-text-secondaryGenerated button icon color.
KuiNumberInputOptionsinterface-Shape of defaults.numberInput: size and variant.

Inputs verified against @kikita-labs/ui v2.0.0 public typings.