@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
36 lines • 1.69 kB
TypeScript
import React from 'react';
import { DefaultProps, MantineNumberSize } from '../../theme';
import { GroupPosition } from '../Group/Group';
import { Tab, TabProps } from './Tab/Tab';
import { TabControlStylesNames } from './TabControl/TabControl';
import useStyles from './Tabs.styles';
export { Tab };
export type { TabProps };
export declare const TABS_VARIANTS: readonly ["default", "outline", "pills", "unstyled"];
export declare type TabsVariant = typeof TABS_VARIANTS[number];
export declare type TabsStylesNames = Exclude<keyof ReturnType<typeof useStyles>, TabsVariant> | TabControlStylesNames;
export interface TabsProps extends DefaultProps<TabsStylesNames>, React.ComponentPropsWithoutRef<'div'> {
/** <Tab /> components only */
children: React.ReactNode;
/** Index of initial tab */
initialTab?: number;
/** Index of active tab, overrides internal state */
active?: number;
/** Active tab color from theme */
color?: string;
/** True if tabs should take all available space */
grow?: boolean;
/** Tab controls position */
position?: GroupPosition;
/** Called when tab control is clicked with tab index */
onTabChange?(tabIndex: number): void;
/** Controls appearance */
variant?: 'default' | 'outline' | 'pills' | 'unstyled';
/** Controls tab content padding-top */
tabPadding?: MantineNumberSize;
}
export declare function Tabs({ className, children, style, initialTab, themeOverride, active, position, grow, onTabChange, color, variant, classNames, styles, tabPadding, ...others }: TabsProps): JSX.Element;
export declare namespace Tabs {
var displayName: string;
}
//# sourceMappingURL=Tabs.d.ts.map