
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
tailwind-header-tabs
Advanced tools
`HeaderTabs` is a customizable and accessible React component for displaying tabbed navigation with optional icons, count badges, and multi-tab selection via an auto-complete input.
HeaderTabs
is a customizable and accessible React component for displaying tabbed navigation with optional icons, count badges, and multi-tab selection via an auto-complete input.
⚠️ This component library uses Tailwind CSS utility classes but does not include TailwindCSS by default.
You must have TailwindCSS configured in your own project for styles to apply correctly.
To use this component library with Tailwind, add the following to your tailwind.config.js
:
module.exports = {
content: ["...", "./node_modules/tailwind-header-tabs/**/*.{js,jsx}"],
// other config...
};
The tabs
prop should follow a recursive { id: string; label: string }[]
format, allowing unlimited levels of nesting.
const tabs = [
{ id: "1", label: "Apple" },
{ id: "car", label: "Car" },
{ id: "box", label: "Box" },
];
Name | Type | Required | Default | Description |
---|---|---|---|---|
tabs | Tab[] (i.e., { id: string; label: string }[] ) | ✅ | — | List of all tabs. |
activeTab | Tab | null | ✅ | — | Currently selected tab. |
onClickTab | (tab: Tab) => void | ✅ | — | Callback when a tab is clicked. |
showCountBadges | boolean | ✅ | — | Show numeric badges beside tab labels. |
countLabel | Record<string, number> | ❌ | {} | Mapping of tab label to count badge. |
icons | Record<string, React.ReactNode> | (color?: string, className?: string) => Record<string, React.ReactNode> | ❌ | undefined | Icons for tabs. Can be a static map or function that returns icons. |
activeIconColor | string | ❌ | "#2563eb" | Color used for active tab icons. |
inactiveIconColor | string | ❌ | "#6b7280" | Color used for inactive tab icons. |
selectable | boolean | ❌ | false | Enables selecting multiple tabs using auto-complete input. |
FAQs
`HeaderTabs` is a customizable and accessible React component for displaying tabbed navigation with optional icons, count badges, and multi-tab selection via an auto-complete input.
The npm package tailwind-header-tabs receives a total of 75 weekly downloads. As such, tailwind-header-tabs popularity was classified as not popular.
We found that tailwind-header-tabs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.