TailwindLiveComponents.RadioGroup (tailwind_live_components v0.2.1) View Source

Link to this section Summary

Functions

Renders the vertical radio group element

Link to this section Functions

Renders the vertical radio group element

<.radio_group form={f} field={:fruit} label="Horizontal Radio Group" options={[
  %{value: "apple", display: "Apple", detail: "yummy apple"},
  %{value: "banana", display: "Banana", detail: "yummy banana"},
  %{value: "cherry", display: "Cherry", detail: "yummy cherry"}
]} />

Options

  • form - The form identifier
  • field - The field name
  • label - The text for the generated <label> element
  • value - The current value for the input
  • orientation - "vertical" or "horizontal" (default is "vertical")
  • prompt - An option to include at the top of the options with the given prompt text
  • options - The options in the list box
  • error - Optional error message
  • theme - Optional theme to use for Tailwind classes