Description Usage Arguments Value Examples
View source: R/chakraPinInput.R
Create a pin input widget.
1 2 3 4 5 6 7 8 9 | chakraPinInput(
id,
label = NULL,
nfields,
type = "alphanumeric",
size = "md",
mask = FALSE,
defaultValue = ""
)
|
id |
input id |
label |
optional label |
nfields |
number of fields |
type |
either |
size |
one of |
mask |
Boolean, whether to mask the user inputs (like a password input) |
defaultValue |
default value, can be partial |
A widget to use in chakraComponent
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
chakraPinInput(
"pininput", label = tags$h2("Enter password"),
nfields = 3, mask = TRUE
)
)
)
server <- function(input, output, session){
observe({
print(input[["pininput"]])
})
}
if(interactive()){
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.