npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

b-sidebar

v1.2.1

Published

Vue2Sidebar: Bootstrap 4 sidebar component in Vue 2.0

Downloads

872

Readme

BootstrapSidebar

Bootstrap Sidebar Component for Vue 2.x. Based on this tutorial by Bootstrapious.com

Install

    npm install b-sidebar --save

Video for how to use this component

You can click here to see component in action

Usage

1. Import the component

import BootstrapSideBar from 'b-sidebar';

2.1 Use it globally

Vue.use(BootstrapSideBar);

2.2 Or use it locally

components: {
    BootstrapSideBar
},

3. Update your app or template:

<div>
...
<BootstrapSideBar :sidenavConfig="sidenavConfig" :header="header" :hasNavbar="hasNavbar" :links="sidelinks" :navs="headerLinks">
    <router-view/>
</BootstrapSideBar>
...
</div>

4. main.js or main.ts file changes: You have to import jquery in order to work with smooth transition.

import jquery from 'jquery';
(window as any).$ = (window as any).jQuery = jquery; //If you have typescript based implementation(main.ts)
window.$ = window.jQuery = jquery; //If you have normal javascript file (main.js)
import 'bootstrap';

You can import anything after above line.

Properties

sidenavConfig: {type: Object} - Global Configuration to be done on sidenav. Object will have following properties : { sidenavMainColor : {type: String} = provide color from given options on bootstrap , sidenavBgColor : {type: String} = provide text-color combination to show up well from given options(eg. navbar-light,navbar-dark) on bootstrap, navbarClass : {type: String} = Your custom class to give style you want to navbar, sidenavClass : Your custom class to give style you want to sidenav }

header: {type: Object} - provide this object if you want to have header in navbar. Object will contain properties with following names : title : Title to be shown as header, href : route where you want redirection on click of header.

hasNavbar: {type: Boolean} (Whether you want navbar to be shown or not, by default it will be false),

sidelinks: {type: Array} - Array of links to display in sidebar. Each array item is an Object that has the following properties: label, href, icon, class and links (for nested links),

headerLinks: {type: Array}: - Array of links to display in navbar. Each array item is an Object that has the following properties: label, href, icon, class and navs (for nested links).

Contributing

Contributions and PRs are welcome. You can fork on github

Build Setup


# build for production
npm run build

What upcoming release will contain

Sidenav will have multi level menu items. Sidenav menu items will have class arguement to give custom class to every menu item.