NavbarModern
NavbarModern is a branded navigation pattern that wraps the core Navbar with sticky and glass styling defaults.
Quick Start
from faststrap import NavbarModern
NavbarModern(
brand="Faststrap",
items=[
("Docs", "/docs"),
("Showcase", "/showcase"),
("GitHub", "https://github.com/Faststrap-org/Faststrap"),
],
)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
brand |
Any |
required | Brand content passed to Navbar. |
items |
list[Any] \| None |
None |
Navigation items passed to Navbar. |
sticky |
bool |
True |
Adds sticky-top. |
glass |
bool |
True |
Adds the navbar-glass class. |
**kwargs |
Any |
Extra attributes passed to Navbar. |
Notes
- This component requires Bootstrap JavaScript because it delegates to
Navbar. - Use the lower-level
Navbarwhen you need complete control over Bootstrap behavior. - Use
clsto add brand-specific styling while keeping the default pattern classes.
API Reference
faststrap.components.patterns.navbar.NavbarModern(brand, items=None, sticky=True, glass=True, **kwargs)
A premium, modern navbar with optional glassmorphism.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
brand
|
Any
|
Brand content |
required |
items
|
list[Any] | None
|
List of nav items |
None
|
sticky
|
bool
|
Stick to top |
True
|
glass
|
bool
|
Apply glassmorphism effect |
True
|
**kwargs
|
Any
|
Additional attributes |
{}
|
Returns:
| Type | Description |
|---|---|
Nav
|
Navbar component with modern styling |
Note
Marked as @beta - API may change in future releases.