Skip to main content
Version: 7.11.2

Modal

showModal()#

Show a screen as a modal.

Parameters#

NameRequiredTypeDescription
layoutYesLayoutAny type of layout. BottomTabs, Stack, SideMenu, Component
Navigation.showModal({
stack: {
children: [{
component: {
name: 'example.ModalScreen',
passProps: {
text: 'stack with one child'
},
options: {
topBar: {
title: {
text: 'Modal'
}
}
}
}
}]
}
});

dismissModal()#

Dismiss the current modal.

Parameters#

NameRequiredTypeDescription
componentIdYesstringAny component id presented in the modal
mergeOptionsNoOptionsOptions to be merged before dismissing the Modal.
Navigation.dismissModal(this.props.componentId);

dismissAllModals()#

Dismiss all current modals at the same time.

Parameters#

NameRequiredTypeDescription
mergeOptionsNoOptionsOptions to be merged before dismissing all modals.
Navigation.dismissAllModals();