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

Copy Markdown View Source

Select primitive for choosing a value from a list of options.

Summary

Functions

An optional arrow that points to the trigger.

The content that pops out when the select is open.

A group of items.

A decorative icon for the trigger.

An item in the select.

An indicator shown when the item is selected.

The text content of an item.

A label for a group.

A portal that renders the select content into a target container via Phoenix.Component.portal.

The root container for the select component.

A button that scrolls the viewport down.

A button that scrolls the viewport up.

A separator between items or groups.

The button that toggles the select.

The value displayed in the trigger.

The viewport that contains the select items.

Functions

arrow(assigns)

An optional arrow that points to the trigger.

Attributes

  • Global attributes are accepted.

content(assigns)

The content that pops out when the select is open.

Attributes

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

Slots

  • inner_block (required)

group(assigns)

A group of items.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

icon(assigns)

A decorative icon for the trigger.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

item(assigns)

An item in the select.

Attributes

  • value (:string) (required)
  • disabled (:boolean) - Defaults to false.
  • text_value (:string) - Optional text value for type-to-select. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)

item_indicator(assigns)

An indicator shown when the item is selected.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

item_text(assigns)

The text content of an item.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

label(assigns)

A label for a group.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

portal(assigns)

A portal that renders the select content into a target container via Phoenix.Component.portal.

Attributes

  • id (:string) (required)
  • target (:string) - Defaults to "body".

Slots

  • inner_block (required)

root(assigns)

The root container for the select component.

Attributes

  • id (:string) (required)
  • value (:string) - The value of the select. Defaults to nil.
  • on_change (:string) - Event to push when value changes. 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)

scroll_down_button(assigns)

A button that scrolls the viewport down.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

scroll_up_button(assigns)

A button that scrolls the viewport up.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

separator(assigns)

A separator between items or groups.

Attributes

  • Global attributes are accepted.

trigger(assigns)

The button that toggles the select.

Attributes

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

Slots

  • inner_block (required)

value(assigns)

The value displayed in the trigger.

Attributes

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

Slots

  • inner_block

viewport(assigns)

The viewport that contains the select items.

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)