inst/examples/fontawesome/global.R

library(jsTreeR)
library(shiny)
library(jsonlite)

nodes <- list(
  list(
    text = "RootA",
    icon = "far fa-moon red",
    children = list(
      list(
        text = "ChildA1",
        icon = "fa fa-leaf green",
        data = list(value = "A1")
      ),
      list(
        text = "ChildA2",
        icon = "fa fa-leaf green",
        data = list(value = "A2")
      )
    )
  ),
  list(
    text = "RootB",
    icon = "far fa-moon red",
    children = list(
      list(
        text = "ChildB1",
        icon = "fa fa-leaf green",
        data = list(value = "B1")
      ),
      list(
        text = "ChildB2",
        icon = "fa fa-leaf green",
        data = list(value = "B2")
      )
    )
  )
)

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.