Skip to content

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Sep 12, 2023

Supersedes #485. Here's a hello world example.

library(shiny)
library(bslib)

ui <- page_fixed(
    input_check_buttons("x", state.name[1:3], selected = state.name[1:3]),
    input_radio_buttons("y", state.name[1:3]),
    input_check_buttons("z", state.name[1:10], gap = 8)
)
server <- function(input, output, session) {
    observe({
        print(input$x)
        print(input$y)
        print(input$z)
    })
}

shinyApp(ui, server)

TODO

  • Add a label argument?
  • Should we support I("all")/I("none")? Take inspiration from radioButtons()/checkboxGroupInput()?
  • Should we support size = c("sm", "md", "lg")?
  • How to specify (require?) aria-label
  • Do we need to tell shiny not to bind to the inputs?
  • Consider wrapping logic up in web component

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.

1 participant