Socket
Socket
Sign inDemoInstall

react-dyn-tabs

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dyn-tabs

React dynamic tabs with full API


Version published
Weekly downloads
265
decreased by-27.2%
Maintainers
1
Weekly downloads
 
Created
Source

react-dyn-tabs

React Dynamic Tabs with full API

document

Features

  • Based on React hook
  • Open & Close & Select & Refresh
  • lazy/eager loading
  • Customizable style
  • Full API
  • Return to last used tab when closing selected tab
  • PanelList can be rendered outside the TabList container
  • ARIA accessible

Table of Contents

Installation

$ npm install react-dyn-tabs --save

Basic Example

import React from 'react';
import useDynTabs from 'react-dyn-tabs';
import 'react-dyn-tabs/style/react-dyn-tabs.css';
import 'react-dyn-tabs/themes/default.css';
import ContactComponent from './contact-component';

export default () => {
  const options = {
     tabs : [
     {
      id : '1',
      title : 'home',
      closable: false,
      panelComponent : porps => <p> home content </p>
     },
     {
      id : '2',
      title : 'contact',
      panelComponent : ContactComponent
     }
     ],
     selectedTabID : '1'
  };
  const [TabList , PanelList , api] = useDynTabs(options);
  return (
    <div>
      <TabList></TabList>
      <PanelList></PanelList>
    </div>
  );
};

Styling

react-dyn-tabs does not include any style loading by default. Default stylesheets and themes are provided and can be included in your application if desired.

import 'react-dyn-tabs/style/react-dyn-tabs.css';
import 'react-dyn-tabs/themes/default.css';

License

MIT

Keywords

FAQs

Package last updated on 16 Apr 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc