R Shiny - resize numericInput box -
i have basic shiny app.
ui.r:
library(shiny) shinyui(fluidpage( titlepanel("average run length simulation"), fluidrow( tabsetpanel( tabpanel("shewhart v. shewhart", fluidrow( column(4,"rule"), column(2,"group 1"), column(2,"group 2") ), fluidrow( column(4,"1 point more k sigma away mean"), column(2, checkboxinput("svsg1r1",label=" ",value=f), numericinput("svsg1k1",label=" ",value=3,min=1,step=1) ), column(2, checkboxinput("svsg2r1",label=" ",value=f), numericinput("svsg2k1",label=" ",value=3,min=1,step=1) ) ) ) ) ) ))
the server.r file basic 1 created rstudio in new project.
what want tabular layout of widget elements, but, don't think i'll without lot of work , isn't worth it. so, instead, want reduce width of numericinput()
boxes akin the size
attribute of <input>
element in html form.
how in shiny? there standard way apply css/html specifics particular elements?
this works, though it's global css , i'd rather have element specific. added inside fluidpage()
element in ui.r , resized both boxes.
tags$head( tags$style(html(" input[type=\"number\"] { width: 100px; } ")) )