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.

30 lines (29 loc) 1.17 kB
import * as React from 'react'; import { TabsRoot, type TabValue } from '../root/TabsRoot.js'; import type { BaseUIComponentProps } from '../../utils/types.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) */ declare const TabsPanel: React.ForwardRefExoticComponent<TabsPanel.Props & React.RefAttributes<HTMLDivElement>>; declare namespace TabsPanel { interface State extends TabsRoot.State { hidden: boolean; } interface Props extends BaseUIComponentProps<'div', 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?: TabValue; /** * Whether to keep the HTML element in the DOM while the panel is hidden. * @default false */ keepMounted?: boolean; } } export { TabsPanel };