@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
111 lines (110 loc) • 4.83 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { SelectedAriaAttributes, FlyoutAriaAttribute, FlyoutBackdrop, FlyoutBackground, FlyoutFooterBehavior, BreakpointCustomizable, FlyoutMotionHiddenEndEventDetail, FlyoutMotionVisibleEndEventDetail, FlyoutPosition } from '../types';
export type PFlyoutProps = BaseProps & {
/**
* Sets ARIA attributes on the flyout dialog element for improved screen reader accessibility.
*/
aria?: SelectedAriaAttributes<FlyoutAriaAttribute>;
/**
* Sets the backdrop style. Use `blur` when background content is irrelevant; use `shading` when users still need visual context.
* @default 'blur'
*/
backdrop?: FlyoutBackdrop;
/**
* Sets the background color of the flyout panel (`canvas` or `surface`).
* @default 'canvas'
*/
background?: FlyoutBackground;
/**
* When enabled, clicking the backdrop will not close the flyout.
* @default false
*/
disableBackdropClick?: boolean;
/**
* Controls footer behavior. `fixed` keeps it anchored at the bottom; `sticky` pins it only when content overflows.
* @default 'sticky'
*/
footerBehavior?: FlyoutFooterBehavior;
/**
* If true the flyout stretches to the full viewport width with squared corners. Useful for smaller viewports where the flyout would otherwise fill the screen but still show rounded corners.
* @default false
*/
fullscreen?: BreakpointCustomizable<boolean>;
/**
* Emitted when the user closes the flyout via the close button, backdrop click, or Escape key.
*/
onDismiss?: (event: CustomEvent<void>) => void;
/**
* Emitted after the flyout's close transition completes and the panel is fully hidden.
*/
onMotionHiddenEnd?: (event: CustomEvent<FlyoutMotionHiddenEndEventDetail>) => void;
/**
* Emitted after the flyout's open transition completes and the panel is fully visible.
*/
onMotionVisibleEnd?: (event: CustomEvent<FlyoutMotionVisibleEndEventDetail>) => void;
/**
* Controls whether the flyout panel is visible.
* @default false
*/
open: boolean;
/**
* Sets the side the flyout slides in from — `start` for left or `end` for right in LTR layouts.
* @default 'end'
*/
position?: FlyoutPosition;
};
export declare const PFlyout: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* Sets ARIA attributes on the flyout dialog element for improved screen reader accessibility.
*/
aria?: SelectedAriaAttributes<FlyoutAriaAttribute>;
/**
* Sets the backdrop style. Use `blur` when background content is irrelevant; use `shading` when users still need visual context.
* @default 'blur'
*/
backdrop?: FlyoutBackdrop;
/**
* Sets the background color of the flyout panel (`canvas` or `surface`).
* @default 'canvas'
*/
background?: FlyoutBackground;
/**
* When enabled, clicking the backdrop will not close the flyout.
* @default false
*/
disableBackdropClick?: boolean;
/**
* Controls footer behavior. `fixed` keeps it anchored at the bottom; `sticky` pins it only when content overflows.
* @default 'sticky'
*/
footerBehavior?: FlyoutFooterBehavior;
/**
* If true the flyout stretches to the full viewport width with squared corners. Useful for smaller viewports where the flyout would otherwise fill the screen but still show rounded corners.
* @default false
*/
fullscreen?: BreakpointCustomizable<boolean>;
/**
* Emitted when the user closes the flyout via the close button, backdrop click, or Escape key.
*/
onDismiss?: (event: CustomEvent<void>) => void;
/**
* Emitted after the flyout's close transition completes and the panel is fully hidden.
*/
onMotionHiddenEnd?: (event: CustomEvent<FlyoutMotionHiddenEndEventDetail>) => void;
/**
* Emitted after the flyout's open transition completes and the panel is fully visible.
*/
onMotionVisibleEnd?: (event: CustomEvent<FlyoutMotionVisibleEndEventDetail>) => void;
/**
* Controls whether the flyout panel is visible.
* @default false
*/
open: boolean;
/**
* Sets the side the flyout slides in from — `start` for left or `end` for right in LTR layouts.
* @default 'end'
*/
position?: FlyoutPosition;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;