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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | ❌ | useId() | for label and id Input |
label | string | ✅ | - | Form item label |
| All HTML attributes | - | ❌ | - | HTML attributes |
Slots
| Name | Data | Description |
|---|---|---|
default | { id: string } | Render form element |