ayanshuai / react-awesome-tabs

Get your components together.

Home Page:https://gao-sun.github.io/react-awesome-tabs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-awesome-tabs

Get your components together.

Live demo and get started @react-awesome-tabs.

Documentation

Introduction

react-awesome-tabs uses a 'Redux' way to manage all the things, that is to say there is no 'state' in this component. All the changes are based on 'property'.

<Tabs>

Variables

Property Name Type Description
active Number Current active tab index.
draggable Boolean When it is true, onTabPositionChange is required as well.
showAdd Boolean Show the add button in the right. onTabAdd is required.
color String Change the border color.

Functions

Property Name Parameter Description
onTabSwitch (index) Index needs to be actived.
onTabPositionChange (a, b) Switch from index a to index b, and vice versa.
onTabClose (index) Index needs to be closed.
onTabAdd ()

<Tab>

Variables

Property Name Type Description
title String
showClose Boolean
icon String or Component Accpetable strings: "loading", "warning", or put your own icon in it.

About

Get your components together.

https://gao-sun.github.io/react-awesome-tabs/

License:MIT License


Languages

Language:JavaScript 56.3%Language:CSS 43.7%