R/dragUI.R

Defines functions dragUI

Documented in dragUI

#'dragUI
#'
#'Create a draggable UI element.
#'
#'@param id The div id of the element
#'@param ... Any list of elements can be passed inside the div element itself to create more complex draggable elements, not just text
#'@param style Add a string with additional css styling not defined by id or class
#'@param class The css class style, uses the standard "dragelement" class that it comes with
#'@return dragable div element
#'@import htmltools
#'@export

dragUI = function(id,..., style = NULL, class = "dragelement") {
  dragUI = htmltools::tags$div(id = id, class = class, draggable = TRUE,
           style = style, list(...))
  htmltools::attachDependencies(dragUI, shinyDNDDep)
}

Try the shinyDND package in your browser

Any scripts or data that you put into this service are public.

shinyDND documentation built on May 2, 2019, 6:52 a.m.