shinyTree | R Documentation |
This creates a spot in your Shiny UI for a shinyTree which can then be filled
in using renderTree
.
shinyTree(
outputId,
checkbox = FALSE,
search = FALSE,
searchtime = 250,
searchplaceholder = "",
dragAndDrop = FALSE,
types = NULL,
theme = "default",
themeIcons = TRUE,
themeDots = TRUE,
sort = FALSE,
unique = FALSE,
wholerow = FALSE,
stripes = FALSE,
multiple = TRUE,
animation = 200,
contextmenu = FALSE,
three_state = TRUE,
whole_node = TRUE,
tie_selection = TRUE
)
outputId |
The ID associated with this element |
checkbox |
If |
search |
If |
searchtime |
Determines the reaction time of the search algorithm. Default is 250ms. |
searchplaceholder |
Add a placeholder value to the search box |
dragAndDrop |
If |
types |
enables jstree types functionality when sent proper json (please see the types example) |
theme |
jsTree theme, one of |
themeIcons |
If |
themeDots |
If |
sort |
If |
unique |
If |
wholerow |
If |
stripes |
If |
multiple |
If |
animation |
The open / close animation duration in milliseconds.
Set this to |
contextmenu |
If |
three_state |
If |
whole_node |
If |
tie_selection |
If |
A shinyTree is an output *and* an input element in the same time. While you can
fill it via renderTree
you can access its content via input$tree
(for example after the user rearranged some nodes). By default, input$tree
will
return a list similiar to the one you use to fill the tree. This behaviour is controlled
by getOption("shinyTree.defaultParser")
. It defaults to "list"
, but can be set
to "tree"
, in which case a data.tree
is returned.
renderTree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.