EssenceUI.Components.RadioGroup (Essence UI v0.2.0)

Copy Markdown View Source

Themed radio group with sizes, variants, and accent colors.

Summary

Functions

An item in the radio group.

The root container for the radio group.

Functions

radio_group_item(assigns)

An item in the radio group.

Attributes

  • id (:string) - Defaults to nil.
  • value (:string) (required)
  • disabled (:boolean) - Defaults to false.
  • checked (:boolean) - Defaults to false.
  • size (:string) - Defaults to "2". Must be one of "1", "2", or "3".
  • variant (:string) - Defaults to "surface". Must be one of "surface", "classic", or "soft".
  • color (:string) - Color utility class string. One of: gray, gold, bronze, brown, yellow, amber, orange, tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, lime, mint, sky. Must be one of "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", or "sky".
  • high_contrast (:boolean) - Whether to increase color contrast with the background.
  • class (:string) - Defaults to nil.
  • m (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mx (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • my (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mt (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mr (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mb (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • ml (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • Global attributes are accepted.

Slots

  • inner_block

radio_group_root(assigns)

The root container for the radio group.

Attributes

  • id (:string) (required)
  • size (:string) - Defaults to "2". Must be one of "1", "2", or "3".
  • variant (:string) - Defaults to "surface". Must be one of "surface", "classic", or "soft".
  • value (:string) - Defaults to nil.
  • default_value (:string) - Defaults to nil.
  • on_change (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • name (:string) - Defaults to nil.
  • required (:boolean) - Defaults to false.
  • orientation (:string) - Defaults to "vertical". Must be one of "horizontal", "vertical", or "undefined".
  • color (:string) - Color utility class string. One of: gray, gold, bronze, brown, yellow, amber, orange, tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, lime, mint, sky. Must be one of "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", or "sky".
  • high_contrast (:boolean) - Whether to increase color contrast with the background.
  • as_child (:boolean) - Composes the component into its immediate child instead of rendering its own HTML element. Defaults to false.
  • class (:string) - Defaults to nil.
  • m (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mx (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • my (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mt (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mr (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mb (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • ml (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • Global attributes are accepted.

Slots

  • inner_block (required)