Skip to content

FormInputText ​

A FormKit wrapper for OpenVue's InputText component.

Live Example on Website

Usage ​

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

Object-based Example ​

vue
<script setup>
const schema = [
  {
    $formkit: 'formInputText',
    name: 'name',
    label: 'Basic',
    validation: 'required',
    help: 'Some Help Text'
  },
  {
    $formkit: 'formInputText',
    name: 'telephone',
    placeholder: 'telephone',
    help: 'Input Type: tel',
    label: 'Telephone',
    inputType: 'tel'
  },
  {
    $formkit: 'formInputText',
    id: 'icon',
    name: 'iconLeft',
    label: 'Icon Left',
    placeholder: 'icon',
    iconPrefix: 'oi oi-check'
  },
  {
    $formkit: 'formInputText',
    name: 'iconRight',
    label: 'Icon Right (Disabled) - smize: small',
    help: 'Right Icon Demo',
    iconSuffix: 'oi oi-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 OpenVue InputText docs for more details.

FormKit OpenVue Module