Description Usage Arguments See Also Examples
Preview a shiny module in a shinydashboard
1 2 |
module |
The server function of a module or its name. |
name |
The id to pass to callModule while calling it. |
use_box |
A boolean indicating if the ui should be wrapped in a box |
title |
The dashboard title to display. |
titleWidth |
The width of the dashboard title. |
preview |
A boolean indicating if the return value should be a shinyApp object (default) or a named list with ui and server. |
... |
Additional parameters to pass to the module |
Other preview: preview_component
,
preview_datatable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(shiny)
slider_text_ui <- function(id){
ns <- NS(id)
tagList(
sliderInput(ns('num'), 'Enter Number', 0, 1, 0.5),
textOutput(ns('num_text'))
)
}
slider_text <- function(input, output, session){
output$num_text <- renderText({input$num})
}
preview_module(slider_text, title = 'Slider Text')
preview_module(slider_text, title = 'Slider Text', use_box = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.