View Source Moon.Design.Form.Radio.Button (Moon v2.77.0)

Single component of the Radio, renders to a label


  • id :string - Id to be given to the label tag
  • testid :string - Data-testid attribute value
  • class :css_class - Additional CSS classes for the label
  • field :atom, from_context: {Surface.Components.Form.Field, :field} - Field name, surface-style
  • form :form, from_context: {Surface.Components.Form, :form} - Form, surface-style
  • is_selected :boolean, from_context: :is_selected - Making the radio selected, use it outside the form. In most cases is set by Radio component
  • value :string, from_context: :value
  • disabled :boolean, from_context: :disabled
  • label :string - Label to be shown when no default slot is given
  • size :string, values!: ~w(sm md lg), default: "md" - Size of the label


  • default - Inner content - put label & <Indicator/> here


  • on_click, from_context: :on_click



Callback implementation for Surface.Component.render/1.