UNPKG

@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.

36 lines 1.33 kB
import * as React from 'react'; import type { BaseUIComponentProps } from "../../utils/types.js"; import type { TabsRoot } from "../root/TabsRoot.js"; import type { TabsTab } from "../tab/TabsTab.js"; /** * A panel displayed when the corresponding tab is active. * Renders a `<div>` element. * * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs) */ export declare const TabsPanel: React.ForwardRefExoticComponent<TabsPanelProps & React.RefAttributes<HTMLDivElement>>; export interface TabsPanelMetadata { id?: string; value: TabsTab.Value; } export interface TabsPanelState extends TabsRoot.State { hidden: boolean; } export interface TabsPanelProps extends BaseUIComponentProps<'div', TabsPanel.State> { /** * The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected. * If not provided, it will fall back to the index of the panel. * It is recommended to explicitly provide it, as it's required for the tab panel to be rendered on the server. */ value?: TabsTab.Value; /** * Whether to keep the HTML element in the DOM while the panel is hidden. * @default false */ keepMounted?: boolean; } export declare namespace TabsPanel { type Metadata = TabsPanelMetadata; type State = TabsPanelState; type Props = TabsPanelProps; }