Skip to content

PrimeInputText

A FormKit wrapper for PrimeVue's InputText component.

Live Example on Website

Usage

vue
<FormKit type="primeinputtext" v-model="text" />

Object-based Example

vue
<script setup>
const schema = [
  { $formkit: 'primeInputText', name: 'name', label: 'Basic', validation: 'required', help: 'Some Help Text' },
  { $formkit: 'primeInputText', name: 'telephone', placeholder: 'telephone', help: 'Input Type: tel', label: 'Telephone', inputType: 'tel' },
  { $formkit: 'primeInputText', id: 'icon', name: 'iconLeft', label: 'Icon Left', placeholder: 'icon', iconPrefix: 'pi pi-check' },
  { $formkit: 'primeInputText', name: 'iconRight', label: 'Icon Right (Disabled) - smize: small', help: 'Right Icon Demo', iconSuffix: 'pi pi-check', disabled: true, size: 'small' },
]
const data = { name: 'Harry Potter', iconLeft: 'Some Text ...', iconRight: 'Another Text ...' }
</script>

<template>
  <FormKit :schema="schema" :data="data" />
</template>

Props

NameTypeDescription
ptobjectPass-through options
ptOptionsobjectPass-through options
unstyledbooleanDisable default styles
sizestringInput size
inputTypestringInput type (e.g. text, tel)
placeholderstringPlaceholder text

See PrimeVue InputText docs for more details.

FormKit PrimeVue Module