Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bootstrap-4-vertical-tabs
Advanced tools
Readme
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.
This package was inspired by the original bootstrap vertical tabs.
However, that package does not work with Bootstrap 4.
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/bootstrap-4-vertical-tabs@1.0.6/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
This assumes that you use SCSS stylesheets.
@import "bootstrap-4-vertical-tabs/scss/custom-variables";
@import "bootstrap-4-vertical-tabs/scss/responsive-vertical-tabs";
@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.
npx node-sass --importer node_modules/node-sass-import <input>.scss <output>.css
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.
FAQs
Responsive vertical tabs navigation component for Bootstrap 4
The npm package bootstrap-4-vertical-tabs receives a total of 5 weekly downloads. As such, bootstrap-4-vertical-tabs popularity was classified as not popular.
We found that bootstrap-4-vertical-tabs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.