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
modelValuestringBound value (use with v-model)
labelstringInput label
inputMode'decimal' | 'numeric'Input mode for virtual keyboards
stepnumberStep increment
maxnumberMaximum value
minnumberMinimum value
prefixstringText prefix
suffixstringText suffix
placeholderstringPlaceholder text
errorstringError message
detailsstringHelp text below the input
autocompletestringAutocomplete attribute
defaultValuestringDefault value (uncontrolled)
labelAccessibilityVisibility'visible' | 'exclusive'Label visibility for assistive tech
readOnlybooleanMakes the field read-only
requiredbooleanMarks the field as required
disabledbooleanDisables the field
idstringElement ID
namestringForm 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.