Special entry input components for PhiaUI.
Provides compound input widgets for structured data entry:
verifiable_input/1+form_verifiable_input/1— two fields that must match (confirm email / confirm password). Server validates; second field shows status.duration_input/1+form_duration_input/1— HH:MM:SS segmented time entry.split_input/1+split_input_field/1— multi-slot inputs that concatenate to one value with auto-advance (PhiaSplitInput hook).credit_card_input/1+form_credit_card_input/1— four-panel card form with number formatting and auto-advance (PhiaCreditCard hook).
Summary
Functions
A four-panel credit card entry form: number (4×4 formatted), expiry (MM/YY),
CVV, and optional cardholder name. The PhiaCreditCard JS hook formats input
and auto-advances between fields.
Renders HH:MM:SS segmented time-duration inputs. Each segment is a constrained number input. A hidden input carries the total seconds for form submission.
A labeled wrapper for credit_card_input/1 matching the form component style.
FormField-integrated wrapper for duration_input/1.
FormField-integrated wrapper for verifiable_input/1.
Derives names/values from fields; computes matched from field values.
A multi-slot input that concatenates slot values into one hidden field value.
The PhiaSplitInput hook handles auto-advance on fill, backspace, and paste.
A single slot within a split_input/1. The hook auto-advances on fill and
backs up on backspace when empty.
Renders two inputs that must match. The second field shows a check (matched),
error (mismatch), or nothing (untouched) based on the matched attr.
Functions
A four-panel credit card entry form: number (4×4 formatted), expiry (MM/YY),
CVV, and optional cardholder name. The PhiaCreditCard JS hook formats input
and auto-advances between fields.
Attributes
id(:string) (required) - Root element ID — required for PhiaCreditCard hook.card_number_name(:string) - Form field name for the card number. Defaults to"card_number".expiry_name(:string) - Form field name for the expiry (MM/YY). Defaults to"expiry".cvv_name(:string) - Form field name for the CVV. Defaults to"cvv".cardholder_name(:string) - Form field name for the cardholder. Defaults to"cardholder".show_cardholder(:boolean) - Show the cardholder name field. Defaults totrue.class(:string) - Additional CSS classes on the root element. Defaults tonil.
Renders HH:MM:SS segmented time-duration inputs. Each segment is a constrained number input. A hidden input carries the total seconds for form submission.
Attributes
id(:string) - HTML id prefix for the inner inputs. Defaults tonil.name(:string) - Form field name for the hidden total-seconds input. Defaults to"duration".value(:any) - Duration as integer seconds (e.g.3661) or "HH:MM:SS" string. Defaults to0.show_hours(:boolean) - Show the hours field. Defaults totrue.show_seconds(:boolean) - Show the seconds field. Defaults totrue.max_hours(:integer) - Maximum allowed hours value. Defaults to99.disabled(:boolean) - Disables all fields. Defaults tofalse.class(:string) - Additional CSS classes. Defaults tonil.
A labeled wrapper for credit_card_input/1 matching the form component style.
Attributes
id(:string) (required) - Root element ID — required for PhiaCreditCard hook.label(:string) - Section label shown above the card form. Defaults tonil.description(:string) - Helper text. Defaults tonil.card_number_name(:string) - Card number field name. Defaults to"card_number".expiry_name(:string) - Expiry field name. Defaults to"expiry".cvv_name(:string) - CVV field name. Defaults to"cvv".cardholder_name(:string) - Cardholder name field name. Defaults to"cardholder".show_cardholder(:boolean) - Show the cardholder name field. Defaults totrue.class(:string) - Additional CSS classes. Defaults tonil.
FormField-integrated wrapper for duration_input/1.
Attributes
field(Phoenix.HTML.FormField) (required) - A Phoenix.HTML.FormField struct.label(:string) - Label text. Defaults tonil.description(:string) - Helper text. Defaults tonil.show_hours(:boolean) - Show the hours field. Defaults totrue.show_seconds(:boolean) - Show the seconds field. Defaults totrue.max_hours(:integer) - Maximum allowed hours. Defaults to99.class(:string) - Additional CSS classes. Defaults tonil.
FormField-integrated wrapper for verifiable_input/1.
Derives names/values from fields; computes matched from field values.
Attributes
field(Phoenix.HTML.FormField) (required) - Primary form field.confirm_field(Phoenix.HTML.FormField) (required) - Confirmation form field.label(:string) - Label text shown above the inputs. Defaults tonil.description(:string) - Helper text. Defaults tonil.type(:atom) - Input type. Defaults to:password. Must be one of:text,:password, or:email.placeholder(:string) - Primary placeholder. Defaults tonil.confirm_placeholder(:string) - Confirmation placeholder. Defaults tonil.class(:string) - Additional CSS classes. Defaults tonil.
A multi-slot input that concatenates slot values into one hidden field value.
The PhiaSplitInput hook handles auto-advance on fill, backspace, and paste.
Attributes
id(:string) (required) - Root element ID — required for PhiaSplitInput hook.name(:string) - Hidden input name carrying the concatenated value. Defaults tonil.separator(:string) - String inserted between slot values when joining. Defaults to"".class(:string) - Additional CSS classes on the container. Defaults tonil.
Slots
inner_block(required) - Containssplit_input_field/1components.
A single slot within a split_input/1. The hook auto-advances on fill and
backs up on backspace when empty.
Attributes
placeholder(:string) - Placeholder character(s) for the slot. Defaults tonil.maxlength(:integer) - Maximum number of characters in this slot. Defaults to1.width(:string) - Tailwind width class for this slot. Defaults to"w-10".class(:string) - Additional CSS classes. Defaults tonil.
Renders two inputs that must match. The second field shows a check (matched),
error (mismatch), or nothing (untouched) based on the matched attr.
Attributes
id(:string) - HTML id prefix for both input elements. Defaults tonil.type(:atom) - Input type for both fields. Defaults to:password. Must be one of:text,:password, or:email.name(:string) - Name for the primary input. Defaults to"value".confirm_name(:string) - Name for the confirmation input. Defaults to"confirm_value".value(:string) - Value for the primary input. Defaults to"".confirm_value(:string) - Value for the confirmation input. Defaults to"".matched(:boolean) - Server-computed match status.nil= untouched,true= match,false= mismatch. Defaults tonil.placeholder(:string) - Placeholder for the primary input. Defaults tonil.confirm_placeholder(:string) - Placeholder for the confirmation input. Defaults tonil.size(:atom) - Input size. Defaults to:default. Must be one of:sm,:default, or:lg.disabled(:boolean) - Disables both inputs. Defaults tofalse.class(:string) - Additional CSS classes on the wrapper. Defaults tonil.