consortUI | R Documentation |
Create a CONnected SORT ui whose items are sortable and transferable between other elements rendered by this method
consortUI(
inputId,
label,
items = NULL,
item_class = NULL,
classes = NULL,
placeholder = "n/a",
width = "300px",
...
)
inputId |
Input ID. |
label |
Element label. |
items |
Optional, character vector of items. |
item_class |
Optional, additional class for items in the sortable ui element. |
classes |
Optional, additional classes for the sortable ui element. Including the "one-to-one" class will create a "monogamous" consort element that will only take one item (see details). |
placeholder |
Placeholder text. |
width |
UI element width. |
... |
Attributes and children passed into the container 'div'. |
This is based on the package function shinyjqui::orderInput
, but the HTML input builder is simpler
and the custom Shiny input bindings are implemented somewhat differently for a more specific purpose.
In particular, there is an option to specify a "one-to-one" class, which will be recognized to make
the element have the behavior of only taking one droppable item at a time. Items within the "one-to-one"
elements are conferred the item class "used", while elements built without the "one-to-one" class confer upon
their child items the class "un-used", to help visualize new membership after transfers.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.