vik
vik

Reputation: 153

Shiny R Button Alignment

I have two buttons in my U.i file

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

Which gives the following output as the app

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, instead of how it looks now. How do i go about this?

Upvotes: 10

Views: 6877

Answers (1)

Pork Chop
Pork Chop

Reputation: 29387

You can do the following. Please look into shiny 4 small textInput 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

Upvotes: 8

Related Questions