ui.navbar_options

ui.navbar_options(
    position=MISSING,
    bg=MISSING,
    theme=MISSING,
    underline=MISSING,
    collapsible=MISSING,
    **attrs,
)

Configure the appearance and behavior of the navbar.

Parameters

position : NavbarOptionsPositionType | MISSING_TYPE = MISSING

Determines whether the navbar should be displayed at the top of the page with normal scrolling behavior ("static-top"), pinned at the top ("fixed-top"), or pinned at the bottom ("fixed-bottom"). Note that using "fixed-top" or "fixed-bottom" will cause the navbar to overlay your body content, unless you add padding (e.g., tags.style("body {padding-top: 70px;}"))

bg : str | None | MISSING_TYPE = MISSING

Background color of the navbar (a CSS color).

theme : NavbarOptionsThemeType | MISSING_TYPE = MISSING

The navbar theme: either "dark" for a light text color (on a dark background) or "light" for a dark text color (on a light background). If "auto" (the default) and bg is provided, the best contrast to bg is chosen.

underline : bool | MISSING_TYPE = MISSING

If True, adds an underline effect to the navbar.

collapsible : bool | MISSING_TYPE = MISSING

If True, automatically collapses the elements into an expandable menu on mobile devices or narrow window widths.

attrs : TagAttrValue = {}

Additional HTML attributes to apply to the navbar container element.

Returns:

NavbarOptions A NavbarOptions object configured with the specified options.

Examples

Loading...