View Source Moon.Design.Dropdown.Select (Moon v2.77.0)

Element that triggers Dropdown component, renders as a button


  • 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
  • prompt :string, default: "..." - Text to be shown when no value given
  • value :string - Value to be shown
  • badge :integer - Badge to show selected items count or smth else
  • error :boolean, from_context: :error - Some additional styling will be set to indicate field is iinvalid
  • is_open :boolean, from_context: :is_open - If the open indicator is active or not
  • size :string, values!: ~w(sm md lg), from_context: :size - Site of the select
  • disabled :boolean - If the item should be marked as disabled


  • default - Content of the button


  • on_click, from_context: :on_trigger - Event that fired when trigger is clicked



Callback implementation for Surface.Component.render/1.