react-tabs-view

1.0.3 • Public • Published

react-tab-view

npm version

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

License

MIT

Package Sidebar

Install

npm i react-tabs-view

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • svnm