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.

38 lines (37 loc) 1.56 kB
import * as React from 'react'; import { BaseUIComponentProps } from '../../utils/types.js'; import { useAccordionRoot, type AccordionOrientation, type AccordionValue } from './useAccordionRoot.js'; /** * Groups all parts of the accordion. * Renders a `<div>` element. * * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion) */ declare const AccordionRoot: React.ForwardRefExoticComponent<AccordionRoot.Props & React.RefAttributes<HTMLDivElement>>; export declare namespace AccordionRoot { interface State { value: AccordionValue; /** * Whether the component should ignore user interaction. */ disabled: boolean; orientation: AccordionOrientation; } interface Props extends Partial<Pick<useAccordionRoot.Parameters, 'value' | 'defaultValue' | 'disabled' | 'loop' | 'onValueChange' | 'openMultiple' | 'orientation'>>, Omit<BaseUIComponentProps<'div', State>, 'defaultValue'> { /** * 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 closed. * This prop is ignored when `hiddenUntilFound` is used. * @default false */ keepMounted?: boolean; } } export { AccordionRoot };