diff --git a/docs/pages/components/layout.md b/docs/pages/components/layout.md index f2277dfbb..a20678971 100644 --- a/docs/pages/components/layout.md +++ b/docs/pages/components/layout.md @@ -29,6 +29,14 @@ Reasons why you may want to disable sticky: 1. For `aside` / `menu` or blog sites sometimes this space is used for ads based on how far down a user scrolls. 1. For `banner`, `header`, `sub-header` it can cause a lot of clutter on the screen and you may only want to show certain elements are the user scrolls. +## Toggle navigation + +Toggling navigation can be done in a number of ways. + +1. `` - The button with `data-navigation-toggle` must be inside the `` component. +1. `` - +1. `document.querySelector("button").addEventListener("click", () => document.querySelector("wa-layout").toggleNavigation())` + ```html:preview