Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

portal

v0.88.2arrow_drop_down
v0.88.2
v0.86.0
v0.85.0
v0.84.0
STATUS
Passing
DOWNLOADS
24,267
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
1 year ago
SIZE
77 KB
Controls whether or not the portal should close when mousing out of the portal
1 contributor
Install portal as a package?
Copied
npm i @bit/semantic-org.semantic-ui-react.portal
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
modifieddraft
chevron_left
chevron_right

Controls whether or not the portal should close when mousing out of the portal. NOTE: This will prevent closeOnTriggerMouseLeave when mousing over the gap from the trigger to the portal.

Called when a close event happens

Called when the portal is mounted on the DOM

Called when an open event happens

Called when the portal is unmounted from the DOM

Portal ()

A component that allows you to render children outside their parent.

Called when the PortalInner is mounted on the DOM.

Called when the PortalInner is unmounted from the DOM.

PortalInner ()

An inner component that allows you to render children outside their parent.

Properties
NameTypeDefault valueDescription
children
(required)
node

Primary content.

closeOnDocumentClick
booltrue

Controls whether or not the portal should close when the document is clicked.

closeOnEscape
booltrue

Controls whether or not the portal should close when escape is pressed is displayed.

closeOnPortalMouseLeave
bool

Controls whether or not the portal should close when mousing out of the portal. NOTE: This will prevent closeOnTriggerMouseLeave when mousing over the gap from the trigger to the portal.

closeOnTriggerBlur
bool

Controls whether or not the portal should close on blur of the trigger.

closeOnTriggerClick
bool

Controls whether or not the portal should close on click of the trigger.

closeOnTriggerMouseLeave
bool

Controls whether or not the portal should close when mousing out of the trigger.

defaultOpen
bool

Initial value of open.

eventPool
string'default'

Event pool namespace that is used to handle component events

mountNode
any

The node where the portal should mount.

mouseEnterDelay
number

Milliseconds to wait before opening on mouse over

mouseLeaveDelay
number

Milliseconds to wait before closing on mouse leave

onClose
function

React’s original SyntheticEvent.

onMount
function
onOpen
function

React’s original SyntheticEvent.

onUnmount
function
open
bool

Controls whether or not the portal is displayed.

openOnTriggerClick
booltrue

Controls whether or not the portal should open when the trigger is clicked.

openOnTriggerFocus
bool

Controls whether or not the portal should open on focus of the trigger.

openOnTriggerMouseEnter
bool

Controls whether or not the portal should open when mousing over the trigger.

trigger
node

Element to be rendered in-place where the portal is defined.

triggerRef
custom

Called with a ref to the trigger node.

children
(required)
node

Primary content.

innerRef
custom

Called with a ref to the inner node.

mountNode
any

The node where the portal should mount.

onMount
function
onUnmount
function
Help and resources