Create simple toggleable submenu.
The dropdown is working with a
.dropdown class on an element. To trigger it, you
have to create an element with the
.dropdown-trigger class inside of it.
The dropdown is working with our color palette.
Right aligned dropdown content
To align your dropdown content with the right border of the dropdown trigger, you just have to add the
.right-aligned class on your
To constrain the width of the dropdown content to fit the dropdown trigger width, just add the
.constrain-width class to your
Dropdown inside a navbar
A dropdown is easily usable inside a navbar, using a
.navbar-link as a dropdown
Once HTML was setup, you can activate the dropdown with this simple code.
Just pass the id of your dropdown that you want to activate.
The animationType option is activable through the JS initialization. the 'fade' one is creating a smooth fade in
animation of the dropdown content.
Note that this option is not working with the hover option.
|hover||false||Dropdown shown when hover event is triggered instead of click event.|
Choose animation type when dropdown is opened or closed.
Accepted values are
|animationDuration||300||Opening and closing animation duration in ms.|
|autoClose||true||Closes other dropdown when this Dropdown instance is opened.|
|preventViewport||false||Prevent dropdown content to exceed viewport size.|
|ax.dropdown.setup||Event sent when the dropdown has been setup.|
|ax.dropdown.open||Event sent when the
|ax.dropdown.opened||Event sent when the dropdown has been opened.|
|ax.dropdown.close||Event sent when the
|ax.dropdown.closed||Event sent when the dropdown has been closed.|