shinyglide icon indicating copy to clipboard operation
shinyglide copied to clipboard

Buttons on left and right

Open ShinyFabio opened this issue 3 years ago • 4 comments

Hi, first of all thank you for your fantastic package! It will greatily improve my shinyapps. I have two questions:

  1. Is it possible to put the next button on the right and the previous button on the left? The default is only top and bottom, but I think a third options "on the sides" can be a very nice upgrade. The buttons could be in the middle of the screen() content.
  2. Is it possible to change the animation of the transition? For example check the gif in this question: https://stackoverflow.com/questions/73680535/nested-animated-conditionalpanel?noredirect=1#comment130119613_73680535 That would be my app. That solution was very beautiful, but it was a mess. Your package simplifies everything by a lot but if I can use the same transition I will be nicer.

Thanks!

ShinyFabio avatar Sep 12 '22 13:09 ShinyFabio

Hi,

  1. This should be doable with custom controls.
  2. As far as I know this kind of animation is not provided by glide.js. The only possible customization is the duration and timing of the animation.

Hope this helps !

juba avatar Sep 12 '22 13:09 juba

Thank you for the very quick answer! I've alread read the whole documentation, but it didn't help me. Basically I want something like this:

fluidRow(
  column(2, br(), br(),  prevButton()),    #some spaces just to center the button in the middle of the plot
  column(6, plotOutput("plot"),    #here the content of the screen() function
  column(2, br(), br(), nextButton()
)

I think that it cannot be done from the custom controls but I don't know the code behind it. Maybe I'm wrong!

ShinyFabio avatar Sep 12 '22 13:09 ShinyFabio

You could take a look at the custom controls shiny app and its source code, I think it is doing something very close to what you try to achieve.

juba avatar Sep 12 '22 13:09 juba

I don't understand very much the css code, but at the end adjusting a bit my code I kind of reached my goal. Anyway, I think that it could be integrated inside the package as an option for the controls_position(). It would be a nice feature!

ShinyFabio avatar Sep 12 '22 14:09 ShinyFabio