Forms
Input
A text field with its label, description, help text and validation error. It guesses the input type and an input mask from the field name, binds itself to the Livewire property of the same name, and can carry icons, a clear button, a copy button or a show-password button inside the box.
Nothing to show
An "Email" label over a type="email" input. Inside a Livewire component with a public $email property, the input is bound to it with wire:model; after a failed validation, the message shows under the field in red and the input gets a red border and aria-invalid="true".
Bound to Livewire #
A search box with a magnifier at the start and no visible label. $search receives the text 300 ms after the user stops typing, and a spinner shows at the end of the box while the request runs.
Nothing to show
Masks and types from the name #
With the pt_BR masks of the default config: the CPF field formats what is typed as 999.999.999-99, the phone one as (99) 999999999 with a tel keyboard, the birth date is a type="date" input, and the password field has an eye button that shows and hides the text. type and mask given on the tag take precedence.
The credit card autocomplete tokens bring their own limits, whatever the name and the locale: cc-number takes up to 19 digits in groups of four (9999 9999 9999 9999 999), cc-exp takes MM/YY (99/99), cc-csc up to 4 digits (9999), and cc-name gets maxlength="26", the length printed on a card. A mask or maxlength on the tag replaces them.
Nothing to show
Extras inside the box #
The first has a copy button that writes the key to the clipboard; the second, attached "R$" and ",00" blocks before and after the box; the third, an "x" that empties it (shown only while there is text) and a / key hint.
Nothing to show
Other types #
Nothing to show
Label and texts #
label, description and help sit around the control; badge and info go next to the label. placeholder set to true reuses the label.
Nothing to show
Sizes #
size scales the text, the padding and the icons, from xs to 3xl.
Nothing to show
Trailing icon #
icon-trailing puts an icon at the end of the box, as icon does at the start.
Nothing to show
A mask of your own #
mask on the tag formats what is typed, taking precedence over the mask guessed from the name.
Nothing to show
Clear and copy events #
The clear button fires cleared and the copy button copied on the input; both bubble.
Nothing to show
Validation #
After a failed validation the message shows under the field, the box turns red and the input gets aria-invalid.
Nothing to show
Customization #
Classes go to the box; input:class styles the <input> itself and prefixed attributes (icon:, clearable:) reach the inner parts.
Nothing to show
Reference
tk:input
| Prop | Type | Default | Description |
|---|---|---|---|
type |
string | from the name | The input type. Guessed from the name when not given: email, url (website, social links), tel (phone, whatsapp), password, date (date, _on), datetime-local (datetime, _at), time, color, file (image, photo, file...). Otherwise text. |
mask |
string | false | from the name | An Alpine x-mask pattern (9 digit, a letter, * any), or the name of a configured mask (cpf). Guessed from the name, the type or a credit card autocomplete token for text and tel inputs. false turns it off. |
clearable |
bool | string | false |
Adds a button that empties the field. A string is its label. |
copyable |
bool | string | false |
Adds a button that copies the value. A string is its label. |
viewable |
bool | string | true for passwords |
Adds a button that shows and hides a password. A string is its label, shown in place of the tooltip. |
old |
bool | true |
Takes the old input of a failed submit as the value. false keeps value. Passwords never get it back. |
Also accepts the field props (label, description, help, prefix, suffix, placeholder, value, size...) and the field control props (icon, iconTrailing, kbd, prepend, append, loading). wire:model and x-model bind the value as a string.
Slots
| Slot | Description |
|---|---|
| default | The initial value, in place of value. |
Events
| Event | Detail | When |
|---|---|---|
viewed |
{ viewed }, whether the password is now shown |
The show-password button was clicked. Dispatched on the input; bubbles. Submitting the form hides the password again without dispatching it. |
cleared |
The clear button emptied the field. Dispatched on the input; bubbles. | |
copied / failed |
The copy button copied the value, or could not. Dispatched on the input; bubbles. |
Prefixes
| Prefix | Goes to |
|---|---|
input: |
Classes for the <input> itself (input:class). |
clearable: |
The clear button. |
copyable: |
The copy button. |
viewable: |
The show-password button. |
tk:input.viewable
The show-password button, for an input of your own inside a field control. Takes the element props.
Slots
The field props that take a slot (label, description, help, prefix...) work as named slots.
Events
With Alpine:
Nothing to show
Calling a Livewire action:
Nothing to show
Customization
Classes on the tag go to the box (the field control) when there is anything inside it besides the input, otherwise to the input itself. Other attributes go to the <input>. Besides the prefixes of the field props and the field control props (listed in the Reference above).
Nothing to show
Accessibility
The label is a <label for> pointing to the input, and aria-describedby lists the description, the help text and the validation error. An invalid field has aria-invalid="true". The buttons inside the box have accessible names (translated "Clear", "Copy", "Toggle password visibility"), and the show-password button has aria-pressed.
Behavior notes
- Inside Livewire, a field with a
nameand nowire:modelis bound to the public property with the same name, when the component has it;:wire-model="false"turns that off.valueand the slot are ignored there: the property is the value. date,datetime-local,timeandmonthvalues outside Livewire are converted to the format the browser expects (2026-10-14,2026-10-14T10:30...), so aCarbonor a date string like2026-10-14 10:30:00works asvalue. Dates and date-time strings with an offset are shown inapp.timezone(aCarbonin UTC is converted first); a string without an offset is kept as it is.- A digit-only mask on a
textinput setsinputmode="numeric", for a numeric keyboard on phones. - The masks guessed from the name come from
config('tallkit.masks'), per locale, and follow the app's locale. - Showing a password survives Livewire updates: the type stays
textuntil the button is clicked again or its form is submitted (it is sent as a password, so password managers still offer to save it).