Navbar
Documentation and examples for Bootstrap’s powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, including support for our collapse plugin.
This component is still under development. Please only use the snippets provided below to avoid breaking changes.
View the official docs here
Examples
Basic
<Navbar.Items>
is a helper component which iterates over an array of NavbarItemType
objects and generates the required elements. Alternatively see the manual implementation lower down.
API
Navbar.Toggler
import { Navbar } from 'astro-bootstrap'
Name | Type | Default | Description |
---|---|---|---|
controls required | string |
Must be the same as the id property of the <Navbar.Collapse /> component.
|
Navbar.Collapse
import { Navbar } from 'astro-bootstrap'
Name | Type | Default | Description |
---|---|---|---|
id required | string |
Must be the same as the contols property of the <Navbar.Toggler /> component.
|
Navbar.Dropdown
import { Navbar } from 'astro-bootstrap'
Name | Type | Default | Description |
---|---|---|---|
title required | string |
Set the innerText for the dropdown menu item.
|
|
children required | array of objects | See below for object properties |