defmodule MoonWeb.Pages.Design.Form.RadioPage do @moduledoc false use MoonWeb, :live_view alias MoonWeb.Components.Page alias MoonWeb.Components.ComponentPageDescription alias MoonWeb.Examples.Design.Form.RadioExample alias MoonWeb.Components.ExamplesList alias MoonWeb.Components.PropsTable alias MoonWeb.Components.Anatomy alias Moon.Design.Tabs data(breadcrumbs, :any, default: [ %{ to: "/components", name: "Components" }, %{ to: "#", name: "Form" }, %{ to: "/components/v2/form/radio", name: "Checkbox" } ] ) def render(assigns) do ~F"""

Radio buttons are used to represent a group of choices whereby users can only select one option.

The main difference between the radio button and the checkbox is, users are allowed to select single options whereas in the checkbox you can have multiple options.

Anatomy

{component_anatomy(:long)} {component_anatomy(:short)} {component_anatomy(:form)}
""" end defp component_anatomy(:long) do """ ... ... """ end defp component_anatomy(:short) do """ """ end defp component_anatomy(:form) do """
""" end end