#' 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
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.