OctantisWeb.Components.Polaris.RadioButton (octantis v0.2.0)
View SourceUse 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
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
- https://polaris.shopify.com/components/selection-and-input/radio-button
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/RadioButton/RadioButton.tsx
Attributes
aria_described_by(:string) - Indicates the ID of the element that describes the radio button. Defaults tonil.label(:string) - Label for the radio button. Defaults tonil.label_hidden(:boolean) - Visually hide the label. Defaults tofalse.checked(:boolean) - Radio button is selected. Defaults tofalse.disabled(:boolean) - Disable input. Defaults tofalse.id(:string) - ID for form input. Defaults tonil.name(:string) - Name for form input. Defaults tonil.value(:string) - Value for form input. Defaults tonil.fill(:list) - Grow to fill the space. Equivalent to width: 100%; height: 100%. Defaults tonil.help_text(:string) - Additional text to aide in use. Defaults tonil.tone(:string) - Indicates the tone of the text field. Defaults tonil.phx_focus(:any) - onFocus: Callback when radio button is focused. Defaults tonil.phx_blur(:any) - onBlur: Callback when focus is removed. Defaults tonil.