UnpopularTabs Documentation

The UnpopularTabs component allows you to create a modern tabbed interface with customizable styles and features.

Props

The UnpopularTabs component accepts the following props:

PropTypeDescription
tabsArrayAn array of objects representing the tabs.
tabStyleObjectAn object representing the styles for the tabs.
contentStyleObjectAn object representing the styles for the content.
transitionDurationStringThe duration of the transition effect in milliseconds.
activeTabStyleObjectAn object representing the styles for the active tab.
iconSizeStringThe size of the icons in the tabs.
animatedContentBooleanWhether to animate the content.

Basic Usage

const tabs = [
  { label: "Tab 1", content: <p>This is the content of Tab 1.</p>, icon: '📚' },
  { label: "Tab 2", content: <p>This is the content of Tab 2.</p>, icon: '🔍' },
  { label: "Tab 3", content: <p>This is the content of Tab 3.</p>, icon: '⚙️' },
];

// Usage
<UnpopularTabs tabs={tabs} />
📚Tab 1
🔍Tab 2
⚙️Tab 3

This is the content of Tab 1.

Custom Styles

const tabStyle = {
  backgroundColor: '#e9ecef',
  color: '#333',
};

const activeTabStyle = {
  backgroundColor: '#007bff',
  color: '#fff',
  fontWeight: 'bold',
};

const contentStyle = {
  padding: '20px',
  backgroundColor: '#fff',
};

// Usage
<UnpopularTabs
  tabs={tabs}
  tabStyle={tabStyle}
  activeTabStyle={activeTabStyle}
  contentStyle={contentStyle}
  iconSize="30px"
  transitionDuration="0.5s"
/>
📚Tab 1
🔍Tab 2
⚙️Tab 3

This is the content of Tab 1.

Conclusion

The UnpopularTabs component is a reusable component that displays a list of tabs and their corresponding content. It allows users to switch between different tabs and view the content associated with each tab.