https://github.com/marcodpt/navbar
A navbar component
https://github.com/marcodpt/navbar
bootstrap bootstrap5 dom element hyperscript navbar navigation
Last synced: 12 months ago
JSON representation
A navbar component
- Host: GitHub
- URL: https://github.com/marcodpt/navbar
- Owner: marcodpt
- License: mit
- Created: 2021-06-28T19:39:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T21:03:12.000Z (almost 4 years ago)
- Last Synced: 2025-01-13T15:27:50.278Z (about 1 year ago)
- Topics: bootstrap, bootstrap5, dom, element, hyperscript, navbar, navigation
- Language: JavaScript
- Homepage: https://marcodpt.github.io/h/?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmarcodpt%2Fnavbar%2Fsamples.js
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# navbar
> A navbar `DOM` element
[Live demo](https://marcodpt.github.io/h/?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmarcodpt%2Fnavbar%2Fsamples.js)
[Tests](https://marcodpt.github.io/h/tests.html?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmarcodpt%2Fnavbar%2Ftests.js)
## Params
- boolean `whiteText`: whenever the text should be white or black, configure
it with your background choice
- string `fixed`: position where the navbar should be fixed
- string|boolean `expand`: if it is open, use screen sizes: xs, sm, md, lg
- string `type`: primary, secondary, light, dark, etc
- string `home`: url of home
- string `image`: url of image
- string `title`: Title of the navbar
- array of objects `items` with navbar links, properties:
- string `icon`
- string `title`
- string `url`
- array `items`: recursive
- callback `update`(string `url`): The current url of the page for setup the
active route