Input

Basic

Your full name
www
.com
<x-input label="Name" placeholder="Your name" icon="o-user" hint="Your full name" />
 
<x-input label="Right icon" wire:model="address" icon-right="o-map-pin" />
 
<x-input label="Name" wire:model="name" placeholder="Clearable field" clearable />
 
<x-input label="Prefix & Suffix" wire:model="name" prefix="www" suffix=".com" />

States

<x-input label="Disabled" value="It is disabled" disabled />
 
<x-input label="Read only" value="Read only" readonly />

Inline

<x-input label="Inline label" inline />

Password

Notice all above attributes will work with the password component.

It toggles visibility
<x-password label="Toggle" hint="It toggles visibility" wire:model="password" clearable />
<x-password label="Right toggle" wire:model="password" right />
<x-password label="Custom icons" wire:model="password" password-icon="o-lock-closed" password-visible-icon="o-lock-open" />
<x-password label="Without toggle" wire:model="password" only-password />

Currency

<head>
...
 
{{-- Currency --}}
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/robsontenorio/mary@0.44.2/libs/currency/currency.js"></script>
</head>
USD
R$
<x-input label="Default money" wire:model="money1" prefix="USD" money inline />
 
{{-- Notice that `locale` accepts any valid locale --}}
<x-input
label="Custom money"
wire:model="money2"
suffix="R$"
money
inline
locale="pt-BR" />

Slots

@php
$users = App\Models\User::take(5)->get();
@endphp
 
<x-input label="Prepend a select">
<x-slot:prepend>
{{-- Add `rounded-e-none` class (RTL support) --}}
<x-select icon="o-user" :options="$users" class="rounded-e-none bg-base-200" />
</x-slot:prepend>
</x-input>
 
<x-input label="Append a button">
<x-slot:append>
{{-- Add `rounded-s-none` class (RTL support) --}}
<x-button label="I am a button" icon="o-check" class="btn-primary rounded-s-none" />
</x-slot:append>
</x-input>

maryUI
Sponsor