@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
34 lines (33 loc) • 1.16 kB
TypeScript
import { AriaAttributes, ReactElement } from 'react';
import { CommonProps } from '../../types';
import { TabItemProps } from './components/TabItem/TabItem';
/** Props for {@link Tabs} */
export interface TabsProps extends CommonProps {
/** Array of {@link TabItem} */
children: ReactElement<TabItemProps> | ReactElement<TabItemProps>[];
/** aria-label for the root tabs element */
ariaLabel?: AriaAttributes['aria-label'];
/**
* Index of the active tab. Are counted only enabled tabs.
*
* @default 0
*/
defaultActiveIndex?: number;
}
/**
* Tabs make it easy to explore and switch between different views.
*
* ```tsx
* <Tabs>
* <TabItem label="Apple">apple description</TabItem>
* <TabItem label="Orange" disabled>orange description</TabItem>
* <TabItem label="Carrot">carrot description</TabItem>
* </Tabs>
* ```
*
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
*
* <Story id="components-tabs--default" />
* <Story id="components-tabs-examples--login-form" />
*/
export declare function Tabs(props: TabsProps): JSX.Element;