rc-tabs

WebJar for rc-tabs

License

License

MIT
Categories

Categories

Github Development Tools Version Controls React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-react-component-tabs
Last Version

Last Version

8.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

rc-tabs
WebJar for rc-tabs
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/react-component/tabs

Download github-com-react-component-tabs

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-react-component-tabs/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-react-component-tabs</artifactId>
    <version>8.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-react-component-tabs/
implementation 'org.webjars.npm:github-com-react-component-tabs:8.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-react-component-tabs/
implementation ("org.webjars.npm:github-com-react-component-tabs:8.0.2")
'org.webjars.npm:github-com-react-component-tabs:jar:8.0.2'
<dependency org="org.webjars.npm" name="github-com-react-component-tabs" rev="8.0.2">
  <artifact name="github-com-react-component-tabs" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-react-component-tabs', version='8.0.2')
)
libraryDependencies += "org.webjars.npm" % "github-com-react-component-tabs" % "8.0.2"
[org.webjars.npm/github-com-react-component-tabs "8.0.2"]

Dependencies

compile (6)

Group / Artifact Type Version
org.webjars.npm : babel-runtime jar [6,7)
org.webjars.npm : rc-hammerjs jar [0.6.0,0.7)
org.webjars.npm : warning jar [3.0.0,4)
org.webjars.npm : prop-types jar [15,16)
org.webjars.npm : classnames jar [2,3)
org.webjars.npm : create-react-class jar [15,16)

Project Modules

There are no modules declared in this project.

rc-tabs


React Tabs component.

NPM version build status Test coverage Dependencies DevDependencies npm download bundle size

Screenshot

Example

http://localhost:8000/examples

online example: https://tabs.react-component.now.sh/

install

rc-tabs

Feature

Keyboard

  • left and up: tabs to previous tab
  • right and down: tabs to next tab

Usage

import Tabs, { TabPane } from 'rc-tabs';

var callback = function(key) {};

React.render(
  <Tabs defaultActiveKey="2" onChange={callback}>
    <TabPane tab="tab 1" key="1">
      first
    </TabPane>
    <TabPane tab="tab 2" key="2">
      second
    </TabPane>
    <TabPane tab="tab 3" key="3">
      third
    </TabPane>
  </Tabs>,
  document.getElementById('t2'),
);

API

Tabs

name type default description
activeKey string - current active tabPanel's key
animated boolean | { inkBar: boolean, tabPane: boolean } { inkBar: true, tabPane: false } config animation
defaultActiveKey string - initial active tabPanel's key if activeKey is absent
destroyInactiveTabPane boolean false whether destroy inactive TabPane when change tab
direction `'ltr' 'rlt'` 'ltr'
editable { onEdit(type: 'add' 'remove', info: { key, event }), showAdd: boolean, removeIcon: ReactNode, addIcon: ReactNode } -
locale { dropdownAriaLabel: string, removeAriaLabel: string, addAriaLabel: string } - Accessibility locale help text
moreIcon ReactNode - collapse icon
tabBarGutter number 0 config tab bar gutter
tabBarPosition `'left' 'right' 'top'
tabBarStyle style - tab nav style
tabBarExtraContent ReactNode | { left: ReactNode, right: ReactNode } - config extra content
renderTabBar (props, TabBarComponent) => ReactElement - How to render tab bar
prefixCls string 'rc-tabs' prefix class name, use to custom style
onChange (key) => void - called when tabPanel is changed
onTabClick (key) => void - called when tab click
onTabScroll ({ direction }) => void - called when tab scroll

TabPane

name type default description
key string - corresponding to activeKey, should be unique
forceRender boolean false forced render of content in tabs, not lazy render after clicking on tabs
tab ReactNode - current tab's title corresponding to current tabPane
closeIcon ReactNode - Config close icon

Development

npm install
npm start

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-tabs is released under the MIT license.

org.webjars.npm

react-component

React components foundation of http://ant.design

Versions

Version
8.0.2