2018-11-05 12:24:55 +01:00
---
layout: examples
2021-03-02 18:10:10 +01:00
title: Offcanvas navbar template
2019-01-08 17:33:28 +01:00
extra_css:
- "offcanvas.css"
extra_js:
2019-06-30 15:24:24 +02:00
- src: "offcanvas.js"
2018-11-05 12:24:55 +01:00
body_class: "bg-light"
2021-08-04 17:41:51 +02:00
aliases: "/docs/5.1/examples/offcanvas/"
2018-11-05 12:24:55 +01:00
---
2013-06-24 02:17:08 +02:00
2020-09-10 11:39:29 +02:00
< nav class = "navbar navbar-expand-lg fixed-top navbar-dark bg-dark" aria-label = "Main navigation" >
2019-12-25 13:28:26 +01:00
< div class = "container-fluid" >
2019-12-25 17:45:40 +01:00
< a class = "navbar-brand" href = "#" > Offcanvas navbar< / a >
2021-05-11 09:58:45 +02:00
< button class = "navbar-toggler p-0 border-0" type = "button" id = "navbarSideCollapse" aria-label = "Toggle navigation" >
2019-12-25 13:28:26 +01:00
< span class = "navbar-toggler-icon" > < / span >
< / button >
2013-06-24 02:17:08 +02:00
2019-12-25 13:28:26 +01:00
< div class = "navbar-collapse offcanvas-collapse" id = "navbarsExampleDefault" >
2020-06-09 15:44:20 +02:00
< ul class = "navbar-nav me-auto mb-2 mb-lg-0" >
2021-01-08 19:53:04 +01:00
< li class = "nav-item" >
< a class = "nav-link active" aria-current = "page" href = "#" > Dashboard< / a >
2019-12-25 13:28:26 +01:00
< / li >
< li class = "nav-item" >
< a class = "nav-link" href = "#" > Notifications< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link" href = "#" > Profile< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link" href = "#" > Switch account< / a >
< / li >
< li class = "nav-item dropdown" >
2020-07-22 21:33:11 +02:00
< a class = "nav-link dropdown-toggle" href = "#" id = "dropdown01" data-bs-toggle = "dropdown" aria-expanded = "false" > Settings< / a >
2020-03-31 22:41:28 +02:00
< ul class = "dropdown-menu" aria-labelledby = "dropdown01" >
< li > < a class = "dropdown-item" href = "#" > Action< / a > < / li >
< li > < a class = "dropdown-item" href = "#" > Another action< / a > < / li >
< li > < a class = "dropdown-item" href = "#" > Something else here< / a > < / li >
< / ul >
2019-12-25 13:28:26 +01:00
< / li >
< / ul >
2021-11-01 07:33:39 +01:00
< form class = "d-flex" role = "search" >
2020-06-09 15:44:20 +02:00
< input class = "form-control me-2" type = "search" placeholder = "Search" aria-label = "Search" >
2019-09-28 16:16:03 +02:00
< button class = "btn btn-outline-success" type = "submit" > Search< / button >
2019-12-25 13:28:26 +01:00
< / form >
< / div >
2018-11-05 12:24:55 +01:00
< / div >
< / nav >
2016-12-23 08:08:02 +01:00
2021-02-15 20:06:57 +01:00
< div class = "nav-scroller bg-body shadow-sm" >
2020-09-10 11:39:29 +02:00
< nav class = "nav nav-underline" aria-label = "Secondary navigation" >
2020-02-07 12:18:30 +01:00
< a class = "nav-link active" aria-current = "page" href = "#" > Dashboard< / a >
2018-11-05 12:24:55 +01:00
< a class = "nav-link" href = "#" >
Friends
2019-12-25 13:28:26 +01:00
< span class = "badge bg-light text-dark rounded-pill align-text-bottom" > 27< / span >
2018-11-05 12:24:55 +01:00
< / a >
< a class = "nav-link" href = "#" > Explore< / a >
< a class = "nav-link" href = "#" > Suggestions< / a >
< a class = "nav-link" href = "#" > Link< / a >
< a class = "nav-link" href = "#" > Link< / a >
< a class = "nav-link" href = "#" > Link< / a >
< a class = "nav-link" href = "#" > Link< / a >
< a class = "nav-link" href = "#" > Link< / a >
< / nav >
< / div >
2016-12-23 08:08:02 +01:00
2020-03-09 14:37:46 +01:00
< main class = "container" >
2020-09-10 11:39:29 +02:00
< div class = "d-flex align-items-center p-3 my-3 text-white bg-purple rounded shadow-sm" >
2020-06-09 15:44:20 +02:00
< img class = "me-3" src = "/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt = "" width = "48" height = "38" >
2019-09-02 18:19:25 +02:00
< div class = "lh-1" >
2020-09-10 11:39:29 +02:00
< h1 class = "h6 mb-0 text-white lh-1" > Bootstrap< / h1 >
2018-11-05 12:24:55 +01:00
< small > Since 2011< / small >
< / div >
< / div >
2013-06-24 02:17:08 +02:00
2021-01-16 03:07:57 +01:00
< div class = "my-3 p-3 bg-body rounded shadow-sm" >
2019-09-28 16:16:03 +02:00
< h6 class = "border-bottom pb-2 mb-0" > Recent updates< / h6 >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#007bff" color = "#007bff" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< p class = "pb-3 mb-0 small lh-sm border-bottom" >
2018-11-05 12:24:55 +01:00
< strong class = "d-block text-gray-dark" > @username< / strong >
2020-12-11 21:05:33 +01:00
Some representative placeholder content, with some information about this user. Imagine this being some sort of status update, perhaps?
2018-11-05 12:24:55 +01:00
< / p >
2018-01-15 01:06:52 +01:00
< / div >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#e83e8c" color = "#e83e8c" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< p class = "pb-3 mb-0 small lh-sm border-bottom" >
2018-11-05 12:24:55 +01:00
< strong class = "d-block text-gray-dark" > @username< / strong >
2020-12-11 21:05:33 +01:00
Some more representative placeholder content, related to this other user. Another status update, perhaps.
2018-11-05 12:24:55 +01:00
< / p >
< / div >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#6f42c1" color = "#6f42c1" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< p class = "pb-3 mb-0 small lh-sm border-bottom" >
2018-11-05 12:24:55 +01:00
< strong class = "d-block text-gray-dark" > @username< / strong >
2020-12-11 21:05:33 +01:00
This user also gets some representative placeholder content. Maybe they did something interesting, and you really want to highlight this in the recent updates.
2018-11-05 12:24:55 +01:00
< / p >
< / div >
2020-06-09 15:44:20 +02:00
< small class = "d-block text-end mt-3" >
2018-11-05 12:24:55 +01:00
< a href = "#" > All updates< / a >
< / small >
< / div >
2013-06-24 02:17:08 +02:00
2021-01-16 03:07:57 +01:00
< div class = "my-3 p-3 bg-body rounded shadow-sm" >
2019-09-28 16:16:03 +02:00
< h6 class = "border-bottom pb-2 mb-0" > Suggestions< / h6 >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#007bff" color = "#007bff" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< div class = "pb-3 mb-0 small lh-sm border-bottom w-100" >
2019-12-25 13:28:26 +01:00
< div class = "d-flex justify-content-between" >
2018-11-05 12:24:55 +01:00
< strong class = "text-gray-dark" > Full Name< / strong >
< a href = "#" > Follow< / a >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< span class = "d-block" > @username< / span >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< / div >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#007bff" color = "#007bff" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< div class = "pb-3 mb-0 small lh-sm border-bottom w-100" >
2019-12-25 13:28:26 +01:00
< div class = "d-flex justify-content-between" >
2018-11-05 12:24:55 +01:00
< strong class = "text-gray-dark" > Full Name< / strong >
< a href = "#" > Follow< / a >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< span class = "d-block" > @username< / span >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< / div >
2019-12-25 13:28:26 +01:00
< div class = "d-flex text-muted pt-3" >
2020-06-09 15:44:20 +02:00
{{< placeholder width = "32" height = "32" background = "#007bff" color = "#007bff" class = "flex-shrink-0 me-2 rounded" > }}
2019-09-28 16:16:03 +02:00
< div class = "pb-3 mb-0 small lh-sm border-bottom w-100" >
2019-12-25 13:28:26 +01:00
< div class = "d-flex justify-content-between" >
2018-11-05 12:24:55 +01:00
< strong class = "text-gray-dark" > Full Name< / strong >
< a href = "#" > Follow< / a >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< span class = "d-block" > @username< / span >
2018-01-15 01:06:52 +01:00
< / div >
2018-11-05 12:24:55 +01:00
< / div >
2020-06-09 15:44:20 +02:00
< small class = "d-block text-end mt-3" >
2018-11-05 12:24:55 +01:00
< a href = "#" > All suggestions< / a >
< / small >
< / div >
< / main >