1.0.0 • Published 3 years ago

@shapla/vue-sidenav v1.0.0

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

Shapla Side Navigation

A simple side overlay navigation. Normally to use to develop admin panel.

Table of contents

Installation

npm install --save @shapla/vue-sidenav

Usage

Styles

with Sass:

import '@shapla/vue-sidenav/src/index.scss';

with CSS:

import '@shapla/vue-sidenav/dist/style.css';

Javascript Instantiation

import ShaplaSidenav from '@shapla/vue-sidenav';

export default {
  name: 'Hello',

  components: {
    ShaplaSidenav
  }
}
<shapla-sidenav :active="true" nav-width="300px" position="left" :show-overlay="true">
  Nav content goes here
</shapla-sidenav>

Props

PropertyTypeRequiredDefaultDescription
activeBooleannotrueIf set true, side navigation will be opened.
showOverlayBooleannotrueIf set true, overlay background will be shown
navWidthStringno300pxSidenav width in pixels.
positionStringnoleftValue can be left or right.

Listeners

The side navigation component fires the following events:

close: When outside area is clicked, it fires the event.

<!-- template -->
<shapla-sidenav @close="handleClose"></shapla-sidenav>


<!-- method -->
methods: {
handleClose(){
// Handle close event
}
}