0

Radiant is an amazing Shiny applet that everyone probably knows : https://vnijs.shinyapps.io/radiant/?SSUID=c730754697

This app benefits from a very nice way of helping its users by using a clickable "?" mark below each sidebar panel, and subsequent appearing document on the page.

May anyone please explain me how to add such help page to my Shiny applet? I could not find the related functions in the codes of this applet.

Shahin
  • 428
  • 4
  • 9

3 Answers3

1

You should check out R package: shinyBS. Where you can use function bsModal, i is exactly what you are looking for.

Below is an example app posted on the github page, as you can see after pressing the "View Table", pop up appears with the table.

enter image description here

Additionally to get this nice question mark button, you can use function/ object created with bsButton() as a trigger with bsModal() together.

--> Here is a link to stackoverflow question which has an example of shinyBS that might help you.

Mal_a
  • 3,670
  • 1
  • 27
  • 60
1

Regarding the guide to shiny apps I came across wonderful rintrojs package which allows you to build in descriptions of your widgets within shiny apps. You can find the description here https://carlganz.github.io/rintrojs/

rm(list = ls())
library(shiny)
library(shinyjs)
library(rintrojs)

ui <- fluidPage(
  useShinyjs(),
  introjsUI(),
  introBox(actionButton("hide","a"),data.step = 1,data.intro = "By Clicking this button the other one will dissapear"),
  introBox(actionButton("b","b"),data.step = 2,data.intro = "Toggle this button"),br(),
  bsButton("help", label = "About this Page", block = F,style = "primary",icon =icon("question-circle"))
)

server <- shinyServer(function(input,output,session){

  observeEvent(input$help,introjs(session, options = list("showBullets"="false", "showProgress"="true", "showStepNumbers"="false","nextLabel"="Next","prevLabel"="Prev","skipLabel"="Skip")))

  observeEvent(input$hide,{
    toggle("b")
  })

})
runApp(list(ui = ui, server = server))

enter image description here

Pork Chop
  • 28,528
  • 5
  • 63
  • 77
0

Radiant uses modals for the help files. In the latest versions of shiny the easiest way to do something like this is with modelDialog. See https://shiny.rstudio.com/reference/shiny/latest/modalDialog.html

Vincent
  • 5,063
  • 3
  • 28
  • 39