SurfaceBulma.Form.FileInput (surface_bulma v0.6.1)

A file input that can be used in forms

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

  • id :string - The id of the corresponding input field

  • opts :keyword, default: [] - Options list

  • class :css_class - Class or classes to apply to the input

  • value :string - Value to pre-populated the input

  • name :string - The name of the corresponding input field

  • field :any, from_context: {Surface.Components.Form.Field, :field} - An identifier for the input

  • form :form, from_context: {Surface.Components.Form, :form} - An identifier for the form

  • values :keyword, default: [] - List values that will be sent as part of the payload triggered by an event

  • icon :string - The icon to display in the file upload

  • file_label :string, default: "Choose a file..." - The text to display next to the optional icon

  • boxed :boolean - The input can be displayed as a box by setting this to true

  • file_name :string - The name of the uploaded file

  • button_right :boolean - Position of the upload button

  • color :string, values: ~w(white black light dark primary link info success warning danger) - The color of the fileinput.

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.

Events

  • window_keyup - Triggered when a key on the keyboard is released (window-level)
  • window_keydown - Triggered when a key on the keyboard is pressed (window-level)
  • keyup - Triggered when a key on the keyboard is released
  • keydown - Triggered when a key on the keyboard is pressed
  • window_focus - Triggered when the page receives focus
  • window_blur - Triggered when the page loses focus
  • focus - Triggered when the component receives focus
  • blur - Triggered when the component loses focus
  • capture_click - Triggered when the component captures click
  • click_away - Triggered when a click event happens outside of the element
  • click - Triggered when the component receives click

Summary

Functions

Link to this function

render(assigns)

Callback implementation for Surface.Component.render/1.