View Source Moon.Design.Form.Radio (Moon v2.86.0)

Radio(group) component. For using both inside and outside the form

Properties

  • 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 - Field name, surface-style
  • disabled :boolean - Well, disabled
  • value :any - Value of the selected option, use it outside the form
  • options :keyword, default: [] - List of options to be rendered when no option slot is given
  • option_module :atom, default: MODULE.Button - Module for rendering options
  • hide_errors :boolean - See Moon.Design.Field documentation
  • hint :string - See Moon.Design.Field documentation

Slots

  • option - List of options for Radiogroup
  • default - Additional slot, here you able to add anything

Events

  • on_change - On-change event, will be propagated to underlying options

Summary

Functions

Callback implementation for Surface.Component.render/1.