moonstone/ Popup
Modal component that appears at the bottom of the screen and takes up the full screen width.
import Popup from '@enact/moonstone/Popup';Members
PopupComponent
A stateful component that renders a popup in a FloatingLayer.
import Popup from '@enact/moonstone/Popup';Properties
Hint string read when focusing the popup close button.
Default: 'Close'Disables transition animation.
Default: falseIndicates that the popup will not trigger
onClosewhen the user presses the cancel/back (e.g.ESC) key or taps outside of the popup.Default: falseCalled on:
pressing
ESCkey,clicking on the close button, or
moving spotlight focus outside the boundary of the popup when
spotlightRestrictis'self-first'.
It is the responsibility of the callback to set the
openproperty tofalse.Called after hide transition has completed, and immediately with no transition.
Called when a key is pressed.
Called after show transition has completed, and immediately with no transition.
Note: The function does not run if Popup is initially opened and noAnimation is
true.Controls the visibility of the Popup.
By default, the Popup and its contents are not rendered until
open.Default: falseScrim type.
Values:
'transparent','translucent', or'none'.
'none'is not compatible withspotlightRestrictof'self-only', use a transparent scrim to prevent mouse focus when using popup.Default: 'translucent'Shows a close button.
Default: falseRestricts or prioritizes navigation when focus attempts to leave the popup.
Values:
'self-first', or'self-only'.
Note: If
onCloseis not set, then this has no effect on 5-way navigation. If the popup has no spottable children, 5-way navigation will cause the Popup to fireonClose.Default: 'self-only'
PopupBaseComponent
The base popup component.
import {PopupBase} from '@enact/moonstone/Popup';Properties
The contents to be displayed in the body of the popup.
Sets the hint string read when focusing the popup close button.
Default: 'Close'Disables transition animation.
Default: falseCalled when the close button is clicked.
Called after the popup's "hide" transition finishes.
Called after the popup's "show" transition finishes.
Controls the visibility of the Popup.
By default, the Popup and its contents are not rendered until
open.Default: falseShows the close button.
Default: falseThe container id for spotlight/Spotlight.
Default: nullRestricts or prioritizes navigation when focus attempts to leave the popup.
It can be either
'none','self-first', or'self-only'.Note: The ready-to-use Popup component only supports
'self-first'and'self-only'.Default: 'self-only'