Learn R Programming

shinyMobile (version 0.7.0)

f7Popover: Create a framework 7 popover

Description

f7Popover has to be used in an oberve or observeEvent context. Only works for input elements!

Usage

f7Popover(targetId, content, session = shiny::getDefaultReactiveDomain())

Arguments

targetId

Target to put the popover on.

content

Popover content.

session

shiny session.

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(shinyMobile)
 shinyApp(
   ui = f7Page(
     title = "f7Popover",
     f7SingleLayout(
       navbar = f7Navbar(title = "f7Popover"),
       f7PopoverTarget(
         f7Button(
           inputId = "goButton",
           "Go!"
         ),
         targetId = "test"
       ),
       br(),
       br(),
       f7PopoverTarget(
         f7Slider(
           inputId = "slider",
           label = "Value",
           value = 10,
           min = 0,
           max = 20
         ),
         targetId = "test2"
       )
     )
   ),
   server = function(input, output, session) {
     observe({
       f7Popover(
         targetId = "test",
         content = "This is a f7Button",
         session
       )
     })

     observe({
       f7Popover(
         targetId = "test2",
         content = "This is a f7Slider",
         session
       )
     })
   }
 )
}
# }

Run the code above in your browser using DataLab