Forms

TextField

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

Usage

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

<template>
  <ShTextField
    v-model="title"
    label="Product title"
    placeholder="Enter product title"
    required
  />
</template>

Props

PropTypeDefaultDescription
modelValuestring—Bound value (use with v-model)
labelstring—Input label
placeholderstring—Placeholder text
errorstring—Error message
detailsstring—Help text below the input
iconPolarisIcon—Icon displayed in the field
prefixstring—Text prefix
suffixstring—Text suffix
maxLengthnumber—Maximum character length
minLengthnumber—Minimum character length
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-text-field>. See Polaris TextField docs.

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

KiriminAja not affiliated with Shopify.