Dropdown

Toggle list of items displayed as menu.

How it works

When click the trigger, JavaScript toggle dropdown menu’s display style property between none and block to control the menu to show or hide.

Note that dropdown is build on Popper, which provides dynamic positioning. Make sure to include Popper before kutsu or use kutsu.bundle.min.js / kutsu.min.js which contains Popper.

Examples

A simple dropdown triggered by a link.

Placement

To control dropdown menu placement, set placement config option to one of top, right, bottom, left.

Config

NameTypeDefaultDescription
placement”top” | “right” | “bottom” | “left""bottom”Control the dropdown menu placement

Methods

MethodDescription
toggleToggle a dropdown menu to shown or hidden
showShow a dropdown menu
hideHide a dropdown menu