All Projects → prog666 → tabs

prog666 / tabs

Licence: other
pure javascript tabs for ES6

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to tabs

tabs
Guitar tabs transcribed by me, primarily in the stoner/doom/sludge metal genres... plus a few random other things.
Stars: ✭ 34 (+209.09%)
Mutual labels:  tabs
un-material-tab
(deprecated) Custom tab layout which can be used as a material TabLayout alternative and contains basic functionality which Google's TabLayout has.
Stars: ✭ 83 (+654.55%)
Mutual labels:  tabs
react-native-segment-controller
A react-native segment controller(Tab) for both ios and android.
Stars: ✭ 18 (+63.64%)
Mutual labels:  tabs
browser-tabs-lock
Using this package, you can synchronise your code logic across browser tabs.
Stars: ✭ 29 (+163.64%)
Mutual labels:  tabs
dockview
Zero dependency layout manager and builder with ReactJS support
Stars: ✭ 45 (+309.09%)
Mutual labels:  tabs
Mtgdb
Mtgdb.Gui - desktop app to search MTG cards and build decks
Stars: ✭ 46 (+318.18%)
Mutual labels:  tabs
pre-commit-hooks
git pre-commit hooks
Stars: ✭ 71 (+545.45%)
Mutual labels:  tabs
a11y-accordion-tabs
A script for an accessible accordion tabs component
Stars: ✭ 50 (+354.55%)
Mutual labels:  tabs
nova-tabs
Another Laravel Nova Tabs Package
Stars: ✭ 60 (+445.45%)
Mutual labels:  tabs
vue-slim-tabs
A slim tab component for Vue.js (1.3 kB minified)
Stars: ✭ 104 (+845.45%)
Mutual labels:  tabs
alfred-tabs
🔍 Find Chrome/Safari tabs you want easily
Stars: ✭ 13 (+18.18%)
Mutual labels:  tabs
Material-Design-Resume
A simple resume template with a material design touche , testing the Google style CSS ( indigo-green ).
Stars: ✭ 18 (+63.64%)
Mutual labels:  tabs
vanilla-js-tabs
Vanilla JavaScript tabs - tiny and simple.
Stars: ✭ 54 (+390.91%)
Mutual labels:  tabs
JJ CAMP
JavaScript & jQuery 정복 CAMP × 패스트캠퍼스
Stars: ✭ 19 (+72.73%)
Mutual labels:  ecmascript2015
joplin-note-tabs
Allows to open several notes at once in tabs and pin them.
Stars: ✭ 150 (+1263.64%)
Mutual labels:  tabs
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (+254.55%)
Mutual labels:  tabs
Tabs
Tabs component of React,designed for mobile.Support gestures and lots of tabs.
Stars: ✭ 29 (+163.64%)
Mutual labels:  tabs
Excited-Gem
An Extension to manage your tabs and other browser-related features.
Stars: ✭ 18 (+63.64%)
Mutual labels:  tabs
boss-lite
Boss Lite - React Redux Material Admin Template
Stars: ✭ 148 (+1245.45%)
Mutual labels:  ecmascript2015
guitar-tabs-to-MIDI
A program that converts Guitar Tabs into MIDI files.
Stars: ✭ 38 (+245.45%)
Mutual labels:  tabs

Tabs module for es6

npm download count Current tag Current tag Issues closed Dependency Status Reference Status

Requirements

Features

  • Nested tabs
  • Lazy load
  • No dependencies
  • ES2015 support (use babel)

if you need IE9 support, it should work (i didn't test yet) with classList polyfill

simple demo

Install

npm

npm i -S future-tabs

bower

bower i -S future-tabs

Markup

group tabs with tabs block, internal structure does not matter

<div class="tabs">
	<div class="tabs__toggle tabs__toggle_active">tab 1</div>
	<div class="tabs__toggle">tab 2</div>
	<div class="tabs__tab">tab 1 content</div>
	<div class="tabs__tab">tab 2 content</div>
</div>

Lazy Load

<div class="tabs">
	<div class="tabs__toggle tabs__toggle_active">tab 1</div>
	<div class="tabs__toggle">tab 2</div>
	<div class="tabs__tab">tab 1 content</div>
	<div class="tabs__tab" data-src="path/to/contentToBeLoaded">preloader</div>
</div>

Simple usage

import initTabs from 'future-tabs';
initTabs('.tabs');

or

initTabs({
	selector: '.tabs',
	blockClassName: 'tabs' //optional
})

Extended usage

import {Tabs} from 'future-tabs';
const tabs = new Tabs(document.querySelector('.tabs'));

or

import {Tabs} from 'future-tabs';
const tabsDiv = document.getElementById('someCustomId');
new Tabs(tabsDiv, 'tabs'); // 'tabs' here is _bem block class name

Destroy

const tabs = new Tabs(DOMElement);
tabs.destroy();

if you want to init again just do

tabs.init();

If you don't use commonjs build system (like browserify or webpack) you should add this before script

<script>
	var module = {exports: {}};
	var exports = module.exports;
</script>

Build

gulp

todo

  • tests

Changelog

1.3.2

  • add destroy method #5

1.3.0

  • add nested tabs

1.2.1

  • xhr error output to console

1.2.0

  • add lazy load

1.1.0

  • block class name (prefix) can be set

1.0.0

  • you are welcome to use it and contribute
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].