@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.
27 lines (26 loc) • 1.1 kB
TypeScript
import * as React from 'react';
import type { BaseUIComponentProps } from '../../utils/types.js';
import type { TabsOrientation, TabsRoot } from '../root/TabsRoot.js';
import { ActiveTabPosition } from './useTabsIndicator.js';
/**
* A visual indicator that can be styled to match the position of the currently active tab.
* Renders a `<span>` element.
*
* Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)
*/
declare const TabsIndicator: React.ForwardRefExoticComponent<TabsIndicator.Props & React.RefAttributes<HTMLSpanElement>>;
declare namespace TabsIndicator {
interface State extends TabsRoot.State {
selectedTabPosition: ActiveTabPosition | null;
orientation: TabsOrientation;
}
interface Props extends BaseUIComponentProps<'span', TabsIndicator.State> {
/**
* Whether to render itself before React hydrates.
* This minimizes the time that the indicator isn’t visible after server-side rendering.
* @default false
*/
renderBeforeHydration?: boolean;
}
}
export { TabsIndicator };