NavBar¶

class bootlace.nav.elements.NavBar(id: str = NOTHING, items: list[~bootlace.nav.core.NavElement] = NOTHING, expand: ~bootlace.size.SizeClass | None = SizeClass.LARGE, color: ~bootlace.style.ColorClass | None = ColorClass.TERTIARY, fluid: bool = True, nav: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.nav'>, classes={'navbar'}, attributes={}), container: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.div'>, classes={'container'}, attributes={}))[source]¶

Bases: NavElement

A navigation bar, typically at the top of the page

This is usually the primary navigation for a site.

Attributes Summary

active

Whether the element is active

color

The color of the navbar, if using a bootstrap color class

container

enabled

Whether the element is enabled

expand

The size of the navbar, if any, used to select when it should expand or collapse

fluid

Whether the navbar should be fluid (e.g. full width).

id

The ID of the navbar

items

The elements in the navbar

nav

Methods Summary

__tag__()

element_state(tag)

Apply active and enabled states to the tag.

Attributes Documentation

active¶

Whether the element is active

color: ColorClass | None¶

The color of the navbar, if using a bootstrap color class

container: Tag¶
enabled¶

Whether the element is enabled

expand: SizeClass | None¶

The size of the navbar, if any, used to select when it should expand or collapse

fluid: bool¶

Whether the navbar should be fluid (e.g. full width)

id: str¶

The ID of the navbar

items: list[NavElement]¶

The elements in the navbar

nav: 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: Text
        • Next: Brand
©2024, Alex Rudy. | Powered by Sphinx 8.1.3 & Alabaster 1.0.0 | Page source