@default-js/defaultjs-html-dropdown

1.2.1 • Public • Published

defaultjs-html-dropdown

How to Install via NPM

npm install @default-js/defaultjs-html-dropdown@latest
//main.js
import "@default-js/defaultjs-html-dropdown";
import "@default-js/defaultjs-html-dropdown/src/css/";

How to Install via Script Tag

Include all files and folder of dist/* into your project and include browser-defaultjs-html-dropdown.min.js and dropdown.css into your html page. If you are using the DropdownElement at javascript code, be sure that the include is before your code executed.

<html>
    <head>
        <link href="css/dropdown.css" rel="stylesheet">
        <script src="browser-defaultjs-html-dropdown.min.js" defer></script>
    </head>
</html>

Usage

<d-dropdown>
    <!-- your dropdown item title -->
    Menu 
    <d-dropdown-content>
        <!-- your dropdown content -->
        <div> menu entry</div>
        <div> menu entry</div>
        <div> menu entry</div>
    </d-dropdown-content>
</d-dropdown>

Javascript API

Class DropdownElement

Attribute Description
mode click or auto -> if value click, it forces the dropdown menu to open on click event
active boolean -> true: open dropdown menu, false: close dropdown menu

Dependents (0)

Package Sidebar

Install

npm i @default-js/defaultjs-html-dropdown

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

395 kB

Total Files

16

Last publish

Collaborators

  • twilighttitus