shinydashboard icon indicating copy to clipboard operation
shinydashboard copied to clipboard

resizable boxes?

Open paul-shannon opened this issue 5 years ago • 2 comments

If individual boxes could be resized via direct manipulation - the usual click-corner-and-drag gesture - the user would be empowered, free to size each box as they wish according to their needs of the moment.

Not easy, I'm sure, to enhance a div to do this. But since you rstudio folks are magi, maybe this could go on the list?

Thanks for your excellent code!

paul-shannon avatar Jun 08 '20 23:06 paul-shannon

You might want to have a look at shinyjqui and it's function jqui_resizable:

library(shiny)
library(shinydashboard)
library(shinyjqui)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(
    fluidRow(
      jqui_resizable(
        box(height = "100%",
            "Box content here", br(), "More box content",
            sliderInput("slider1", "Slider input:", 1, 100, 50),
            textInput("text1", "Text input:")
        )
      ),
      jqui_resizable(
        box(height = "100%",
        "Box content here", br(), "More box content",
        sliderInput("slider2", "Slider input:", 1, 100, 50),
        textInput("text2", "Text input:")
      )
      )
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

screen

ismirsehregal avatar Jul 16 '20 14:07 ismirsehregal

This looks like an excellent solution. I will try it out. Thank you!

  • Paul

On Jul 16, 2020, at 7:34 AM, ismirsehregal [email protected] wrote:

You might want to have a look at shinyjqui and it's function jqui_resizable:

library(shiny) library(shinydashboard) library(shinyjqui)

ui <- dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( fluidRow( jqui_resizable( box(height = "100%", "Box content here", br(), "More box content", sliderInput("slider1", "Slider input:", 1, 100, 50), textInput("text1", "Text input:") ) ), jqui_resizable( box(height = "100%", "Box content here", br(), "More box content", sliderInput("slider2", "Slider input:", 1, 100, 50), textInput("text2", "Text input:") ) ) ) ) )

server <- function(input, output, session) {}

shinyApp(ui, server)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

paul-shannon avatar Jul 17 '20 15:07 paul-shannon