@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
24 lines (23 loc) • 995 B
TypeScript
import type { TabsListContext } from '../list/TabsListContext.js';
import type { TabsRootContext } from '../root/TabsRootContext.js';
import { GenericHTMLProps } from '../../utils/types.js';
export declare function useTabsIndicator(parameters: useTabsIndicator.Parameters): useTabsIndicator.ReturnValue;
export interface ActiveTabPosition {
left: number;
right: number;
top: number;
bottom: number;
}
export declare namespace useTabsIndicator {
interface Parameters extends Pick<TabsRootContext, 'getTabElementBySelectedValue' | 'value'>, Pick<TabsListContext, 'tabsListRef'> {
}
interface ReturnValue {
/**
* Resolver for the TabIndicator component's props.
* @param externalProps additional props for Tabs.TabIndicator
* @returns props that should be spread on Tabs.TabIndicator
*/
getRootProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps;
activeTabPosition: ActiveTabPosition | null;
}
}