clearableTextInput: A clearable text inputInput control

Description Usage Arguments Value Examples

View source: R/inputs.R

Description

An UI component with a "X" button in the end to clear the entire entered text. It works the same as Textinput.

Usage

1
2
3
4
5
6
7
clearableTextInput(
  inputId,
  label = "",
  value = "",
  placeholder = "",
  style = "width: 100%;"
)

Arguments

inputId

ID

label

text label above

value

default value

placeholder

place holder text when value is empty

style

additional CSS styles you want to apply

Value

a shiny component

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if(interactive()){

    ui <- fluidPage(
        clearableTextInput("input1", "This is a input box", style = "width: 50%;"),
        verbatimTextOutput("out1")
    )

    server <- function(input, output, session) {
        output$out1 <- renderPrint(input$input1)
    }

    shinyApp(ui, server)
}

spsComps documentation built on Feb. 3, 2022, 1:07 a.m.