Skip to content

Form Item

A component to create a form item element with a label and a form element.

Usage

vue
<script setup>
import { FormItem, Input } from 'gurunkit';
</script>

<template>
  <FormItem label="Name" v-slot="{ id }">
    <Input :id="id" placeholder="Jhon doe" class="w-full" />
  </FormItem>
</template>

API

Props

NameTypeRequiredDefaultDescription
idstringuseId()for label and id Input
labelstring-Form item label
All HTML attributes--HTML attributes

Slots

NameDataDescription
default{ id: string }Render form element

Released under the MIT License.