Dropdown¶

class bootlace.nav.elements.Dropdown(items: list[~bootlace.nav.core.NavElement] = NOTHING, id: str = NOTHING, dropdown: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.div'>, classes={'dropdown'}, attributes={}), ul: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.ul'>, classes={'dropdown-menu'}, attributes={}), li: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.li'>, classes=set(), attributes={}), toggle: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.a'>, classes={'dropdown-toggle', 'nav-link'}, attributes={'role': 'button'}), *, title: ~bootlace.util.Taggable | ~dominate.dom_tag.dom_tag | str | ~collections.abc.Iterable[~bootlace.util.Taggable | ~dominate.dom_tag.dom_tag])[source]¶

Bases: SubGroup

A dropdown menu in the nav bar

Attributes Summary

active

Whether the element is active

dropdown

enabled

Whether the element is enabled

id

The ID of the dropdown

items

li

title

The title of the dropdown

toggle

ul

Methods Summary

__tag__()

element_state(tag)

Apply active and enabled states to the tag.

Attributes Documentation

active¶
dropdown: Tag¶
enabled¶

Whether the element is enabled

id: str¶

The ID of the dropdown

items: list[NavElement]¶
li: Tag¶
title: Taggable | dom_tag | str | Iterable[Taggable | dom_tag]¶

The title of the dropdown

toggle: Tag¶
ul: Tag¶

Methods Documentation

__tag__() → html_tag[source]¶
element_state(tag: dom_tag) → dom_tag¶

Apply active and enabled states to the tag.

Bootlace

Navigation

Contents:

  • Getting Started
  • API Reference
    • Breadcrumbs
    • Forms
    • Bootstrap Icons
    • Images
    • Links
    • Navigation
    • Layout, sizing and colors
    • Tables
    • Tools and Utilities

Related Topics

  • Documentation overview
    • API Reference
      • Navigation
        • Previous: Nav
        • Next: Layout, sizing and colors
©2024, Alex Rudy. | Powered by Sphinx 8.1.3 & Alabaster 1.0.0 | Page source