Skip to content

Field

State belongs to the parent. Compose this component with the props and slots below.

Preview

Open in the playground

Usage

FieldExample.vueVue / TS
<script setup lang="ts">
import { ref } from 'vue'
import { FzField } from '@chrisdalbano/forza-ui'
const name = ref<string>('')
</script>

<template>
  <FzField v-model="name" label="Build name" />
</template>
TypeScript exampleSource you can use.

Import the shared stylesheet once and wrap your app in .fz-theme. See installation.

Props

NameTypeRequiredDefault
labelstringYesNone
hintstring | undefinedNoNone
errorstring | undefinedNoNone
placeholderstring | undefinedNoNone
disabledboolean | undefinedNoNone
type"text" | "search" | "email" | undefinedNoNone
modelValuestringYesNone

Events and state

v-model: string

  • update:modelValue: [value: string]

Slots

leading, trailing

Add from source

sh
forza add field

Set up the CLI first. Generated API tables come from the Vue source, using Vue Language Tools.

Released under the MIT License. Independent work.