You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

faster-react-tabs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faster-react-tabs

A faster React tab component that doesn't use DOM refs. Written in ES6, transpiles down to ES5

1.0.0
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple + Clean React Tabs

npm version

Demo here

  • Written the "React Way" without hitting the DOM with refs.
  • ES6, transpiles down to ES5.
  • If your app renders server-side, then the tabs can just render as a list for non-JS users.

Install

$ npm i faster-react-tabs --save

Get the example running locally:

$ cd faster-react-tabs/
$ npm install
$ npm run build
$ npm run watch

Example: Drop-in Tabs component

$ npm i faster-react-tabs --save
'use strict'
import React from 'react';
import Tabs from 'faster-react-tabs';
import ExampleContent from '../components/example-content/index.jsx';

const YourThing = React.createClass({

  render() {
    const sections = [
      {
        title: 'Tab 1',
        content: <ExampleContent image='images/1.jpeg' text='This is in tab 1. It is a whole other component! Entire components can be passed down into each tab.' />
      },
      {
        title: 'Tab 2',
        content: 'Tab 2 content'
      },
      {
        title: 'Tab 3',
        content: 'Tab 3 content'
      }
    ];

    return (
      <Tabs sections={sections} />
    );
  }

});

export default YourThing;

Keywords

react

FAQs

Package last updated on 22 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts