Forms

NumberField

Number input with v-model support. Wraps the Polaris <s-number-field> web component.

Usage

<script setup>
const quantity = ref('')
</script>

<template>
  <ShNumberField
    v-model="quantity"
    label="Quantity"
    min="0"
    max="100"
    step="1"
  />
</template>

Props

PropTypeDefaultDescription
modelValuestring—Bound value (use with v-model)
labelstring—Input label
inputMode'decimal' | 'numeric'—Input mode for virtual keyboards
stepnumber—Step increment
maxnumber—Maximum value
minnumber—Minimum value
prefixstring—Text prefix
suffixstring—Text suffix
placeholderstring—Placeholder text
errorstring—Error message
detailsstring—Help text below the input
autocompletestring—Autocomplete attribute
defaultValuestring—Default value (uncontrolled)
labelAccessibilityVisibility'visible' | 'exclusive'—Label visibility for assistive tech
readOnlyboolean—Makes the field read-only
requiredboolean—Marks the field as required
disabledboolean—Disables the field
idstring—Element ID
namestring—Form field name

Events

EventPayloadDescription
update:modelValuestringEmitted when value changes (v-model)
inputInputEventNative input event
changeInputEventNative change event
focusInputEventEmitted on focus
blurInputEventEmitted on blur

Slots

SlotDescription
defaultAdditional content

Polaris Element

Renders as <s-number-field>. See Polaris NumberField docs.

© 2026 KiriminAja. Polaris and Shopify are trademarks of Shopify Inc.

KiriminAja not affiliated with Shopify.