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.

35 lines 1.35 kB
import * as React from 'react'; import { BaseUIComponentProps } from "../../utils/types.js"; import type { CollapsibleRoot } from "../root/CollapsibleRoot.js"; import type { TransitionStatus } from "../../utils/useTransitionStatus.js"; /** * A panel with the collapsible contents. * Renders a `<div>` element. * * Documentation: [Base UI Collapsible](https://base-ui.com/react/components/collapsible) */ export declare const CollapsiblePanel: React.ForwardRefExoticComponent<CollapsiblePanelProps & React.RefAttributes<HTMLDivElement>>; export interface CollapsiblePanelState extends CollapsibleRoot.State { transitionStatus: TransitionStatus; } export interface CollapsiblePanelProps extends BaseUIComponentProps<'div', CollapsiblePanel.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; } export declare namespace CollapsiblePanel { type State = CollapsiblePanelState; type Props = CollapsiblePanelProps; }