textInput | R Documentation |
Modifications to textInput to allow added functionality and styles
textInput(
inputId,
label,
value = "",
width = NULL,
placeholder = NULL,
size = c("m", "s", "l", "xl"),
style = c("default", "pill", "round", "clean"),
border.type = c("none", "primary", "secondary", "info", "success", "danger", "warning"),
prepend = NULL,
append = NULL,
disabled = FALSE
)
inputId |
The identification name |
label |
The label for the input |
value |
The current value of the input |
width |
width of the text input |
placeholder |
A placeholder text |
size |
The size of the input, "m", "s", "l", "xl" |
style |
Style to adapt, options include "default", "pill", "round", "clean" |
border.type |
Add a border coloring using either of "none", "primary","secondary", "info", "success", "danger", "warning" |
prepend |
Add a prepended text or icon |
append |
Add an appended text or icon |
disabled |
Boolean. If textInput should be disabled |
A HTML with modifications to th style information
For more information on the features of the form, visit the examples section of the help documentation
if (interactive()) {
library(shiny)
library(nextGenShinyApps)
shiny::shinyApp(
ui = fluidPage(
style = "8",
custom.bg.color = "white",
sidebar = NULL,
header = NULL,
card(
header = FALSE,
tags$h3("Text input"),
textInput("caption", "Basic"),
textInput("caption", "Basic", style = "clean"),
textInput("caption", "Border - primary",
"Enter sample text",
prepend = "@", border.type = "info"
),
textInput("caption", "Border - primary",
"Enter sample text",
prepend = shiny::icon("lock")
),
textInput("caption", "Border - primary",
"Enter sample text",
append = "%"
),
textInput("caption", "Border - primary",
"Enter sample text",
prepend = shiny::icon("chart"),
append = ".00"
)
)
),
server = function(input, output) {
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.