mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 11:52:39 +02:00
feat(v2): hide navbar on scroll (#2055)
* feat(v2): hide navbar on scroll * Turn on hide option * Refactor after review
This commit is contained in:
parent
ace93c5a14
commit
5bfa5d6579
5 changed files with 92 additions and 4 deletions
|
@ -90,6 +90,23 @@ module.exports = {
|
|||
|
||||
Outbound links automatically get `target="_blank" rel="noopener noreferrer"`.
|
||||
|
||||
### Auto-hide sticky navbar
|
||||
|
||||
You can enable this cool UI feature that automatically hides the navbar when a user starts scrolling down the page, and show it again when the user scrolls up.
|
||||
|
||||
```js
|
||||
// docusaurus/config.js
|
||||
module.exports = {
|
||||
...
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
hideOnScroll: true,
|
||||
},
|
||||
...
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## Footer
|
||||
|
||||
## `CodeBlock`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue