Skip to content

Commit fed31e4

Browse files
authored
docs(nav): Update live examples
1 parent 03d1ded commit fed31e4

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

docs/components/nav/README.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Navs
22

33
> Navigation available in Bootstrap share general markup and styles,
4-
from the base `b-nav` class to the active and disabled states.
4+
from the base `<b-nav>` class to the active and disabled states.
55
Swap modifier props to switch between each style.
66

77
```html
@@ -13,8 +13,7 @@
1313
<b-nav-item disabled>Disabled</b-nav-item>
1414
</b-nav>
1515

16-
<br>
17-
<br>
16+
<br><br>
1817

1918
<b-nav tabs>
2019
<b-nav-item active>Active</b-nav-item>
@@ -23,8 +22,7 @@
2322
<b-nav-item disabled>Disabled</b-nav-item>
2423
</b-nav>
2524

26-
<br>
27-
<br>
25+
<br><br>
2826

2927
<b-nav pills>
3028
<b-nav-item active>Active</b-nav-item>
@@ -34,11 +32,11 @@
3432
</b-nav>
3533
</div>
3634

37-
<!-- nav.vue -->
35+
<!-- nav-1.vue -->
3836
```
3937

4038
### Link Appearance
41-
The base `b-nav` component is built with flexbox and provides a strong
39+
The base `<b-nav>` component is built with flexbox and provides a strong
4240
foundation for building all types of navigation components. It includes
4341
some style overrides (for working with lists), some link padding for larger
4442
hit areas, and basic disabled styling. No active states are included in the base nav.
@@ -74,48 +72,54 @@ Use the pill style by setting the prop `pills`.
7472
Force your `b-nav` content to extend the full available width.
7573

7674
#### fill:
77-
To proportionately fill all available space with your `b-nav-item`s, set
78-
the `fill` prop. Notice that all horizontal space is occupied, but not
75+
To proportionately fill all available space with your `<b-nav-item>` components,
76+
set the `fill` prop. Notice that all horizontal space is occupied, but not
7977
every nav item has the same width.
8078

8179
#### Justified:
8280
For equal-width elements, set prop `justified` instead. All horizontal space
83-
will be occupied by nav links, but unlike `fill` above, every nav item will be
84-
the same width.
81+
will be occupied by nav links, but unlike `fill` above, every `<b-nav-item>`
82+
will be the same width.
8583

8684
### Vertical variation
8785
By default navs appear on a horizontal line. Stack your navigation by setting
8886
the `vertical` prop.
8987

9088
### Dropdown support
91-
Use the `b-nav-item-dropdown` to place dropdown items within your nav.
89+
Use `<b-nav-item-dropdown>` to place dropdown items within your nav.
9290

9391
```html
9492
<b-nav pills>
9593
<b-nav-item active>Active</b-nav-item>
9694
<b-nav-item>Link</b-nav-item>
97-
<b-nav-item-dropdown text="Dropdown 1,2,3" right-alignment>
95+
<b-nav-item-dropdown id="nav2_ddown" text="Dropdown 1,2,3" right-alignment>
9896
<b-dropdown-item>one</b-dropdown-item>
9997
<b-dropdown-item>two</b-dropdown-item>
10098
<b-dropdown-divider></b-dropdown-divider>
10199
<b-dropdown-item>three</b-dropdown-item>
102100
</b-nav-item-dropdown>
103101
</b-nav>
102+
103+
<!-- nav-2.vue -->
104104
```
105105

106106
### Using in Navbar
107-
When using `b-nav` within a `b-navbar`, set the `navbar-nav` prop.
107+
When using `<b-nav>` within a `<b-navbar>`, set the `navbar-nav` prop.
108108

109-
### Tabbed content
110-
See the [`b-tabs`](./tabs) component.
109+
### Tabbed content support
110+
See the [`<b-tabs>`](./tabs) component.
111111

112112
### Regarding accessibility
113-
If you’re using `b-nav` to provide a navigation bar, be sure to add a
114-
`role="navigation"` to the most logical parent container of `b-nav`, or wrap
115-
a `<nav>` element around `b-nav`. Do not add the role to the `b-nav` itself,
113+
If you’re using `<b-nav>` to provide a navigation bar, be sure to add a
114+
`role="navigation"` to the most logical parent container of `<b-nav>`, or wrap
115+
a `<nav>` element around `<b-nav>`. Do **not** add the role to the `<b-nav>` itself,
116116
as this would prevent it from being announced as an actual list by assistive technologies.
117117

118+
When using a `<b-nav`-item-dropdown in your `<b-nav->`, bes ure to assign a unique `id`
119+
prop value to the `<b-nav-dropdown>` so that the apropriate `aria-*` attributes can
120+
be automatically generated.
121+
118122
### See Also
119-
- [`b-tabs`](./tabs) to create tabbable panes of local content, even via dropdown menus.
120-
- [`b-navbar`](./navbar) a wrapper that positions branding, navigation, and other elements in a concise header.
121-
- [`b-dropdown`](./dropdown) for components that you can place inside `b-nav-item-dropdown`
123+
- [`<b-tabs>`](./tabs) to create tabbable panes of local content, even via dropdown menus.
124+
- [`<b-navbar>`](./navbar) a wrapper that positions branding, navigation, and other elements in a concise header.
125+
- [`<b-dropdown>`](./dropdown) for sub-components that you can place inside `<b-nav-item-dropdown>`

0 commit comments

Comments
 (0)