Those variables can be used to customize inputs in Bootstrap and Bootswatch themes.
bs_vars_input(
bg = NULL,
color = NULL,
border = NULL,
border_radius = NULL,
color_placeholder = NULL,
group_addon_bg = NULL,
border_focus = NULL,
bg_disabled = NULL
)
Background color.
Text color.
Border color.
Border radius.
Text color of placeholder.
Background color of addons.
Color of border when focused.
Background color for disabled input.
a list
that can be used in create_theme
.
See default parameters for Bootstrap: https://getbootstrap.com/docs/3.4/customize/.
# change border radius
bs_vars_input(
border_radius = "20px"
)
#> $`input-border-radius`
#> [1] "20px"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars" "list"
if (interactive()) {
library(shiny)
ui <- fluidPage(
use_theme(create_theme(
theme = "default",
bs_vars_input(
border_radius = "20px"
)
)),
tags$h2("Rounded corner for inputs"),
textInput("text", "Text:"),
selectInput("select", "Select:",
letters, selectize = FALSE)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}