Skip to contents

Show, hide or toggle a bs_modal() from server code.

Usage

show_bs_modal(id, session = shiny::getDefaultReactiveDomain())

hide_bs_modal(id, session = shiny::getDefaultReactiveDomain())

toggle_bs_modal(id, session = shiny::getDefaultReactiveDomain())

Arguments

id

Modal id (namespaced automatically inside modules).

session

The Shiny session.

Value

Invisibly NULL, called for its side effect.

Examples

if (interactive()) show_bs_modal("info")
if (interactive()) hide_bs_modal("info")
if (interactive()) toggle_bs_modal("info")