Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/react-tabs
Tabs component for react.
https://github.com/afeiship/react-tabs
react tab tabs
Last synced: 22 days ago
JSON representation
Tabs component for react.
- Host: GitHub
- URL: https://github.com/afeiship/react-tabs
- Owner: afeiship
- License: mit
- Created: 2017-06-02T01:52:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T06:47:46.000Z (almost 4 years ago)
- Last Synced: 2023-09-19T09:56:58.371Z (over 1 year ago)
- Topics: react, tab, tabs
- Language: JavaScript
- Size: 409 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-tabs
> Tabs component for react.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-tabs
```## properties
| Name | Type | Required | Default | Description |
| ------------ | ------- | -------- | ----------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| defaultValue | string | false | - | The default value. |
| value | string | false | - | The runtime value. |
| trigger | array | false | ['onClick'] | The trigger event. |
| extra | element | false | - | The extra element. |
| onChange | func | false | noop | The change handler. |## usage
1. import css
```scss
@import "~@jswork/react-tabs/dist/style.css";// or use sass
@import "~@jswork/react-tabs/dist/style.scss";// customize your styles:
$react-tabs-options: ()
```
2. import js
```js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import { Tabs, Tab } from '@jswork/react-tabs';
import './assets/style.scss';class App extends React.Component {
render() {
return (
{
console.log('runtime value:', e.target.value);
}}>
Tab content1
Tab content2
Tab content3
{
console.log('runtime value:', e.target.value);
}}>
Tab content1
Tab content2
Tab content3
);
}
}ReactDOM.render(, document.getElementById('app'));
```
## documentation
- https://afeiship.github.io/react-tabs/## license
Code released under [the MIT license](https://github.com/afeiship/react-tabs/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-tabs
[version-url]: https://npmjs.org/package/@jswork/react-tabs[license-image]: https://img.shields.io/npm/l/@jswork/react-tabs
[license-url]: https://github.com/afeiship/react-tabs/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-tabs
[size-url]: https://github.com/afeiship/react-tabs/blob/master/dist/react-tabs.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-tabs
[download-url]: https://www.npmjs.com/package/@jswork/react-tabs