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

bootstrap-4-vertical-tabs

v1.0.7

Published

Responsive vertical tabs navigation component for Bootstrap 4

Downloads

25

Readme

Responsive Vertical Navigation Tabs for Boostrap 4

Build Status

New! 💥

If you use Bootstrap 5, a new package is available for that: bootstrap-5-vertical-tabs

A stylesheet that implements vertically-oriented navigation tabs with Bootstrap 4.

screenshot

This package was inspired by the original bootstrap vertical tabs.

However, that package does not work with Bootstrap 4.

Installation

This package depends on Bootstrap 4, so it is assumed that you already have it installed and/or included in your HTML.

You can use this package either by directly embedding its pre-built stylesheet in your HTML after the boostrap styles like this:

<link
    rel="stylesheet"
    href="https://cdn.jsdelivr.net/npm/[email protected]/dist/b4vtabs.min.css"
    integrity="9nf7vjTEqs0CUpWVZcqp16sbMg+W077uMBNDUJGjS/bMOjJ9h7zqTlGEd2NEqSTa"
    crossorigin="anonymous"
  />

or (recommended) install and build it yourself:

npm install bootstrap-4-vertical-tabs node-sass node-sass-import --save-dev

Building

This assumes that you use SCSS stylesheets.

1. In your stylesheet either:

@import "bootstrap-4-vertical-tabs/scss/custom-variables";
@import "bootstrap-4-vertical-tabs/scss/responsive-vertical-tabs";

or (recommended) define your own values for the custom variables, and then @import responsive-vertical-tabs.scss.

It requires the following variables to be defined:

  • $vertical-tabs-min - this value specifies the minimum view width for display of vertical tabs, below this width vertical tabs turn into regular horizontal tabs:
  • $horizontal-tabs-min - if the view is narrower than this value, horizontal tabs turn into nav-pills-like buttons:
  • $fixed-tab-size - specify this based on the expected text length to be displayed on the tabs. A (long) text that (always) fits into a vertical tab, will get ellipsis-ed when it doesn't fit into horizontal or sideways tabs:

Vertical | Horizontal | Sideways ------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------ ||

changing the value of this variable can allow you to control if and how tab captions might be truncated. The recommended values are between 4 and 12 rem.

  • $left-tabs-text-align and $right-tabs-text-align - these specify the text alignment for vertical left/right tabs. When tabs are displayed as horizontal or nav-pills, the text is always center-aligned.

Check the custom-variables.scss stylesheet for the default values.

2. Compile with node-sass

npx node-sass --importer node_modules/node-sass-import <input>.scss <output>.css

Usage

There are 3 classes defined in the stylesheet which should be applied to the element having nav-tabs bootstrap class: left-tabs, right-tabs, and sideways-tabs:

Left | Right :----------------------------------------------|-------------------------------------------------: left-tabs | right-tabs | sideways-tabs (with left-tabs) | sideways-tabs (with right-tabs) |

The index.html file in the dist directory illustrates all four styles.

You can also see the live demo.