Shiny R Button Alignment

I have two buttons in a Ui file

submitButton("Analysis"),width=6,downloadButton('downloadData', 'Download Data')) 

Which gives the following output as an application

enter image description here

However, I am trying to align these buttons so that the download data is right-aligned and the analysis button is on the left, not what it looks like now. How can I do it?

+7
r shiny
source share
1 answer

You can do the following. Please take a look at the shiny 4 small input text boxes side by side also

 library(shiny) ui =fluidPage( div(style="display:inline-block",submitButton("Analysis"),width=6), div(style="display:inline-block",downloadButton('downloadData', 'Download Data')) ) server = function(input, output, session){} runApp(list(ui = ui, server = server)) 

enter image description here

+4
source share

All Articles