dropdowns

1.0.0 • Public • Published

Dropdowns.js - Simple & Beautiful Dropdowns


Table of Contents


Information

Size: Dropdowns.js takes < 1kb gzipped.

Dependencies: jQuery, Popper.js


Usage

Dropdowns.js is simple to use and does not require a lot of markup:

$(function() {
    $('.dropdown-content').dropdown( $('.content-wrapper > h1'), { 'theme': 'dark', 'animation': 'height', 'opened': true } );
});
<div class="dropdown-content">I want to be in a dropdown :></div>

Options

You have bunch of configuration options:

  • placement: Takes top, bottom, left, right, *-end or *-start. Defaults to bottom.
  • container: The container which contains the dropdown. Accepts selector. Defaults to $('body').
  • behavior: Popper.js Flip Behavior. Defaults to ['bottom', 'top'].
  • animation: Specifies the animation theme the dropdown uses. Available animations are opacity, height, android. Defaults to false.
  • opened: Whether the dropdown opens when initialized. Accepts boolean. Defaults to false.
  • theme: Specifies the theme the dropdown uses. Available themes are default, dark, android. Defaults to default.

Styles

You can find the project's sass file under the root directory. If you want to modify it to integrate Dropdowns.js better into your site, feel free to download and edit it. Then embed the edited version on your site.


To Do

  • Leave your suggestions here

Contributing

We hope that you will consider contributing to Dropdowns.js. Please read this short overview for some information about how to get started:

Learn more about contributing to this repository, Code of Conduct

Contributors

Give the people some ❤️ who are working on this project. See them all at:

https://github.com/slooob/dropdowns.js/graphs/contributors

Semantic Versioning

Dropdowns.js follows Semantic Versioning 2.0 as defined at http://semver.org.

License

MIT License

Copyright (c) 2017 Slooob

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i dropdowns

Weekly Downloads

18

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jonhue