Push flyouts
Another way to allow for continued interactions of the page content while a flyout is visible is to change the
type
from overlay
to push
.Push flyouts do not use a focus trap, do not close on Escape keypress, do not inherit a
dialog role, and do not include any of the default screen reader guidance that overlay flyouts contain out-of-the-box.Please be cautious when using push flyouts, and make sure you are managing your own focus and screen reader UX.
A pushed flyout still positions itself as fixed
, but adds padding to the document's body element to accommodate for the flyout's width. Because this squishes the page content, the flyout changes back to overlay
at smaller window widths. You can adjust this minimum breakpoint with pushMinBreakpoint
.
Props
EuiFlyout
Prop | Description and type | Default value |
---|---|---|
Prop onClose# | Description and type Type: (event: MouseEvent | KeyboardEvent | TouchEvent) => void | Default value Required |
Prop className# | Description and type Type: string | Default value |
Prop aria-label# | Description and type Type: string | Default value |
Prop data-test-subj# | Description and type Type: string | Default value |
Prop css# | Description and type Type: Interpolation<Theme> | Default value |
Prop as# | Description and type Sets the HTML element for ElementType | Default value |
Prop size# | Description and type Defines the width of the panel. Width<string | number> | Default value m |
Prop maxWidth# | Description and type Sets the max-width of the panel, string | number | boolean | Default value false |
Prop paddingSize# | Description and type Customize the padding around the content of the flyout header, body and footer "s" | "m" | "l" | "none" | Default value l |
Prop ownFocus# | Description and type Adds an EuiOverlayMask and wraps in an EuiPortal boolean | Default value true |
Prop hideCloseButton# | Description and type Hides the default close button. You must provide another close button somewhere within the flyout. boolean | Default value false |
Prop closeButtonProps# | Description and type Extends EuiButtonIconProps onto the close button Partial<EuiButtonIconPropsForButton> | Default value |
Prop closeButtonPosition# | Description and type Position of close button. "inside" | "outside" | Default value inside |
Prop maskProps# | Description and type Adjustments to the EuiOverlayMask that is added when EuiOverlayMaskProps | Default value |
Prop type# | Description and type How to display the the flyout in relation to the body content; "push" | "overlay" | Default value overlay |
Prop outsideClickCloses# | Description and type Forces this interaction on the mask overlay or body content. boolean | Default value |
Prop side# | Description and type Which side of the window to attach to. "left" | "right" | Default value right |
Prop pushMinBreakpoint# | Description and type Named breakpoint ( string | Default value l |
Prop pushAnimation# | Description and type Enables a slide in animation on push flyouts boolean | Default value false |
Prop style# | Description and type Type: CSSProperties | Default value |
Prop focusTrapProps# | Description and type Object of props passed to EuiFocusTrap. Pick<EuiFocusTrapProps, "shards" | "closeOnMouseup"> | Default value |
Prop includeFixedHeadersInFocusTrap# | Description and type By default, EuiFlyout will consider any fixed Set this to boolean | Default value |