R/UIkitTotop.R

Defines functions UIkitTotop

Documented in UIkitTotop

#' Create an UIkit to top scroller
#'
#' Navigate at the top of the web page
#'
#' @examples
#' if(interactive()){
#' library(shiny)
#' 
#' shiny::shinyApp(
#'  ui = UIkitPage(
#'    title = "My UIkit application",
#'    UIkitCard(
#'     title = "My card",
#'     badge = "test",
#'     hover = TRUE,
#'     horizontal = TRUE,
#'     UIkitCardMedia(
#'       src = "https://getuikit.com/docs/images/light.jpg",
#'       horizontal = TRUE, 
#'       position = "left"
#'     ),
#'     body = "This is the body"
#'     ),
#'     UIkitCard(
#'       title = "My card",
#'       badge = "test",
#'       hover = TRUE,
#'       horizontal = FALSE,
#'       header = "This is the header",
#'       style = "secondary",
#'       UIkitCardMedia(
#'         src = "https://getuikit.com/docs/images/light.jpg",
#'         horizontal = TRUE, 
#'         position = "left"
#'       ),
#'       body = "This is the body",
#'       footer = "This is the footer"
#'     ),
#'     UIkitCard(
#'     title = "My card",
#'     badge = "test",
#'     hover = TRUE,
#'     horizontal = TRUE,
#'     UIkitCardMedia(
#'       src = "https://getuikit.com/docs/images/light.jpg",
#'       horizontal = TRUE, 
#'       position = "left"
#'     ),
#'     body = "This is the body"
#'     ),
#'     UIkitCard(
#'       title = "My card",
#'       badge = "test",
#'       hover = TRUE,
#'       horizontal = FALSE,
#'       header = "This is the header",
#'       style = "secondary",
#'       UIkitCardMedia(
#'         src = "https://getuikit.com/docs/images/light.jpg",
#'         horizontal = TRUE, 
#'         position = "left"
#'       ),
#'       body = "This is the body",
#'       footer = "This is the footer"
#'     ),
#'     UIkitTotop()
#'  ),
#'  server = function(input, output) {}
#'  )
#' }
#' 
#' @author David Granjon, \email{dgranjon@@ymail.com}
#'
#' @export
UIkitTotop <- function() {
  totopTag <- shiny::tags$a(href = "")
  totopTag$attribs[["uk-totop"]] <- NA
  totopTag
}
DivadNojnarg/shinyUIkit documentation built on July 24, 2019, 8:17 a.m.