By providing your menu information to the src/lib/menu
file, this app can build your HTML markup, along with CSS and JS.
For now, there is only one "mode": a "horizontal" menu with dropdown submenus.
I may add other "modes" in the future.
Open demo of the accessible dropdown menu
- Clone this repo to your computer
- Open this folder in a Terminal window
- Run
yarn install
- Open the
src/lib/menu
file and provide your information
Open src/lib/menu_sample
for example markup.
If you wish to modify the access-menu-horizontal.min.css
file, you can do so via design tokens.
Open the tokens-menu.json
file and change the values.
If you wish to customize or add CSS properties that are not already available, you will need to edit or clone the pcss/access-menu-horizontal.pcss
or create a new file with your desired changes.
Run yarn run dev
to test the app.
You can preview the production build with yarn run preview
.
To create the final markup for your menu:
- Run
yarn run build
- Open the
index.html
file in thedocs
directory - Find and copy/paste the entire
<nav class="acc-nav"></nav>
element - You will also need the
access-menu.min.js
andaccess-menu-horizontal.min.css
files.
You will not need the other CSS files. These CSS files are just for this app.
You can ignore everything else in the docs
directory. I use the docs
folder for the Github page.
If you wish to contribute, please create a Pull Request. I will reach out for discussion.
If you wish to report a bug, please create an Issue. I will reach out for discussion.