{"id":13857530,"url":"https://github.com/dreamRs/shinytreeview","last_synced_at":"2025-07-13T21:33:00.260Z","repository":{"id":44762019,"uuid":"261497132","full_name":"dreamRs/shinytreeview","owner":"dreamRs","description":"Hierarchical tree input for Shiny apps","archived":false,"fork":false,"pushed_at":"2024-07-01T07:10:19.000Z","size":204,"stargazers_count":41,"open_issues_count":8,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-06T03:04:03.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamRs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-05T14:37:35.000Z","updated_at":"2024-07-01T07:10:23.000Z","dependencies_parsed_at":"2024-02-09T01:56:16.221Z","dependency_job_id":"1bd97919-3fa2-4997-a786-7e0b91c30745","html_url":"https://github.com/dreamRs/shinytreeview","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2Fshinytreeview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2Fshinytreeview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2Fshinytreeview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2Fshinytreeview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamRs","download_url":"https://codeload.github.com/dreamRs/shinytreeview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920376,"owners_count":17545478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:01:39.799Z","updated_at":"2024-11-22T15:30:52.928Z","avatar_url":"https://github.com/dreamRs.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"\n# shinytreeview\n\n\u003e Hierarchical tree structures input for Shiny applications. Interface for [bootstrap-treeview](https://github.com/patternfly/patternfly-bootstrap-treeview) JS library.\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n[![R-CMD-check](https://github.com/dreamRs/shinytreeview/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/shinytreeview/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n\n## Installation\n\nInstall the development version from GitHub with:\n\n```r\nremotes::install_github(\"dreamRs/shinytreeview\")\n```\n\n## Example\n\n`treeviewInput()` allow to select a value (or several) in a hierarchical structure :\n\n![](man/figures/example-treeview.png)\n\nCode for this example:\n\n```r\nlibrary(shiny)\nlibrary(shinytreeview)\n\ndata(\"cities\")\n\nui \u003c- fluidPage(\n  tags$h3(\"treeviewInput cities example\"),\n  treeviewInput(\n    inputId = \"tree\",\n    label = \"Choose a city:\",\n    choices = make_tree(\n      cities, c(\"continent\", \"country\", \"city\")\n    ),\n    multiple = FALSE,\n    prevent_unselect = TRUE,\n    width = \"100%\"\n  ),\n  verbatimTextOutput(outputId = \"result\")\n)\n\nserver \u003c- function(input, output, session) {\n  output$result \u003c- renderPrint({\n    input$tree\n  })\n}\n\nif (interactive())\n  shinyApp(ui, server)\n```\n\n\n\n`treecheckInput()` allow to check a value (or several) in a hierarchical structure :\n\n![](man/figures/example-treecheck.png)\n\nCode for this example:\n\n```r\nlibrary(shiny)\nlibrary(shinytreeview)\n\ndata(\"cities\")\n\nui \u003c- fluidPage(\n  tags$h3(\"treeviewInput cities example\"),\n  treecheckInput(\n    inputId = \"tree\",\n    label = \"Choose a city:\",\n    choices = make_tree(\n      cities, c(\"continent\", \"country\", \"city\")\n    ),\n    width = \"100%\"\n  ),\n  verbatimTextOutput(outputId = \"result\")\n)\n\nserver \u003c- function(input, output, session) {\n  output$result \u003c- renderPrint({\n    input$tree\n  })\n}\n\nif (interactive())\n  shinyApp(ui, server)\n```\n\n\n## Development\n\nThis package use [{packer}](https://github.com/JohnCoene/packer) to manage JavaScript assets, see packer's [documentation](https://packer.john-coene.com/#/) for more.\n\nInstall nodes modules with:\n\n```r\npacker::npm_install()\n```\n\nModify `srcjs/inputs/treeview.js`, then run:\n\n```r\npacker::bundle()\n```\n\nRe-install R package and try demo applications in `examples/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdreamRs%2Fshinytreeview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FdreamRs%2Fshinytreeview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdreamRs%2Fshinytreeview/lists"}