The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Modal dialogs for R Shiny via Micromodal.js.
To install the package from CRAN use:
install.packages("micromodal")
You can install the dev version of {micromodal}
with:
::install_github("kennedymwavu/micromodal") remotes
use_micromodal()
anywhere in your UI, once.library(shiny)
library(micromodal)
<- fluidPage(
ui use_micromodal(),
# the rest of your UI code
)
data-micromodal-trigger
with the
value of the modal’s id.<- fluidPage(
ui use_micromodal(),
actionButton(
inputId = "trigger",
label = "Trigger modal",
`data-micromodal-trigger` = "modal-1"
),# the rest of your UI code
)
micromodal()
for this.<- fluidPage(
ui use_micromodal(),
actionButton(
inputId = "trigger",
label = "Trigger modal",
`data-micromodal-trigger` = "modal-1"
),micromodal(
id = "modal-1",
title = "Hello, World!",
content = tagList(
$p("Hi Mom,"),
tags$p("Come see my first modal!")
tags
)
) )
That’s it.
Here’s the full reprex:
library(shiny)
library(micromodal)
<- fluidPage(
ui use_micromodal(),
actionButton(
inputId = "trigger",
label = "Trigger modal",
`data-micromodal-trigger` = "modal-1"
),micromodal(
id = "modal-1",
title = "Hello, World!",
content = tagList(
$p("Hi Mom,"),
tags$p("Come see my first modal!")
tags
)
)
)
<- \(input, output, session) {}
server
shinyApp(ui, server)
You’re reading the doc about version: 1.0.0
This README has been compiled on the:
Sys.time()
#> [1] "2023-08-16 12:47:57 EAT"
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.