Description Usage Arguments Value See Also Examples
Adds a new widget to the dock
1 2 3 4 5 6 7 8 9 10 11 12 |
proxy |
Either output from the |
id |
ID for luminophor widget |
title |
Title for luminophor widget |
caption |
Caption for luminophor widget |
icon |
Font Awesome icon (specified via the |
closable |
Create removable |
insertmode |
How should the widget be added? Options include |
refwidgetID |
Reference widget ID for |
relsize |
Relative size of widget (between 0 and 1) in relation to |
ui |
UI content. If just text, need to use HTML(...) |
Proxy LuminophoR object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # Add widget on render
if (interactive()) {
library(shiny)
library(luminophor)
shinyApp(
ui = fluidPage(
fluidRow(column(12, luminophorOutput('lmo', height='90vh')))
),
server = function(input, output) {
output$lmo <- renderLuminophor(
luminophor() %>%
addWidget("mywidget")
)
}
)
}
# Add widget on event
if (interactive()) {
library(shiny)
library(luminophor)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(
actionButton('add', 'Add Widgets', icon = icon('plus'))
),
mainPanel(
luminophorOutput('lmo', height='90vh')
)
)
),
server = function(input, output) {
output$lmo <- renderLuminophor(
luminophor()
)
observeEvent(input$add, {
luminophorProxy('lmo') %>%
addWidget("mywidget")
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.