shinyMobile Tools
@@ -139,11 +140,21 @@Pull to RefreshpullToRefresh = TRUE in f7Page
options will
activate it. On the server side, an input, namely input$ptr is TRUE when
-ptr is refreshed and becomes NULL at the end of the animation. This
-allows to trigger updates/computations on the server side, for
-instance:
+ptr is refreshed and becomes NULL at the end of the animation (You may
+run the app below in full screen mode and hold a left click with your
+mouse from top to bottom):
+
+
+
+
+Expand
+
+
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
title = "My app",
options = list(pullToRefresh = TRUE),
@@ -197,10 +208,21 @@ Informations about your current
Description
shinyMobile has a predefined input, namely
-input$deviceInfo:
+input$deviceInfo.
+
+
+
+
+Expand
+
+
-shiny::shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -282,9 +304,20 @@ Usecase
Below the example displays a card only when the app is on
desktop.
+
+
+
+
+Expand
+
+
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -303,13 +336,12 @@ Usecase
# generate a card only for desktop
output$card <- renderUI({
- if (input$deviceInfo$desktop) {
- f7Card(
- "This is a simple card with plain text,
- but cards can also contain their own header,
- footer, list view, image, or any other element."
- )
- }
+ req(input$deviceInfo$desktop)
+ f7Card(
+ "This is a simple card with plain text,
+ but cards can also contain their own header,
+ footer, list view, image, or any other element."
+ )
})
}
)
@@ -320,10 +352,21 @@ Informations about Shiny inputs
shinyMobile has input$lastInputChanged
which returns the name, value and type of the last changed input, see
-below:
+below.
+
+
+
+
+Expand
+
+
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -359,9 +402,10 @@ Informations about Shiny inputs
Other information
-input$shinyInfo
gives the current workerId (for
-shinyapps.io, shiny server pro, rstudio connect), the unique sessionId
-(equal to session$token on the server side).
+input$shinyInfo
gives the current
+workerId (for shinyapps.io, shiny server pro, Posit
+Connect), the unique sessionId (equal to
+session$token
on the server side).
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
title = "My app",
options = list(pullToRefresh = TRUE),
@@ -197,10 +208,21 @@ Informations about your current
Description
shinyMobile has a predefined input, namely
-input$deviceInfo:
+input$deviceInfo.
+
+
+
+
+Expand
+
+
-shiny::shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -282,9 +304,20 @@ Usecase
Below the example displays a card only when the app is on
desktop.
+
+
+
+
+Expand
+
+
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -303,13 +336,12 @@ Usecase
# generate a card only for desktop
output$card <- renderUI({
- if (input$deviceInfo$desktop) {
- f7Card(
- "This is a simple card with plain text,
- but cards can also contain their own header,
- footer, list view, image, or any other element."
- )
- }
+ req(input$deviceInfo$desktop)
+ f7Card(
+ "This is a simple card with plain text,
+ but cards can also contain their own header,
+ footer, list view, image, or any other element."
+ )
})
}
)
@@ -320,10 +352,21 @@ Informations about Shiny inputs
shinyMobile has input$lastInputChanged
which returns the name, value and type of the last changed input, see
-below:
+below.
+
+
+
+
+Expand
+
+
-shinyApp(
+library(shiny)
+library(shinyMobile)
+
+shinyApp(
ui = f7Page(
+ options = list(dark = FALSE),
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
@@ -359,9 +402,10 @@ Informations about Shiny inputs
Other information
-input$shinyInfo
gives the current workerId (for
-shinyapps.io, shiny server pro, rstudio connect), the unique sessionId
-(equal to session$token on the server side).
+input$shinyInfo
gives the current
+workerId (for shinyapps.io, shiny server pro, Posit
+Connect), the unique sessionId (equal to
+session$token
on the server side).