UNPKG

infinity-ui-elements

Version:

A React TypeScript component library with Tailwind CSS design system

76 lines 1.79 kB
import * as React from "react"; export interface Tab { /** * Unique identifier for the tab */ id: string | number; /** * Leading component (e.g., icon) */ leadingComponent?: React.ReactNode; /** * Tab title/label */ title: string; /** * Trailing component (e.g., badge, close button) */ trailingComponent?: React.ReactNode; /** * Whether the tab is disabled */ isDisabled?: boolean; /** * Tab content to render when selected */ content?: React.ReactNode; } export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> { /** * Array of tab configurations */ tabs: Tab[]; /** * Currently selected tab ID */ selectedTabId?: string | number; /** * Default selected tab ID (for uncontrolled mode) */ defaultSelectedTabId?: string | number; /** * Callback when tab selection changes */ onTabChange?: (tabId: string | number) => void; /** * Tab visual variant */ variant?: "bordered" | "borderless"; /** * Tab size */ size?: "small" | "medium" | "large"; /** * Whether tabs should take full width */ isFullWidth?: boolean; /** * Custom class name for the tabs container */ className?: string; /** * Custom class name for the tab list */ tabListClassName?: string; /** * Custom class name for the tab content area */ contentClassName?: string; /** * Whether to render tab content */ renderContent?: boolean; } declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>; export { Tabs }; //# sourceMappingURL=Tabs.d.ts.map