SurfaceBulma.Form.InputWrapper (surface_bulma v0.5.1)
This component provides a wrapper for form inputs.
This can be used to wrap new inputs that want to have addons and icons.
properties
Properties
label :string - The string label of the field
size :string, values: ~w(small normal medium large) - The color of the input.
expanded :boolean - Should input fill entire width of form?
is_horizontal :boolean, default: false - Whether or not the field is horizontal
help_text :string - Help text, will be replaced by error text if changeset gets errors
field_class :css_class, default: [] - Class to apply to the Field
icon_left :any, default: nil - Icon to place on the left side of input box. Must be a valid icon. Bulma does not currently support stacked / layered icons inside a form control.
icon_right :any, default: nil - Icon to place on the right side of input box. Must be a valid icon. Setting this prop will overwrite (and not display) any of the generated icons for validations, similar to setting disable_icons="true". Bulma does not currently support stacked / layered icons inside a form control.
has_addons :boolean, default: false - Whether the input has addons
field :any
control_attrs :map, default: %{} - Attrs to add to the control div
disable_icons :boolean, default: false - Disable default fontawesome icons tied to validation
disable_icons_if_addon :boolean, default: false - Disable icons if input is an addon
slots
Slots
left_addon - Slot adds content to left side of input. Only inputs, buttons and dropdowns are supported. NOTE: If you supply addons, the label is disabled. You cannot combine labels and addons. If you require field labels with addons you must use horizontal forms. See
SurfaceBulma.Form.HorizontalControlGroup
.right_addon - Slot adds content to right side of input. Only inputs, buttons and dropdowns are supported. NOTE: If you supply addons, the label is disabled. You cannot combine labels and addons. If you require field labels with addons you must use horizontal forms. See
SurfaceBulma.Form.HorizontalControlGroup
.default, arg: %{form: :form}
Link to this section Summary
Link to this section Functions
has_addons?(assigns)
render(assigns)
Callback implementation for Surface.Component.render/1
.