R shiny sizing boxes

My problem is that I told brilliant to take the whole row (12 columns) to print the c7 window, but it only uses half. Can anyone figure out what the problem is? Below is my code:

 library(shinydashboard)
 library(shiny)
 library(readr)
 library(rsconnect)
 header=dashboardHeader(title="App")
 sidebar=dashboardSidebar(sidebarMenu(
 menuItem("Stack", tabName = "a", icon = icon("dashboard"))))
 c7=column(12,box(title="Prediction Box",status="warning",solidHeader=FALSE,
            textInput("text", label = h3("Write something :"), value = ""),actionButton("do","Go")))
 body=dashboardBody(tabItems(tabItem(tabName="a",fluidRow(c7))))
 ui <- dashboardPage(header,sidebar,body)

 server <- function(input, output){
 }
shinyApp(ui,server) 

      

+3


source to share


1 answer


By default, if you don't specify a width box

, it will be set to 6

. Take a look?box

etc .:  enter image description here



library(shinydashboard)
library(shiny)

header=dashboardHeader(title="App")
sidebar=dashboardSidebar(sidebarMenu(menuItem("Stack", tabName = "a", icon = icon("dashboard"))))

?box
c7=column(12,box(width=12,title="Prediction Box",status="warning",solidHeader=FALSE,
                 textInput("text", label = h3("Write something :"), value = ""),actionButton("do","Go")))


body=dashboardBody(tabItems(tabItem(tabName="a",fluidRow(c7))))
ui <- dashboardPage(header,sidebar,body)

server <- function(input, output){
}
shinyApp(ui,server) 

      

enter image description here

+3


source







All Articles