From 1b6caf69c2ab66bd6d2517845f9165e57cdc5058 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 25 Oct 2020 13:29:58 -0700 Subject: Rename Navs to Navs and Tabs (#31965) * Rename Navs to Navs and Tabs Fixes #31378 * Add title to renamed file * Update navs-tabs.md * Add alias/redirect * Fix references to renamed file, tweak title Co-authored-by: Patrick H. Lauke --- site/content/docs/5.0/components/button-group.md | 2 +- site/content/docs/5.0/components/card.md | 2 +- site/content/docs/5.0/components/navs-tabs.md | 665 +++++++++++++++++++++++ site/content/docs/5.0/components/navs.md | 664 ---------------------- site/content/docs/5.0/components/scrollspy.md | 2 +- site/content/docs/5.0/migration.md | 1 + site/data/sidebar.yml | 2 +- 7 files changed, 670 insertions(+), 668 deletions(-) create mode 100644 site/content/docs/5.0/components/navs-tabs.md delete mode 100644 site/content/docs/5.0/components/navs.md diff --git a/site/content/docs/5.0/components/button-group.md b/site/content/docs/5.0/components/button-group.md index 7a5992bbc..b7f700c05 100644 --- a/site/content/docs/5.0/components/button-group.md +++ b/site/content/docs/5.0/components/button-group.md @@ -26,7 +26,7 @@ In order for assistive technologies (such as screen readers) to convey that a se In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used. {{< /callout >}} -These classes can also be added to groups of links, as an alternative to the [`.nav` navigation components]({{< docsref "/components/navs" >}}). +These classes can also be added to groups of links, as an alternative to the [`.nav` navigation components]({{< docsref "/components/navs-tabs" >}}). {{< example >}}
diff --git a/site/content/docs/5.0/components/card.md b/site/content/docs/5.0/components/card.md index baa645be7..cb25187bd 100644 --- a/site/content/docs/5.0/components/card.md +++ b/site/content/docs/5.0/components/card.md @@ -296,7 +296,7 @@ You can quickly change the text alignment of any card—in its entirety or speci ## Navigation -Add some navigation to a card's header (or block) with Bootstrap's [nav components]({{< docsref "/components/navs" >}}). +Add some navigation to a card's header (or block) with Bootstrap's [nav components]({{< docsref "/components/navs-tabs" >}}). {{< example >}}
diff --git a/site/content/docs/5.0/components/navs-tabs.md b/site/content/docs/5.0/components/navs-tabs.md new file mode 100644 index 000000000..d21837e25 --- /dev/null +++ b/site/content/docs/5.0/components/navs-tabs.md @@ -0,0 +1,665 @@ +--- +layout: docs +title: Navs and tabs +description: Documentation and examples for how to use Bootstrap's included navigation components. +group: components +aliases: "/docs/5.0/components/navs/" +toc: true +--- + +## Base nav + +Navigation available in Bootstrap share general markup and styles, from the base `.nav` class to the active and disabled states. Swap modifier classes to switch between each style. + +The base `.nav` component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling. + +{{< callout info >}} +The base `.nav` component does not include any `.active` state. The following examples include the class, mainly to demonstrate that this particular class does not trigger any special styling. + +To convey the active state to assistive technologies, use the `aria-current` attribute — using the `page` value for current page, or `true` for the current item in a set. +{{< /callout >}} + +{{< example >}} + +{{< /example >}} + +Classes are used throughout, so your markup can be super flexible. Use `
    `s like above, `
      ` if the order of your items is important, or roll your own with a `