Captions and descriptions can be added to the form control by supplying the label="" and description="" attribute.
This will be publicly displayed.
<x-form-inputtype="email"name="public-email"label="Email"description="This will be publicly displayed."/>
<x-form-input type="email" name="public-email" label="Email" description="This will be publicly displayed." />
For more advanced formatting of the description the description slot can be used.
8 existing team members
<x-form-inputtype="email"name="email"label="Invite Team Member"placeholder="email@example.com"><x-slot:description><divclass="flex items-center justify-end gap-2"><x-paragraphsize="xs"style="muted"> 8 existing team members</x-paragraph><x-avatar.stack><x-avatarsize="xs"/><x-avatarsize="xs"/><x-avatarsize="xs"/></x-avatar.stack></div></x-slot:description></x-form-input>
The x-form-icon component offers pre-styled icon support. Icons can be added to the form control by utilizing the icon-prefix or icon-suffix slots.
<x-form-sectiongrid-columns="2"><x-form-inputname="search"placeholder="Search for user..."><x-slot:icon-prefix><x-form-iconicon="heroicon-o-magnifying-glass"/></x-slot:icon-prefix></x-form-input><x-form-inputname="filter"placeholder="Filter..."><x-slot:icon-suffix><x-form-iconicon="heroicon-o-funnel"/></x-slot:icon-suffix></x-form-input></x-form-section>