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

Copy Markdown View Source

Themed select with trigger, content, and item subcomponents.

Summary

Functions

The select menu content.

A group of items.

An item in the select menu.

A label for a group.

The root container for the select component.

A visual separator between items or groups.

The trigger area that opens the select menu.

Functions

select_content(assigns)

The select menu content.

Attributes

  • variant (:string) - Defaults to "solid". Must be one of "solid", or "soft".
  • size (:string) - Defaults to "2". Must be one of "1", "2", or "3".
  • position (:string) - Defaults to "item-aligned". Must be one of "item-aligned", or "popper".
  • class (:string) - Defaults to nil.
  • 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.
  • Global attributes are accepted.

Slots

  • inner_block (required)

select_group(assigns)

A group of items.

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)

select_item(assigns)

An item in the select menu.

Attributes

  • value (:string) (required)
  • disabled (:boolean) - Defaults to false.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)

select_label(assigns)

A label for a group.

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)

select_root(assigns)

The root container for the select component.

Attributes

  • id (:string) (required)
  • value (:string) - Defaults to nil.
  • on_change (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • dir (:string) - Defaults to "ltr". Must be one of "ltr", or "rtl".
  • name (:string) - Defaults to nil.
  • required (:boolean) - Defaults to false.
  • Global attributes are accepted.

Slots

  • inner_block (required)

select_separator(assigns)

A visual separator between items or groups.

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

select_trigger(assigns)

The trigger area that opens the select menu.

Attributes

  • variant (:string) - Defaults to "surface". Must be one of "surface", "classic", "soft", or "ghost".
  • size (:string) - Defaults to "2". Must be one of "1", "2", or "3".
  • placeholder (:string) - Defaults to nil.
  • 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".
  • class (:string) - Defaults to nil.
  • value (:string) - Initial value for SSR. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block