inst/examples/fontawesome/ui.R

shinyUI(
  fluidPage(

    tags$head(
      tags$style(
        HTML(c(
          ".red {color: red;}",
          ".green {color: green;}",
          ".jstree-proton {font-weight: bold;}",
          ".jstree-anchor {font-size: medium;}"
        ))
      )
    ),

    br(),

    helpText(
      "This example illustrates the drag-and-drop functionality,",
      "the checkboxes, the proton theme, and the fontawesome icons."
    ),

    tags$hr(),

    titlePanel("Drag and drop the nodes"),

    fluidRow(
      column(
        width = 4,
        jstreeOutput("jstree")
      ),
      column(
        width = 4,
        tags$fieldset(
          tags$legend("All nodes"),
          verbatimTextOutput("treeState")
        )
      ),
      column(
        width = 4,
        tags$fieldset(
          tags$legend("Selected nodes (leaves only)"),
          verbatimTextOutput("treeSelected")
        )
      )
    )

  )

)

Try the jsTreeR package in your browser

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

jsTreeR documentation built on July 4, 2024, 9:08 a.m.