Text Input

(Be safe!)
⌘K
Attribute Type Documentation Default Value
id :string
field %FormField{}

A Phoenix form field

type :string

Type of the input

"basic"
input_type :string

HTML input type when type is basic.

"text"
label :string

Label to be rendered in the input.

sublabel :string

Sublabel to be rendered in the input.

hint :string

Hint text to be rendered below the input.

hint_variant :string

Hint text variant.

"default"
error :string

Errors to be rendered below the input. Takes precedence over hint.

show_error_message :boolean

Whether to show the error message below the input.

true
show_prefix :boolean

Whether to show the prefix.

true
show_suffix :boolean

Whether to show the suffix.

true
suffix_hint :string

Hint text to show as tooltip at the end of the input. Takes precedence over the suffix set by type.

name :string

The name of the input

value :string

The value of the input

placeholder :string

Placeholder text to be rendered in the input.

required :boolean

Whether the input is required.

false
show_required :boolean

Whether the required indicator is shown.

false
min :any

Minimum value for number inputs.

max :any

Maximum value for number inputs.

step :any

Step value for number inputs.

rest :global
prefix :slot

Prefix to be rendered in the input. Only shown when type is basic.

suffix :slot

Suffix to be rendered in the input. Takes precedence over suffix_hint.