chakraPinInput: Pin input

Description Usage Arguments Value Examples

View source: R/chakraPinInput.R

Description

Create a pin input widget.

Usage

1
2
3
4
5
6
7
8
9
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

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

shinyChakraUI documentation built on Jan. 5, 2022, 5:08 p.m.