shiny::numericInput("number", "A Number", 42, min = 10, max = 100, step = 13, width = "200px")
twNumericInput("number", "A Number", 42,
min = 10, max = 100, step = 13, width = "200px",
container_class = "CONTAINER", label_class = "LABEL", input_class = "INPUT"
)
# basic full shiny example
library(shiny)
ui <- fluidPage(
use_tailwind(),
twNumericInput(
"number", "A Number", 123456,
# Apply tailwind classes
container_class = "w-48 m-4 p-2 border border-gray-200 rounded-md drop-shadow-md",
label_class = "font-mono text-gray-600",
input_class = "drop-shadow-lg text-gray-600 font-mono rounded-md border-amber-400"
),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({
input$number
})
}
if (interactive()) shiny::shinyApp(ui, server)
Run the code above in your browser using DataLab