ShadcnUI.Components.Forms.RadioGroup (shadcn_ui v1.0.0)

Copy Markdown View Source

Native exclusive-choice group with deterministic option identity.

Radio Group renders one fieldset, one legend, and real radio inputs from validated caller data. Selection is a server-rendered snapshot derived from a FormField or explicit value; native keyboard, reset, and submission behavior remain browser-owned.

Summary

Functions

Renders one native fieldset of deterministic radio options.

Functions

radio_group(assigns)

Renders one native fieldset of deterministic radio options.

Attributes

  • field (:any) - Defaults to nil.
  • id (:string) - Defaults to nil.
  • name (:string) - Defaults to nil.
  • selected (:any) - Defaults to {:shadcn_ui, :not_provided}.
  • options (:list) (required)
  • errors (:any) - Defaults to {:shadcn_ui, :not_provided}.
  • error_mode (:atom) - Defaults to :used_input. Must be one of :used_input, :always, or :hidden.
  • used (:boolean) - Defaults to false.
  • translate_error (:any) - Defaults to nil.
  • pending (:boolean) - Defaults to false.
  • required (:boolean) - Defaults to false.
  • disabled (:boolean) - Defaults to false.
  • form (:string) - Defaults to nil.
  • layout (:atom) - Defaults to :vertical. Must be one of :vertical, or :inline.
  • describedby (:any) - Defaults to nil.
  • class (:any) - Defaults to nil.
  • options_class (:any) - Defaults to nil.
  • option_class (:any) - Defaults to nil.
  • legend_class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • legend (required)
  • help