Navigation bars

Use the responsive navigation bar from Spaces to add nav items and multi-level nested dropdowns for a seamless navigation

The following navigation bar is a basic example from what is used in Spaces:

<nav class="navbar navbar-expand-lg navbar-transparent navbar-dark navbar-theme-primary mb-4">
    <div class="container position-relative">
        <a class="navbar-brand me-lg-3" href="#">
            <img class="navbar-brand-dark" src="../../assets/brand/light.svg" alt="menuimage">
            <img class="navbar-brand-light" src="../../assets/brand/dark.svg" alt="menuimage">
        </a>
        <div class="navbar-collapse collapse w-100" id="navbar-default-primary">
            <div class="navbar-collapse-header">
                <div class="row">
                    <div class="col-6 collapse-brand">
                        <a href="#">
                            <img src="../../assets/img/brand/dark.svg" alt="menuimage">
                        </a>
                    </div>
                    <div class="col-6 collapse-close">
                        <i class="fas fa-times" data-toggle="collapse" role="button"
                            data-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                            aria-expanded="false" aria-label="Toggle navigation"></i>
                    </div>
                </div>
            </div>
            <ul class="navbar-nav navbar-nav-hover align-items-lg-center">
                <li class="nav-item">
                    <a href="#" class="nav-link">Home</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">About</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">Contact</a>
                </li>
            </ul>
        </div>
        <div class="d-flex align-items-center">
            <button class="navbar-toggler ms-2" type="button" data-toggle="collapse"
                data-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
        </div>
    </div>
</nav>

Example

Use the following code inside the navbar-nav unordered list tag to add a simple navigation item:

<li class="nav-item">
    <a href="#" class="nav-link">Nav item 1</a>
</li>
<li class="nav-item">
    <a href="#" class="nav-link">Nav item 1</a>
</li>

We’ve made sure that you can change the colors of the navbar very easily. All you have to do is add the modifier class .navbar-theme-* (eg. .navbar-theme-primary, .navbar-theme-secondary, .navbar-theme-dark) in order to change the colors. As you can see, even the dropdown item hover effect will change their color.

<nav class="navbar navbar-expand-lg navbar-transparent navbar-light bg-secondary mb-4">
    <div class="container position-relative">
        <a class="navbar-brand me-lg-3" href="#">
            <img class="navbar-brand-dark" src="../../assets/brand/light.svg" alt="menuimage">
            <img class="navbar-brand-light" src="../../assets/brand/dark.svg" alt="menuimage">
        </a>
        <div class="navbar-collapse collapse w-100" id="navbar-default-primary">
            <div class="navbar-collapse-header">
                <div class="row">
                    <div class="col-6 collapse-brand">
                        <a href="#">
                            <img src="../../assets/img/brand/dark.svg" alt="menuimage">
                        </a>
                    </div>
                    <div class="col-6 collapse-close">
                        <i class="fas fa-times" data-bs-toggle="collapse" role="button"
                            data-bs-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                            aria-expanded="false" aria-label="Toggle navigation"></i>
                    </div>
                </div>
            </div>
            <ul class="navbar-nav navbar-nav-hover align-items-lg-center">
                <li class="nav-item">
                    <a href="#" class="nav-link">Home</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">About</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">Contact</a>
                </li>
            </ul>
        </div>
        <div class="d-flex align-items-center">
            <button class="navbar-toggler ms-2" type="button" data-bs-toggle="collapse"
                data-bs-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
        </div>
    </div>
</nav>

Using .navbar-dark will make the content within the navbar white while .navbar-light will make the content and menu items dark. We made sure the logo also changes based on the .navbar-brand-dark and .navbar-brand-light identifier classes

<nav class="navbar navbar-expand-lg navbar-transparent navbar-light bg-gray-100 mb-4">
    <div class="container position-relative">
        <a class="navbar-brand me-lg-3" href="#">
            <img class="navbar-brand-dark" src="../../assets/brand/light.svg" alt="menuimage">
            <img class="navbar-brand-light" src="../../assets/brand/dark.svg" alt="menuimage">
        </a>
        <div class="navbar-collapse collapse w-100" id="navbar-default-primary">
            <div class="navbar-collapse-header">
                <div class="row">
                    <div class="col-6 collapse-brand">
                        <a href="#">
                            <img src="../../assets/img/brand/dark.svg" alt="menuimage">
                        </a>
                    </div>
                    <div class="col-6 collapse-close">
                        <i class="fas fa-times" data-bs-toggle="collapse" role="button"
                            data-bs-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                            aria-expanded="false" aria-label="Toggle navigation"></i>
                    </div>
                </div>
            </div>
            <ul class="navbar-nav navbar-nav-hover align-items-lg-center">
                <li class="nav-item">
                    <a href="#" class="nav-link">Home</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">About</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link">Contact</a>
                </li>
            </ul>
        </div>
        <div class="d-flex align-items-center">
            <button class="navbar-toggler ms-2" type="button" data-bs-toggle="collapse"
                data-bs-target="#navbar-default-primary" aria-controls="navbar-default-primary"
                aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
        </div>
    </div>
</nav>