Title: | 'Shiny' Components in 'R Markdown' |
---|---|
Description: | 'Shiny' components, stored in 'R Markdown' documents. |
Authors: | Garrick Aden-Buie [aut, cre] |
Maintainer: | Garrick Aden-Buie <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1.9000 |
Built: | 2024-11-08 03:57:29 UTC |
Source: | https://github.com/gadenbuie/shinyComponents |
Shiny Components are self-contained shiny modules or app components, defined in R Markdown documents.
ui
The UI components. If the component contains only one
unnamed ui
chunk, or one ui
chunk named ui
, then this field is a
method, otherwise it is a list of ui
component methods.
server
The server components. If the component contains only one
unnamed server
chunk, or one server
chunk named server
, then this
field is a method, otherwise it is a list of server
component methods.
dependencies
A list of the component's HTML dependencies.
new()
Initialize the Shiny Component from an R Markdown file.
ShinyComponent$new(file)
file
Path to the R Markdown document
A new Shiny Component
assets()
The component's CSS, compiled SASS, and JavaScript assets.
ShinyComponent$assets()
A shiny::tagList()
containing the component's CSS and
JavaScript assets.
app()
An example app, created from the primary ui
and server
.
ShinyComponent$app(..., id = NULL, .ui = list(), .server = list())
...
Additional variables added into ui
and server
environments,
in ui
, server
and app
methods. Otherwise, ignored.
id
The component ID, if the component is being used as Shiny module.
.ui
A list of arguments to be passed on to the ui()
method.
.server
A list of arguments to be passed on to the server()
method.