Shiny Gridster dynamicly adjust margin sizes
<p>I am using the 'Add-on package for using the Gridster library with Shiny', (<a href="https://github.com/wch/shiny-gridster" rel="nofollow">https://github.com/wch/shiny-gridster</a>), which is downloadable by using the below:</p>

<pre><code>devtools::install_github("wch/shiny-gridster")
</code></pre>

<p>But I would like the size of the gridster items to be able to vary with the a slider in the sidebar.</p>

<p>Any help would be much appreciated.</p>

<p>One other question I have is how do I adjust the css for the gridsterItems so that they have all a different background, e.g. a blue background.</p>

<p>My <code>ui.R</code> and <code>server.R</code> can be seen below, but the gridster items do not seem to change in size in line with the slider.</p>

<p>First my <code>ui.R</code> file</p>

<pre><code># ui.R
library(shinyGridster)
library(shinydashboard)

dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    sliderInput("n1", "gridster_box_size:", min = 50, max = 500, value = 300)
  ),
  dashboardBody(
    uiOutput('gg')
)
)
</code></pre>

<p>and my <code>server.R</code> file</p>

<pre><code># sever.R
library(shinyGridster)

shinyServer(function(input, output, session) {
  output$myPlot &lt;- renderPlot({plot(1:5)})
  output$myText &lt;- renderText(({'hello test text'}))
  output$gg &lt;- renderUI({

      gridster(width = input$n1, height = input$n1, 
               gridsterItem(col = 1, row = 1, sizex = 1, sizey = 1,
                            sliderInput("n", "Input value:", min = 0, max = 50, value = 10)
               ),
               gridsterItem(col = 2, row = 1, sizex = 1, sizey = 1,
                            textOutput("myText")
               ),
               gridsterItem(col = 1, row = 2, sizex = 2, sizey = 1,
                            plotOutput("myPlot", height = 200)
               )
      )


  })

}
)
</code></pre>

<hr>

<p>A working version of gridster looks like the below for <code>ui.R</code> :</p>

<pre><code># ui.R
library(shinyGridster)
library(shinydashboard)

dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    sliderInput("n1", "gridster_box_size:", min = 50, max = 500, value = 300)
  ),
  dashboardBody(
    gridster(width = 300, height = 300, 
             gridsterItem(col = 1, row = 1, sizex = 1, sizey = 1,
                          sliderInput("n", "Input value:", min = 0, max = 50, value = 10)
             ),
             gridsterItem(col = 2, row = 1, sizex = 1, sizey = 1,
                          textOutput("myText")
             ),
             gridsterItem(col = 1, row = 2, sizex = 2, sizey = 1,
                          plotOutput("myPlot", height = 200)
             )
    )
)
)
</code></pre>

<p>with its complementary <code>server.R</code></p>

<pre><code># sever.R
library(shinyGridster)

shinyServer(function(input, output, session) {
  output$myPlot &lt;- renderPlot({plot(1:5)})
  output$myText &lt;- renderText(({'hello test text'}))

}
)
</code></pre>