ui/FloatingLayer
FloatingLayer provides a way to render a component into a node outside of its parent component.
This is used for modal components such as popups.
Members
Section titled “Members ”FloatingLayer Component
Section titled “FloatingLayer   Component ”FloatingLayer that mixes ui/Cancelableui/Cancelable.Cancelable to handle FloatingLayer dismissal.
This is used for modal components such as popups.
Extends:
ui/FloatingLayerui/FloatingLayer.FloatingLayerBase
Wrapped with:
ui/Cancelableui/Cancelable.Cancelable
FloatingLayerBase Component
Section titled “FloatingLayerBase   Component ”A component that creates an entry point to the new render tree.
This is used for modal components such as popups.
Properties
floatLayerClassName
Section titled “floatLayerClassName”CSS classes for FloatingLayer.
Default: 'enact-fit enact-clip enact-untouchable'floatLayerId
Section titled “floatLayerId”Element id for floating layer.
Default: 'floatLayer'noAutoDismiss
Section titled “noAutoDismiss”Prevents FloatingLayer from hiding when the user presses cancel/back (e.g. ESC) key or
clicks outside the floating layer.
onClose
Section titled “onClose”Called when floating layer is closed.
onDismiss
Section titled “onDismiss”Called when a closing action is invoked.
These actions may include pressing cancel/back (e.g. ESC) key or programmatically closing
by FloatingLayerDecorator. When cancel key is pressed, the function will only invoke if
noAutoDismiss is set to false.
When pressing ESC key, event payload carries detail property containing inputType
value of 'key'.
When clicking outside the boundary of the popup, event payload carries detail property
containing inputType value of 'click'.
onOpen
Section titled “onOpen”Called when floating layer is opened. It will only be invoked for the first render.
Renders the floating layer and its components.
Default: falsescrimType
Section titled “scrimType”The scrim type that overlays FloatingLayer.
It can be either 'transparent', 'translucent', or 'none'.
FloatingLayerDecorator Higher-Order Component
Section titled “FloatingLayerDecorator   Higher-Order Component ”A higher-order component that adds a FloatingLayer adjacent to the wrapped component.
Any classes passed to the FloatingLayerDecorator will be applied to a wrapper surrounding the
wrapped component and the floating layer. If specified in the config, wrappedClassName will be
passed as className to the wrapped component.
Configuration
floatLayerId
Section titled “floatLayerId”Element Id of the floatLayer
Default: 'floatLayer'wrappedClassName
Section titled “wrappedClassName”Class name to be applied to wrapped component.
It can be used when you want to only apply certain styles to the wrapped component and not to the float layer.
Default: ''