Input
Single-line text field with sizes, native input types, affix slots, and grouped controls.
Basic
Sizes
Set size to one of xs, sm, md, lg, or xl to match the surrounding density.
Label, description, and help text
Combine label, sublabel, description, and help_text to build the label area without extra wrappers.
Used to authenticate requests against your account.
Input types
type maps to the underlying <input> type, so the browser provides the matching keyboard, validation, and native picker.
Inner prefix
:inner_prefix renders inside the field border, before the input. Fits inline icons and short static text.
Inner suffix
:inner_suffix renders inside the field border, after the input. Drop in password reveal toggles, inline loading, or error indicators.
Must be a valid email address.
Outer prefix
:outer_prefix attaches to the field's leading edge, outside the border. Borders and corners join automatically.
Outer suffix
:outer_suffix attaches to the field's trailing edge. Match the button's size to the input's so the joint stays flush.
Search with submit
Common header pattern: a leading magnifier icon and a trailing submit button joined to the field.
Invite by email
Combine an :inner_prefix icon with an :outer_suffix action button. The trailing button absorbs the field's right border for one connected control.
Money amount
Two affixes share one field: an :outer_prefix currency picker on the leading edge and an :inner_prefix dollar sign inside the field.
Disabled
Set disabled to block focus and edits. Disabling a parent <fieldset> cascades through native HTML semantics.
Readonly
Set readonly to keep focus and copy/select behavior, but block edits to the value.
Validation errors
Bind field to a Phoenix.HTML.FormField and the input renders translated changeset errors automatically once the field has been touched.
Group: full name
Wrap inputs in <.input_group> to join them into one connected control with a shared label and a single border.
Group: card details
Three inputs read as one control. Use the same size on every child so heights stay flush.
Group: date and time range
Native date and time pickers slot directly into <.input_group>. The leading and trailing corners round automatically.