Skip to main content

Modal

OBR.modal

The modal API allows you to display custom UI over the top of the Owlbear Rodeo interface as a modal.

Reference

Methods

open

async open(modal)

Open a new modal.

Parameters

NAMETYPEDESCRIPTION
modalModalThe modal to open

Example

OBR.contextMenu.create({
id: "rodeo.owlbear.example",
icons: [
{
icon: "icon.svg",
label: "Example",
},
],
onClick() {
OBR.modal.open({
id: "rodeo.owlbear.example/modal",
url: "/modal",
height: 300,
width: 400,
});
},
});

close

async close(id)

Close an open modal.

Parameters

NAMETYPEDESCRIPTION
idstringThe ID of the modal to close

Type Definitions

TYPE
object

Properties

NAMETYPEDESCRIPTION
idstringThe ID of this modal
urlstringThe url of the site to embed
widthnumberAn optional width of the modal in pixels
heightnumberAn optional height of the modal in pixels
fullScreenbooleanAn optional boolean, if true the modal will take up the whole screen
hideBackdropbooleanAn optional boolean, if true the dark backdrop will be hidden
hidePaperbooleanAn optional boolean, if true the colored background will be removed
disablePointerEventsbooleanAn optional boolean, if true the modal will not react to mouse or touch events