SurfaceBootstrap.Form.Select (surface_bootstrap v0.2.5)

The select component as defined here:

Properties

  • field :atom, required: true - The the field on the changeset.
  • label :string - The string label of the field.
  • disabled :boolean, default: false - Disable selection.
  • opts :keyword, default: [] - Any opts you want to pass on to internal Surface.Checkbox and Phoenix.HTML.Form.checkbox/3.
  • class :css_class, default: [] - Class to apply to input.
  • options :any, default: [] - The select options.
  • selected :any - The selected value. For multiple selects this has to be a list that matches the value options. .
  • prompt :string - The prompt (nothing selected yet) string, is ignored for multiple selects..
  • spacing :string, default: "3", values: ~w(1 2 3 4 5) - Margin below form control, to create spacing. Defaults to 3.
  • size :string, values: ~w(small large) - Size of the input, defaults to nil(normal).
  • select_size :integer - Select size, how many options visible before scroll.
  • multiple :boolean - Multiple Select.
  • floating_label :boolean - Floating label? https://getbootstrap.com/docs/5.0/forms/floating-labels/ .
  • in_group :boolean, default: false - Is input in group? Set to true to hide label if used in InputGroup, defaults to false.

Link to this section Summary

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Link to this function

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this function

update(assigns, socket)

Callback implementation for Phoenix.LiveComponent.update/2.