SurfaceBootstrap.Form.RadioButton (surface_bootstrap v0.2.5)
The radio button component as defined in https://getbootstrap.com/docs/5.0/forms/checks-radios/
Properties
- field :atom, required: true - The the field on the changeset.
- disabled :boolean, default: false - Disable selection.
- opts :keyword, default: [] - Any opts you want to pass on to internal
Surface.RadioButton
andPhoenix.HTML.Form.radio_button/3
. - radio_button_right :boolean - Move radio button to right hand side.
- inline :boolean - Show radio button inline.
- class :css_class, default: [] - Class to apply to input.
- options :list -
options
are expected to be an enumerable which will be used to generate each respectiveRadioButton
. The enumerable may have:- keyword lists - each keyword list is expected to have the keys
:key
and:value
. Additional keys such as:disabled
may be given to customize the option - two-item tuples - where the first element is an atom, string or integer to be used as the option label and the second element is an atom, string or integer to be used as the option value
- atom, string or integer - which will be used as both label and value for the generated select .
- keyword lists - each keyword list is expected to have the keys
Slots
- default
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.
Link to this section Functions
Link to this function
mount(socket)
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
.