3.4.0 • Published 3 years ago

doz-sidenav v3.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

doz-sidenav

A simple side navigation menu for doz.

This component is a porting from Side Navigation Menu example of W3Schools. https://www.w3schools.com/howto/howto_js_sidenav.asp

Install

npm install doz-sidenav

Live here

Usage

Globally

import Doz from 'doz'
new Doz({
        root: '#app',

        template(h) {
            return h`
                <doz-sidenav d:id="sidenav">
                    <a href="#">About</a>
                    <a href="#">Services</a>
                    <a href="#">Clients</a>
                    <a href="#">Contact</a>
                </doz-sidenav>
                <h2>Animated Sidenav Example</h2>
                <p>Click on the element below to open the side navigation menu.</p>
                <div style="font-size:30px;cursor:pointer;" onclick="this.getComponentById('sidenav').openNav()"><i class="fas fa-bars"></i> Open</div>

            `
        }
    });

Props

NameDefaultDescription
background#111CSS background color
backdropBackgroundrgba(0,0,0,0.6)CSS background color of the backdrop
colorlink#818181CSS text color for a item
colorlinkhover#f1f1f1CSS text color for a:hover item
sidepositionleftleft or right
zindex1000CSS z-index

Method

NameArgsDescription
open()The method to open the sidemenu
close()The method to close the sidemenu
isOpen()The method returns true or false

Changelog

You can view the changelog here

License

doz-sidenav is open-sourced software licensed under the MIT license

Author

Pietro Lembo

3.4.0

3 years ago

3.3.0

4 years ago

3.2.0

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

5 years ago

2.0.4

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago