htmltools
Tools for HTML generation and output
The htmltools package provides tools for generating, manipulating, and writing HTML from R code. It enables developers to customize user interfaces in Shiny applications and R Markdown documents programmatically without writing raw HTML.
The package serves as a foundation for building HTML components that can be combined and manipulated in flexible ways. It includes tagQuery() for querying and modifying HTML structures, and it supports composing multiple HTML widgets or components into single webpages. This architecture allows other packages to build reusable HTML components that users can customize beyond what component authors originally designed.
Contributors#
Resources featuring htmltools#
Carson Sievert || Using tagQuery() from {htmltools} to modify HTML snippets in R || RStudio
00:00 Introduction 00:45 Motivating example - enabling front-facing camera as an input for fileInput() 01:55 Breaking down the return value of fileInput() 04:16 Design philosophy of fileInput() 07:27 tagAppendAttributes() overview 11:05 tagQuery() basics 12:00 Quick overview of the htmltools package 13:18 How tagQuery() is used to append attributes 20:54 How tagQuery() is used to append children 23:45 Using tagQuery() on an actionButton()
Learn more about tagQuery here: https://rstudio.github.io/htmltools/articles/tagQuery.html
Read up on tagAppendAttributes() here: https://shiny.rstudio.com/reference/shiny/latest/tagAppendAttributes.html
And learn more about the htmltools package here: https://rstudio.github.io/htmltools/index.html
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Developer (@winston_chang) Animation, design, and editing: Jesse Mostipak (@kierisi)

