View Source Moon.Design.Dropdown.CustomOption (Moon v2.76.5)

Single oprion for the dropdown component. Renders as a button


  • testid :string - Data-testid attribute for button
  • id :string - Id attribute for buttons
  • title :string - Title to be shown when no default slot is given
  • class :css_class - Additional CSS classes for the button tag
  • disabled :boolean - If the button is disabled
  • value :any, from_context: :value - Value of the option, in most cases got from context
  • is_selected :boolean, from_context: :is_selected - If the option is selected, in most cases got from context
  • has_bottom_divider :boolean, default: false - Adds section divider after the option


  • default - Inner content of the option


  • on_click, from_context: :on_click - On click event, in most cases got from context



Callback implementation for Surface.Component.render/1.