Compact Input

Find your API key in Settings > Developer.
Attribute Type Documentation Default Value
field_class :any

additional CSS classes for the field element

id :any

HTML id attribute

class :any

additional CSS classes for the wrapper

name :any

HTML name attribute for form submission

label :string

inline label text

value :any

the input value

type :string

the input type

"text"
field %FormField{}

a form field struct retrieved from the form, for example: @form[:email]

size :string

input size

"md"
color :string

color variant

"primary"
variant :string

the input style variant (ghost, filled, bordered)

"bordered"
helper :string

helper text displayed below the input

errors :list

list of error messages to display

[]
checked :boolean

the checked flag for checkbox inputs

prompt :string

the prompt for select inputs

options :list

the options to pass to Phoenix.HTML.Form.options_for_select/2

multiple :boolean

the multiple flag for select inputs

false
horizontal :boolean

horizontal layout (label beside input)

false
state :string

validation state (applies form-group-success/warning)

disabled :boolean

disables the input

false
rest :global
inner_block :slot