Skip to content

CommandDropdown

Base classes

Name Children Inherits
OptionList
textual.widgets._option_list
A navigable list of options.

⋔ Inheritance diagram

graph TD
  118058538["dropdown.CommandDropdown"]
  2767400126["_option_list.OptionList"]
  1530189998["scroll_view.ScrollView"]
  1759507108["containers.ScrollableContainer"]
  4188532303["widget.Widget"]
  3946681048["dom.DOMNode"]
  53685856["message_pump.MessagePump"]
  2751680898["builtins.object"]
  2767400126 --> 118058538
  1530189998 --> 2767400126
  1759507108 --> 1530189998
  4188532303 --> 1759507108
  3946681048 --> 4188532303
  53685856 --> 3946681048
  2751680898 --> 53685856

🛈 DocStrings

Bases: OptionList

Dropdown list for command completions.

Source code in src/slashed/textual_adapter/dropdown.py
class CommandDropdown(OptionList):
    """Dropdown list for command completions."""

    DEFAULT_CSS = """
    CommandDropdown {
        background: $surface;
        border: solid $primary;
        height: auto;
        max-height: 10;
        min-width: 30;
        padding: 0 1;
        layer: dropdown;
    }
    """

    COMPONENT_CLASSES: ClassVar[set[str]] = {
        "option-list--option",
        "option-list--option-highlighted",
        "option-list--option-hover-highlighted",
    }

:fa-brands-github: Show source on GitHub