Easily extend form controls by adding text, buttons, or button
groups on either side of textual inputs, custom selects, and
custom file inputs. Check out code for detail of usage.
<div>
<span>Prepend Addon:</span>
<label class="mt-1.5 flex -space-x-px">
<div
class="flex items-center justify-center rounded-l-lg border border-slate-300 px-3.5 font-inter dark:border-navy-450"
>
<span class="-mt-1">@</span>
</div>
<input
class="form-input w-full rounded-r-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:z-10 hover:border-slate-400 focus:z-10 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Username"
type="text"
/>
</label>
</div>
<div>
<span>Append Addon:</span>
<label class="mt-1.5 flex -space-x-px">
<input
class="form-input w-full rounded-l-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:z-10 hover:border-slate-400 focus:z-10 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Username"
type="text"
/>
<div
class="flex items-center justify-center rounded-r-lg border border-slate-300 px-3.5 font-inter dark:border-navy-450"
>
<span>@site.com</span>
</div>
</label>
</div>
<div>
<span>Between input:</span>
<label class="mt-1 flex -space-x-px">
<div
class="flex items-center justify-center rounded-l-lg border border-slate-300 px-3.5 font-inter dark:border-navy-450"
>
<span>$</span>
</div>
<input
class="form-input w-full border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:z-10 hover:border-slate-400 focus:z-10 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
placeholder="Enter Price"
type="text"
/>
<div
class="flex items-center justify-center rounded-r-lg border border-slate-300 px-3.5 font-inter dark:border-navy-450"
>
<span>.00</span>
</div>
</label>
</div>