View Source Moon.Design.Dropdown.Input (Moon v2.85.0)

Element that triggers Dropdown component, renders as a HTML input inside div with some addons

Properties

  • testid :string - Data-testid attribute for html tag
  • id :string - Id attribute for html tag
  • class :css_class - Additional CSS classes for the html tag
  • field_class :css_class, from_context: :field_class - Additional classes for the <input> tag in case of floating label or Group
  • placeholder :string - Text to be shown when no value given
  • value :string - Value to be shown
  • error :boolean, from_context: :error - Some additional styling will be set to indicate field is iinvalid
  • size :string, values!: ~w(sm md lg), from_context: :size - Site of the select
  • disabled :boolean, from_context: :disabled - If the item should be marked as disabled
  • is_open :boolean, from_context: :is_open - If the open indicator is active or not
  • attrs :any, default: %{} - Keyword | Map of additional attributes for the input

Slots

  • default - Some buttons and icons over the input

Events

  • open_me, from_context: :open_me - Dropdown opening action, only from context
  • on_keyup - Actually - on_keyup event for the input, use it for filter options with new user input
  • on_trigger, from_context: :on_trigger - Event that fired when trigger is clicked

Summary

Functions

Callback implementation for Surface.Component.render/1.