OctantisWeb.Components.Polaris.RadioButton (octantis v0.1.12)

View Source

Use radio buttons to present each item in a list of options where merchants must make a single selection.

Must be inside of a '.form'

Examples

  <.form>
  <.radio_button label="Accounts are disabled" name="accounts" help_text="Customers will only be able to check out as guests."/>
  <.radio_button label="Accounts are optional" name="accounts" checked help_text="Customers will be able to check out with a customer account or as a guest."/>
  </.form>

See

Summary

Functions

Use radio buttons to present each item in a list of options where merchants must make a single selection.

Functions

input_class(attrs)

radio_button(assigns)

Use radio buttons to present each item in a list of options where merchants must make a single selection.

Must be inside of a '.form'

Examples

  <.form>
  <.radio_button label="Accounts are disabled" name="accounts" help_text="Customers will only be able to check out as guests."/>
  <.radio_button label="Accounts are optional" name="accounts" checked help_text="Customers will be able to check out with a customer account or as a guest."/>
  </.form>

See

Attributes

  • aria_described_by (:string) - Indicates the ID of the element that describes the radio button. Defaults to nil.
  • label (:string) - Label for the radio button. Defaults to nil.
  • label_hidden (:boolean) - Visually hide the label. Defaults to false.
  • checked (:boolean) - Radio button is selected. Defaults to false.
  • disabled (:boolean) - Disable input. Defaults to false.
  • id (:string) - ID for form input. Defaults to nil.
  • name (:string) - Name for form input. Defaults to nil.
  • value (:string) - Value for form input. Defaults to nil.
  • fill (:list) - Grow to fill the space. Equivalent to width: 100%; height: 100%. Defaults to nil.
  • help_text (:string) - Additional text to aide in use. Defaults to nil.
  • tone (:string) - Indicates the tone of the text field. Defaults to nil.
  • phx_focus (:any) - onFocus: Callback when radio button is focused. Defaults to nil.
  • phx_blur (:any) - onBlur: Callback when focus is removed. Defaults to nil.