Title: | Shiny Drag-n-Drop |
---|---|
Description: | Add functionality to create drag and drop div elements in shiny. |
Authors: | Aaron Hoffer [aut, cre] |
Maintainer: | Aaron Hoffer <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2025-02-20 03:29:01 UTC |
Source: | https://github.com/ayayron/shinydnd |
With draggable elements, you may not want to create one at a time, instead creating a set with a common id prefix. This simplifies the process to pass a vector of elements instead of using a loop or apply function to generate
dragSetUI(id, textval = list(""))
dragSetUI(id, textval = list(""))
id |
The div id of the draggable element set |
textval |
The list with the name for each of the draggable elements |
Returns the set of dragable div elements.
dragSetUI("dragset", list("foo", "bar", "baz"))
dragSetUI("dragset", list("foo", "bar", "baz"))
Create a draggable UI element.
dragUI(id, ..., style = NULL, class = "dragelement")
dragUI(id, ..., style = NULL, class = "dragelement")
id |
The div id of the element |
... |
Any list of elements can be passed inside the div element itself to create more complex draggable elements, not just text |
style |
Add a string with additional css styling not defined by id or class |
class |
The css class style, uses the standard "dragelement" class that it comes with |
dragable div element
dropUI
dropUI(id, style = NULL, class = "dropelement", row_n = 1, col_n = 1)
dropUI(id, style = NULL, class = "dropelement", row_n = 1, col_n = 1)
id |
The div id of the element |
style |
The css styling |
class |
The css class style |
row_n |
set the number of rows to be used in the vertical selection. Height is proportional to the number of rows. |
col_n |
set the number of columns to be used in the vertical selection. Width is proportional to the number of columns. |
div element with nested elements if vertical is true
The ShinyDND package provides three categories of important functions: dragUI, dropUI, and dragSetUI.
The ShinyDND functions ...