HTML Widgets for R

A framework for creating HTML widgets that render in various contexts including the R console, 'R Markdown' documents, and 'Shiny' web applications.


News

  • Export getDependency function

  • onRender hooks were firing too early when used in Shiny apps.

  • Widget IDs: only restore random.seed when non-NULL

  • Pass knitr options to saveWidget

  • Ensure that scaffoldWidget opens files correctly within RStudio

  • The resize handler also works for the JavaScript events shown.bs.collapse and hidden.bs.collapse now so that widgets inside the Bootstrap collapse class can be displayed

  • Fix references to vignettes in documentation

  • Add elementId parameter to widget function generated by scaffoldWidget

  • More robust method of generating unique widget IDs

  • Modify advanced and sizing vignettes to use new style widget declarations

  • Introduce new scheme for defining JavaScript bindings that will make it easier for widgets to gain access to other widget instances on the page.

  • Add onRender hook for widgets to execute custom JavaScript code after rendering.

  • Add appendContent and prependContent functions for adding HTML to a widget rendered in a static context (i.e. R console or Rmd)

  • Fix a bug where the string "" in the widget data caused saveWidget() to have malformed output. (#168)

  • Tweak pandoc conversion used in saveWidget to prevent hanging with large htmlwidget script data elements (use "markdown" rather than "markdown-strict" as input format)

  • Increase pandoc stack size to 512M for saveWidget (often required for e.g. larger embedded leaflet maps). Stack size can also be controlled by the pandoc.stack.size option.

  • Import latest version of with_pandoc_safe_environment from rmarkdown

  • Fix issue that prevented calling renderValue() from within resize()

  • Add background parameter to saveWidget function

  • Fix a bug where "" appearing in widget data would break parsing

  • Fix a bug where multiple widgets on a page caused all but one to miss resize events

  • Sync vignettes with contents of htmlwidgets website

  • Use minified files while scaffolding widget wherever available

  • Suppress viewing widgets in non-interactive R sessions by default

  • Export the HTMLWidgets.staticRender function

  • Add a preRenderHook for widgets

  • Use jsonlite rather than RJSONIO for JSON serialization

  • Call widget.resize in more situations

  • Initial release to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("htmlwidgets")

0.9 by JJ Allaire, 3 months ago


https://github.com/ramnathv/htmlwidgets


Report a bug at https://github.com/ramnathv/htmlwidgets/issues


Browse source code at https://github.com/cran/htmlwidgets


Authors: Ramnath Vaidyanathan [aut, cph], Yihui Xie [aut], JJ Allaire [aut, cre], Joe Cheng [aut], Kenton Russell [aut, cph], RStudio [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmltools, jsonlite, yaml

Suggests knitr

Enhances shiny


Imported by D3partitionR, DT, DiagrammeR, EcoGenetics, HARtools, NormalizeMets, Plasmidprofiler, QRAGadget, SpatialEpiApp, antaresViz, basictabler, bea.R, billboarder, canvasXpress, collapsibleTree, colourpicker, d3Tree, d3heatmap, diffr, diffrprojectswidget, dygraphs, edgebundleR, flexdashboard, flextable, focusedMDS, formattable, gSEM, ggiraph, ggraptR, googleway, gradientPickerD3, heatmaply, highcharter, htmlTable, htmltidy, iheatmapr, inlmisc, jsTree, lazyrmd, leaflet, leaflet.esri, leaflet.extras, learnr, lime, listviewer, manipulateWidget, mapedit, mapview, metricsgraphics, mindr, msaR, networkD3, pairsD3, phylocanvas, pivottabler, plotly, profvis, qrage, qtlcharts, rAmCharts, radarchart, rbokeh, rchess, re2r, rgl, rhandsontable, rpivotTable, scatterD3, seasonalview, shiny.semantic, shinyHeatmaply, shinyjqui, simPATHy, slickR, sparkline, sunburstR, svgPanZoom, threejs, timevis, tmap, treespace, trelliscope, uavRmp, vdiffr, vegalite, visNetwork, wordcloud2.

Depended on by d3plus, widgetframe.

Suggested by bookdown, covr, data.tree, knitr, muir, ndtv, parlitools, plumber, reactR, replyr, stringr.

Enhanced by repr.


See at CRAN