📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

sidevue

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidevue

A VueJs powered Sidebar -> A SideVue

2.1.1
latest
Source
npm
Version published
Weekly downloads
5
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

SideVue

A VueJs powered Sidebar to drop into your projects with ease.

SideVue requires a bundler like Webpack or Browserify

Sidevue now uses vue 2. If you need the sidebar for vue 1 use Sidevue version ^1.0.0

Installation

npm install --save sidevue

Usage

Initialize SideVue

You can have as many Sidebars as you want. We support from top, bottom, left, right moving sidebars.

import sidevue from 'sidevue';

Vue.component('sidevue', sidevue);

Use the Component

E.g.:

<sidevue close-gap="50px" open-gap="50%" direction="top" sidevue-class="yourCustomClass">
    /* Sidebar Content */
</sidevue>

<sidevue close-gap="-50px" open-gap="400rem" direction="bottom" sidevue-class="yourCustomClass">
<sidevue close-gap="50px" open-gap="50%" direction="left" sidevue-class="yourCustomClass">
<sidevue close-gap="50px" open-gap="50%" direction="right" sidevue-class="yourCustomClass">

Talk with your sidebar(s)

The sideVueBus lets you talk with your sidebars

import { sideVueBus } from 'sidevue';

sideVueBus.$on('sidevue-close' + sidevueId, function);
sideVueBus.$on('sidevue-open' + sidevueId, function);
sideVueBus.$on('sidevue-toggle' + sidevueId, function);

If you have only one sidebar you can omit the id -> this works too

import { sideVueBus } from 'sidevue';

sideVueBus.$on('sidevue-toggle', function);

Keywords

vuejs

FAQs

Package last updated on 16 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts