Reputation: 304
I thought the full row was 12, so 4 3-wide columns should fill across the whole page, but this doesn't. library(shiny)
fluidPage(
mainPanel(
fluidRow(
column(3,
textInput("user_id", "User ID", width = NULL)
),
column(3,
textInput("name", "Organization name",value = "",width = NULL)
),
column(3,
textInput("address", "Address",value = "",width = NULL)
),
column (3,
textInput("zip", "Zip Code",value = "",width = NULL)
)
) #row
) #panel
) #page
Upvotes: 1
Views: 306
Reputation: 7457
Per default mainPanel
has a width
of 8. This can be seen when looking at the docs:
?shiny::mainPanel
mainPanel(..., width = 8)
Therefore you have to explicitly state width = 12
inside your mainPanel
call.
fluidPage(
mainPanel(
fluidRow(
column(3,
textInput("user_id", "User ID", width = NULL)
),
column(3,
textInput("name", "Organization name",value = "",width = NULL)
),
column(3,
textInput("address", "Address",value = "",width = NULL)
),
column (3,
textInput("zip", "Zip Code",value = "",width = NULL)
)
) #row
, width = 12) #panel
) #page
..should do the trick.
Upvotes: 1