Skip to content

Commit 98f1b7c

Browse files
committed
feat: make flowbite-navbar-* usable as directive
1 parent c6ebc43 commit 98f1b7c

25 files changed

+248
-30
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Navbar Component
3+
route: component
4+
keyword: NavbarPage
5+
---
6+
7+
{% import "../../shared/component-deprecated-usage.md" as cdu %}
8+
9+
{{ cdu.deprecated() }}
10+
11+
## Default navbar
12+
13+
{{ NgDocActions.demo('c_default', {container: false}) }}
14+
15+
```angular-html file="./component/_default.component.html" group="default" name="html"
16+
17+
```
18+
19+
```angular-ts file="./component/_default.component.ts"#L1-L5 group="default" name="typescript"
20+
21+
```
22+
23+
## Navbar with brand
24+
25+
Use this example to display a brand element inside the navbar by importing the
26+
`NavbarBrandComponent` component.
27+
28+
{{ NgDocActions.demo('c_brand', {container: false}) }}
29+
30+
```angular-html file="./component/_brand.component.html" group="brand" name="html"
31+
32+
```
33+
34+
```angular-ts file="./component/_brand.component.ts"#L1-L6 group="brand" name="typescript"
35+
36+
```
37+
38+
## Navbar with dropdown
39+
40+
Use this example to feature a dropdown menu when clicking on the settings dropdown inside the navbar
41+
by importing the `DropdownComponent` and `DropdownItemComponent` components.
42+
43+
{{ NgDocActions.demo('c_dropdown', {container: false}) }}
44+
45+
```angular-html file="./component/_dropdown.component.html" group="dropdown" name="html"
46+
47+
```
48+
49+
```angular-ts file="./component/_dropdown.component.ts"#L1-L7 group="dropdown" name="typescript"
50+
51+
```
52+
53+
## Responsive navbar
54+
55+
On mobile device the navigation bar will be collapsed and you will be able to use the hamburger menu
56+
to toggle the menu items by adding the `NavbarToggleComponent` component.
57+
58+
{{ NgDocActions.demo('c_responsive', {container: false}) }}
59+
60+
```angular-html file="./component/_responsive.component.html" group="responsive" name="html"
61+
62+
```
63+
64+
```angular-ts file="./component/_responsive.component.ts"#L1-L7 group="responsive" name="typescript"
65+
66+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<nav
2+
flowbite-navbar
3+
[isOpen]="true">
4+
<div flowbite-navbar-brand>Flowbite</div>
5+
6+
<div flowbite-navbar-content>
7+
<li flowbite-navbar-item>Home</li>
8+
<li flowbite-navbar-item>Contacts</li>
9+
</div>
10+
</nav>

0 commit comments

Comments
 (0)