is_device_desktop: Is the user on a desktop device?

View source: R/get_info.R

is_device_desktopR Documentation

Is the user on a desktop device?

Description

Convenience function that checks if the user's device is detected as desktop. See get_device() for details.

Usage

is_device_desktop()

Value

Whether or not this user is on desktop

Examples

if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    shinybrowser::detect(),
    "Are you on desktop?",
    textOutput("result")
  )
  server <- function(input, output, session) {
    output$result <- renderText({
      shinybrowser::is_device_desktop()
    })
  }
  shinyApp(ui, server)
}

daattali/shinybrowser documentation built on Aug. 21, 2024, 6:12 a.m.