Number Input — Playground

px
size
variant
State
html.html
<input type="number" kuiNumberInput aria-label="Quantity" />
NameTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg''md'Control height from --kui-control-height-*. Generated buttons scale to match.
variant'a' | 'b''b'Button layout. b places minus/plus controls on the sides (recommended). a stacks compact arrow controls on the right.
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-number-input-borderCSS custom property--kui-color-borderBorder color in the default state.
--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.

Inputs verified against @kikita-labs/ui v1.6.1 public typings.