Skip to content

Conversation

@JohnADawson
Copy link
Contributor

Themes affect matrixInputs' labels differently from other Shiny inputs'. For example, in the following application the space between the matrixInput and its label is too little.

ui <- shiny::fluidPage(
  theme = bslib::bs_theme(),
  shiny::fluidRow(
    shiny::column(3L, shinyMatrix::matrixInput("matrix", "Label")),
    shiny::column(3L, shiny::textInput("text", "Label")),
    shiny::column(3L, shiny::numericInput("numeric", "Label", 0L)),
    shiny::column(3L, shiny::radioButtons("radio", "Label", letters[seq_len(3L)]))
  )
)

server <- function(input, output, session) {}

shiny::shinyApp(ui, server)
Image

The cause is that matrixInputs' labels do not have the class "control-label". This pull request makes matrixInputs' labels' classes like other Shiny inputs'. The example above becomes

Image

@aneudecker
Copy link
Collaborator

Thanks for the PR! Looks good to me.
Could you increase the version in the DESCRIPTION file to 0.8.1, then we can merge the PR

@aneudecker aneudecker merged commit aa130c9 into INWTlab:master Jul 28, 2025
11 checks passed
@aneudecker
Copy link
Collaborator

Merged. Thanks for your contribution!

@JohnADawson JohnADawson deleted the label branch August 20, 2025 06:08
@JohnADawson JohnADawson restored the label branch August 20, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants