Skip to main content
Version: v3

ModalApi

API for displaying modals in Rancher UI. Here's what a Modal looks like in Rancher UI:

  • modal Example

Methods

open()

open(component, config?): void;

Opens a modal dialog in Rancher UI

Example:

import MyCustomModal from '@/components/MyCustomModal.vue';

this.$shell.modal.open(MyCustomModal, {
props: { title: 'Hello Modal' }
});

For usage with the Composition API check usage guide here.

Parameters

component

Component

The Vue component to be displayed inside the modal. This can be any SFC (Single-File Component) imported and passed in as a Component.

config?

ModalConfig

Modal configuration object

Returns

void