1.2.1 • Published 6 months ago

react-tabs-carousel v1.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

React Tabs Carousel

A React component to generate React Tabs Carousel for rendering to the DOM.

Installation

npm

npm install react-tabs-carousel

yarn

yarn add react-tabs-carousel

pnpm

pnpm add react-tabs-carousel

Usage

The react-tabs-carousel component offers a single-component export that facilitates the creation of a carousel featuring tabs functionality.

All illustrations are presented employing contemporary JavaScript modules and syntax. Furthermore, compatibility with js, as demonstrated by the usage of require(react-tabs-carousel), is also upheld.

React Tabs Carousel Demo

How to Utilizing the React Tabs Carousel Component

import React from "react";
import ReactTabsCarousel from "react-tabs-carousel";
import "react-tabs-carousel/css/index.css";

const MyComponent = () => {
  const tabs = [
    { tabName: "Tab 1", tabContent: <>Content 1</> },
    { tabName: "Tab 2", tabContent: <>Content 2</> },
    { tabName: "Tab 3", tabContent: <>Content 3</> },
    { tabName: "Tab 4", tabContent: <>Content 4</> },
    { tabName: "Tab 5", tabContent: <>Content 5</> },
    { tabName: "Tab 6", tabContent: <>Content 6</> },
    { tabName: "Tab 7", tabContent: <>Content 7</> },
    { tabName: "Tab 8", tabContent: <>Content 8</> },
    { tabName: "Tab 9", tabContent: <>Content 9</> },
    { tabName: "Tab 10", tabContent: <>Content 10</> },
    { tabName: "Tab 11", tabContent: <>Content 11</> },
  ];
  return (
    <ReactTabsCarousel tabsList={tabs} tabsToShow={6} tabsToScroll={1} />
  );
};
export default MyComponent;

Props

NameTypeDefault ValueDescription
tabsListArray of tabs{tabs}Specify tabs for the tab carousel.
tabsToShowNumber6Specify the desired number of tabs to be displayed.
tabsToScrollNumber1Specify the number of tabs you wish to slide.
isFixedWidthBooleanfalseFacilitate the setting of a fixed tab width by setting the value to "true."
previousTextStringChevron LeftSpecify customizable options for the Previous Button, including the provision of custom SVG icons, font icons, and text, is available. ("IconCaretLeft").
nextTextStringChevron RightSpecify customizable options for the Previous Button, including the next of custom SVG icons, font icons, and text, is available. ("IconCaretRight")
classNameString" "You can specify custom class on main div element.
containerClassNameString" "You can specify custom class on container div element.
contentClassNameString" "You can specify custom class on content div element.
onClickClick EventnullYou can specify custom onClick on tab button.
1.2.1

6 months ago

1.2.0

6 months ago

1.1.7

6 months ago

1.1.5

6 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.9

7 months ago

1.0.5

7 months ago

1.0.3

7 months ago

1.0.0

7 months ago