react-tabs-view
v1.0.3
Published
a simple tab component
Downloads
10
Maintainers
Readme
react-tab-view
react-tab-view is a simple tabs component using react.js.
Install
npm install react-tab-view --save
Usage
import { Tabs, Tab } from 'react-tab-view'
import ReactDOM from 'react-dom'
import React, { Component, PropTypes } from 'react'
class TestComponent extends Component {
render () {
const headers = ['heading 1', 'heading 2'];
return (
<div>
<Tabs headers={headers}>
<Tab>
<p>This is the first tab's content</p>
</Tab>
<Tab>
<p>This is the second tab's content</p>
</Tab>
</Tabs>
</div>
)
}
}
ReactDOM.render(
<TestComponent />,
document.getElementById('root')
)
Versions
1.0.1
Uses React ^0.13.0
1.0.3
Uses React ^0.14.0
Styles
react-tab-view can be used with your own custom styles. A minimal tabs.css style sheet is included as a guide.
Development
npm install
npm test
npm start