Form Element
Base wrapper for form inputs, providing labels and error handling.
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | '' | The label text for the form element. |
| name | string | null | HTML name attribute. |
| id | string | null | HTML id attribute. |
| model | string | null | AlpineJS model name for validation and state binding. |
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | '' | The label text for the form element. |
| name | string | null | HTML name attribute. |
| id | string | null | HTML id attribute. |
| model | string | null | AlpineJS model name for validation and state binding. |
Usage
blade
<x-plume::form >
<x-plume::form.element label="Wrapping Raw HTML"
description="The element provides label and error handling for any content."
model="raw_content">
<div class="p-4 border rounded bg-background-50 dark:bg-background-700">
<input type="text" x-model="data.raw_content"
class="w-full bg-transparent border-none focus:ring-0" />
</div>
</x-plume::form.element>
</x-plume::form>