set_layout | R Documentation |
Set the layout of a Dash app
set_layout(app, ...)
app |
A dash application created with |
... |
Dash components to create the user interface, provided either as comma-separated components or a list of components. You can also provide a function returning a Dash component if you want the layout to re-render on every page load. |
app <- dash_app() app %>% set_layout("hello", "Dash") app %>% set_layout(div("hello"), "Dash") app %>% set_layout(list(div("hello"), "Dash")) app %>% set_layout("Conditional UI using an if statement: ", if (TRUE) "rendered", if (FALSE) "not rendered") app %>% set_layout(function() { div("Current time: ", Sys.time()) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.