<Popup> Component
<Popup> is a generic element with dynamic visibility (show/hide) in popup fashion.
Here the demo:
<Popup> Component<Popup> is a generic element with dynamic visibility (show/hide) in popup fashion.
Here the demo:
<Popup> ComponentThere are 2 ways to install <Popup> component into your react app project:
expanded PropertyExpands/Collapses the <Popup>.
The possible values are:
undefinedtruefalseHere the preview:
<Popup expanded={true}>
lazy PropertyDetermines whenever the <Popup>'s children should be rendered or not when the <Popup expanded={false}>.
The possible values are:
undefinedfalsetrueDetermines how the <Popup> should be floating on the target DOM reference.
floatingOn PropertyDetermines the target DOM reference where the <Popup> should be floating on.
If not set (undefined), the <Popup> becomes a normal element flow.
Here the preview:
floatingPlacement PropertyDetermines the location where the <Popup> should be floating on the target DOM reference.
Here the preview:
floatingPlacement='top'floatingStrategy PropertyDetermines the technical strategy how the <Popup> can float.
In most cases, you should not worry about the detail mechanism how the <Popup> can float.
The possible values are:
undefined'absolute''fixed'floatingAutoFlip PropertyAutomatically flips the floatingPlacement to opposite direction when the <Popup> is about to be clipped.
The possible values are:
undefinedtruefalseHere the preview:
floatingAutoShift PropertyAutomatically shifts the floatingPlacement to nearest safe position when the <Popup> is about to be clipped.
The possible values are:
undefinedtruefalseHere the preview:
floatingOffset PropertyThe distance (in pixel) between the <Popup> and the target DOM reference.
The possible values are:
undefined0Here the preview:
<Popup floatingOffset={0}>
floatingShift PropertyThe distance (in pixel) between the <Popup> and the default floatingPlacement location.
The possible values are:
undefined0Here the preview:
<Popup floatingShift={0}>
onFloatingUpdate PropertySets a callback function to be called when the <Popup> updates the position relative to the target DOM reference.
The callback function parameters:
event: FloatingPositionThe alternative appearances of the <Popup> layout without changing the <Popup>'s functionality.
size PropertyDefines the alternative size of the <Popup>.
The possible values are:
undefined'sm''md''lg'Here the preview:
theme PropertyDefines the contextual theme of the <Popup>.
The possible values are:
undefined'primary''secondary''success''info''warning''danger''light''dark'Here the preview:
gradient PropertyActivates a 3D mode of the <Popup>.
The possible values are:
undefined'inherit'truefalseHere the preview:
outlined PropertyActivates an outlined mode (background-less, contrast foreground, and contrast border) of the <Popup>.
The possible values are:
undefined'inherit'truefalseHere the preview:
mild PropertyActivates a mild mode (mild background, contrast foreground, and contrast border) of the <Popup>.
The possible values are:
undefined'inherit'truefalseHere the preview:
nude PropertyActivates an nude mode (background-less, padding-less, and border-less) of the <Popup>.
The possible values are:
undefinedtruefalseHere the preview:
Because <Popup> is made from <Basic>, so all properties from <Basic> are inherited.
There are several variables of <Popup> you can customize. Changing the variables affects all <Popup> instance and other components that depend on <Popup>.
Here the exposed variables:
The example of accessing, modifying, & adding variables: