chakraPinInput {shinyChakraUI}R Documentation

Pin input

Description

Create a pin input widget.

Usage

chakraPinInput(
  id,
  label = NULL,
  nfields,
  type = "alphanumeric",
  size = "md",
  mask = FALSE,
  defaultValue = ""
)

Arguments

id

input id

label

optional label

nfields

number of fields

type

either "alphanumeric" or "number"

size

one of "xs", "sm", "md", "lg"

mask

Boolean, whether to mask the user inputs (like a password input)

defaultValue

default value, can be partial

Value

A widget to use in chakraComponent.

Examples

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)
}

[Package shinyChakraUI version 1.1.1 Index]