UNPKG

@base-ui/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.

34 lines 1.26 kB
import * as React from 'react'; import { BaseUIComponentProps } from "../../internals/types.js"; /** * A viewport for displaying content transitions. * This component is only required if one popup can be opened by multiple triggers, its content change based on the trigger * and switching between them is animated. * Renders a `<div>` element. * * Documentation: [Base UI Preview Card](https://base-ui.com/react/components/preview-card) */ export declare const PreviewCardViewport: React.ForwardRefExoticComponent<Omit<PreviewCardViewport.Props, "ref"> & React.RefAttributes<HTMLDivElement>>; export interface PreviewCardViewportState { /** * The activation direction of the transitioned content. */ activationDirection: string | undefined; /** * Whether the viewport is currently transitioning between contents. */ transitioning: boolean; /** * Present if animations should be instant. */ instant: 'dismiss' | 'focus' | undefined; } export declare namespace PreviewCardViewport { interface Props extends BaseUIComponentProps<'div', PreviewCardViewportState> { /** * The content to render inside the transition container. */ children?: React.ReactNode; } type State = PreviewCardViewportState; }