All Projects → houyulei → Tabs

houyulei / Tabs

Licence: other
Tabs component of React,designed for mobile.Support gestures and lots of tabs.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to Tabs

Tabbed-Container-Extension
A Qlik Extension that groups Sense objects in a container and displays tabs as a way of navigating through them
Stars: ✭ 21 (-27.59%)
Mutual labels:  tabs
power-close
A browser addon for the tab addict that closes tabs based on domain name or keyword
Stars: ✭ 20 (-31.03%)
Mutual labels:  tabs
react-native-paper-tabs
Smooth and fast cross platform Material Design Tabs for React Native Paper
Stars: ✭ 112 (+286.21%)
Mutual labels:  tabs
ionic4-vue-tabs
sample application using ionic framework tab component with vuejs
Stars: ✭ 17 (-41.38%)
Mutual labels:  tabs
hugo-dynamic-tabs
A Hugo theme component that allows you to add dynamic tabs in your markdown files.
Stars: ✭ 36 (+24.14%)
Mutual labels:  tabs
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (+34.48%)
Mutual labels:  tabs
cursive-tabs
Tabs for gyscos/cursive views 🖥️
Stars: ✭ 21 (-27.59%)
Mutual labels:  tabs
nova-tabs
Another Laravel Nova Tabs Package
Stars: ✭ 60 (+106.9%)
Mutual labels:  tabs
Krypton-Toolkit-Suite-NET-Core
A update to Component factory's krypton toolkit to support .NET Framework 3.5 to .NET Core
Stars: ✭ 27 (-6.9%)
Mutual labels:  tabs
alfred-tabs
🔍 Find Chrome/Safari tabs you want easily
Stars: ✭ 13 (-55.17%)
Mutual labels:  tabs
IndicatorView
IndicatorView Library For Android
Stars: ✭ 41 (+41.38%)
Mutual labels:  tabs
PagerSlidingTabStrip
An interactive indicator to navigate between the different pages of a ViewPager
Stars: ✭ 2,194 (+7465.52%)
Mutual labels:  tabs
tabs
Guitar tabs transcribed by me, primarily in the stoner/doom/sludge metal genres... plus a few random other things.
Stars: ✭ 34 (+17.24%)
Mutual labels:  tabs
RickUmaliVanityWebsite
This is the Perl source code that generates my vanity webpage (hosted at rickumali.com).
Stars: ✭ 19 (-34.48%)
Mutual labels:  tabs
Material-Design-Resume
A simple resume template with a material design touche , testing the Google style CSS ( indigo-green ).
Stars: ✭ 18 (-37.93%)
Mutual labels:  tabs
alfred-browser-tabs
🔍 Search browser tabs from Chrome, Brave, Safari, etc..
Stars: ✭ 302 (+941.38%)
Mutual labels:  tabs
pre-commit-hooks
git pre-commit hooks
Stars: ✭ 71 (+144.83%)
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 (+186.21%)
Mutual labels:  tabs
dockview
Zero dependency layout manager and builder with ReactJS support
Stars: ✭ 45 (+55.17%)
Mutual labels:  tabs
browser-tabs-lock
Using this package, you can synchronise your code logic across browser tabs.
Stars: ✭ 29 (+0%)
Mutual labels:  tabs

Introduce

Tabs component of React,designed for mobile.Support gestures and lots of tabs.

demo

Installation

$ npm install silk-tabs --save

How To Use

import React from 'react';
import ReactDOM from 'react-dom';
import Tabs from 'silk-tabs';

import 'silk-tabs/style/Tabs.css';

const numberOfTabs = 8;
const tabs = [...new Array(numberOfTabs)].map((_, i) => `tab${i}`);

const Panels = [...new Array(numberOfTabs)].map((_, i) =>
    (
        <div key={i}>
            <div className="myItem">{i}</div>
        </div>
    )
);

const tabPanelStyle = {
    container: {
        overflow: 'hidden',
        visibility: 'hidden',
        position: 'relative'
    },
    wrapper: {
        overflow: 'hidden',
        position: 'relative'
    },
    child: {
        float: 'left',
        width: '100%',
        position: 'relative',
        transitionProperty: 'transform',
        height: '250px'
    }
}

const onChange = index => {
    // Don't do costing things.
    // Meybe you should not use this api,use transitionEnd instead.

    console.log(`onChange:${index}`)
}
const transitionEnd = index => {
    // You may do some costing things here instead of in onChange callback for better performance!

    // fetch()
    // render()

    console.log(`transitionEnd:${index}`)
}

const TabsExample = () => (
    <div>
        <Tabs
            defaultIndex={2}
            onChange={onChange}
            transitionEnd={transitionEnd}
            tabs={tabs}
            tabPanelStyle={tabPanelStyle}
            className="myTabs"
        >
            {Panels}
        </Tabs>
    </div>
)

API

Tabs

Props

Property Description Type Default
className className of container String
defaultIndex default index position of tabs Number 0
onChange runs at tab change Function
transitionEnd runs at the end slide transition Function
tabs contents of tabs Array[React.node]
containerStyle style of container
tabStyle style of tabs,useful when tabs fixed top
tabPanelStyle style of TabPanels

tabPanelStyle defaults

    style: {
      container: {
        overflow: 'hidden',
        visibility: 'hidden',
        position: 'relative'
      },

      wrapper: {
        overflow: 'hidden',
        position: 'relative'
      },

      child: {
        float: 'left',
        width: '100%',
        position: 'relative',
        transitionProperty: 'transform'
      }

Tabs.css is styled by px,you can change to rem if needed,for example:

.silk-tabs-nav-scroller .silk-tabs-tab {
    display: inline-block;
    padding: 0 .3rem;
    font-size: 15px;
    height: .88rem;
    line-height: .88rem;
}
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].