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.

31 lines (30 loc) 1.18 kB
import * as React from 'react'; import { BaseUIComponentProps } from '../../utils/types.js'; import type { CollapsibleRoot } from '../root/CollapsibleRoot.js'; /** * A panel with the collapsible contents. * Renders a `<div>` element. * * Documentation: [Base UI Collapsible](https://base-ui.com/react/components/collapsible) */ declare const CollapsiblePanel: React.ForwardRefExoticComponent<CollapsiblePanel.Props & React.RefAttributes<HTMLButtonElement>>; export { CollapsiblePanel }; declare namespace CollapsiblePanel { interface Props extends BaseUIComponentProps<'div', CollapsibleRoot.State> { /** * Allows the browser’s built-in page search to find and expand the panel contents. * * Overrides the `keepMounted` prop and uses `hidden="until-found"` * to hide the element without removing it from the DOM. * * @default false */ hiddenUntilFound?: boolean; /** * Whether to keep the element in the DOM while the panel is hidden. * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted?: boolean; } }