--- stage: none group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- # DropLab A generic dropdown for all of your custom dropdown needs. ## Usage DropLab can be used by adding a `data-dropdown-trigger` HTML attribute. This attribute allows us to find the "trigger" _(toggle)_ for the dropdown, whether it's a button, link or input. The value of the `data-dropdown-trigger` should be a CSS selector that DropLab can use to find the trigger's dropdown list. You should also add the `data-dropdown` attribute to declare the dropdown list. The value is irrelevant. The DropLab class has no side effects, so you must always call `.init` when the DOM is ready. `DropLab.prototype.init` takes the same arguments as `DropLab.prototype.addHook`. If you don't provide any arguments, it globally queries and instantiates all DropLab-compatible dropdowns. ```html Toggle