// Generated by scripts/generate-showcase.mjs. Do not edit directly. page PinInputDetail { layout = "showcase" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Default four-digit PIN" state playground_name = ctx.url.searchParams.get("pg_name") ?? "pin-input-1" state playground_value = ctx.url.searchParams.get("pg_value") ?? "" state playground_length = Number(ctx.url.searchParams.get("pg_length") ?? "4") state playground_pattern = ctx.url.searchParams.get("pg_pattern") ?? "[0-9]" state playground_type = ctx.url.searchParams.get("pg_type") ?? "text" state playground_inputMode = ctx.url.searchParams.get("pg_inputMode") ?? "numeric" state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "○" state playground_autocomplete = ctx.url.searchParams.get("pg_autocomplete") ?? "one-time-code" state playground_masked = (ctx.url.searchParams.get("pg_masked") ?? "false") === "true" state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true" state playground_readonly = (ctx.url.searchParams.get("pg_readonly") ?? "false") === "true" state playground_required = (ctx.url.searchParams.get("pg_required") ?? "false") === "true" state playground_autoFocus = (ctx.url.searchParams.get("pg_autoFocus") ?? "false") === "true" state playground_autoSubmit = (ctx.url.searchParams.get("pg_autoSubmit") ?? "false") === "true" state playground_allowPaste = (ctx.url.searchParams.get("pg_allowPaste") ?? "true") === "true" state playground_clearable = (ctx.url.searchParams.get("pg_clearable") ?? "true") === "true" state playground_clearLabel = ctx.url.searchParams.get("pg_clearLabel") ?? "Clear code" state playground_separator = ctx.url.searchParams.get("pg_separator") ?? "" state playground_groupSize = Number(ctx.url.searchParams.get("pg_groupSize") ?? "0") state playground_helpText = ctx.url.searchParams.get("pg_helpText") ?? "" state playground_invalid = (ctx.url.searchParams.get("pg_invalid") ?? "false") === "true" state playground_validationMessage = ctx.url.searchParams.get("pg_validationMessage") ?? "" state playground_class = ctx.url.searchParams.get("pg_class") ?? "" seo { title = "Pin Input" description = "Secure multi-cell PIN and verification-code input with regex and paste support." } view {
Advanced Forms component

Pin Input

Secure multi-cell PIN and verification-code input with regex and paste support.

26 props0 slots6 outputsTheme readyResponsive
Interactive playground

Configure Pin Input

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<PinInput
  label="Default four-digit PIN"
  name="pin-input-1"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props26 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Entry behavior

Default four-digit PIN

Live default four-digit pin example with keyboard navigation, filtering, and copyable component code.

01
Live preview
Component usage.wrn
<PinInput
  label="Default four-digit PIN"
  name="pin-input-1"
/>
Entry behavior

Different lengths

Live different lengths example with keyboard navigation, filtering, and copyable component code.

02
Live preview
Component usage.wrn
<PinInput
  label="3-digit code"
  name="pinLength3"
  length="3"
/>

<PinInput
  label="5-digit code"
  name="pinLength5"
  length="5"
/>

<PinInput
  label="7-digit code"
  name="pinLength7"
  length="7"
/>
Entry behavior

Pre-filled verification code

Live pre-filled verification code example with keyboard navigation, filtering, and copyable component code.

03
Live preview
Component usage.wrn
<PinInput
  label="Pre-filled verification code"
  name="pin-input-3"
  value="482915"
  length="6"
/>
Entry behavior

Masked security PIN

Live masked security pin example with keyboard navigation, filtering, and copyable component code.

04
Live preview
Component usage.wrn
<PinInput
  label="Masked security PIN"
  name="pin-input-4"
  masked="true"
/>
Entry behavior

Alphanumeric regex

Live alphanumeric regex example with keyboard navigation, filtering, and copyable component code.

05
Live preview
Component usage.wrn
<PinInput
  label="Alphanumeric regex"
  name="pin-input-5"
  length="6"
  pattern="[A-Z0-9]"
  inputMode="text"
/>
Entry behavior

Grouped code with separator

Live grouped code with separator example with keyboard navigation, filtering, and copyable component code.

06
Live preview
Component usage.wrn
<PinInput
  label="Grouped code with separator"
  name="pin-input-6"
  length="6"
  separator="–"
  groupSize="3"
/>
Entry behavior

Paste from clipboard

Live paste from clipboard example with keyboard navigation, filtering, and copyable component code.

07
Live preview
Component usage.wrn
<PinInput
  label="Paste from clipboard"
  name="pin-input-7"
  length="6"
/>
States & design

Disabled PIN input

Live disabled pin input example with keyboard navigation, filtering, and copyable component code.

08
Live preview
Component usage.wrn
<PinInput
  label="Disabled PIN input"
  name="pin-input-8"
  length="6"
  disabled="true"
/>
States & design

Read-only code

Live read-only code example with keyboard navigation, filtering, and copyable component code.

09
Live preview
Component usage.wrn
<PinInput
  label="Read-only code"
  name="pin-input-9"
  value="739204"
  length="6"
  readonly="true"
/>
States & design

Validation state

Live validation state example with keyboard navigation, filtering, and copyable component code.

010
Live preview
Component usage.wrn
<PinInput
  label="Validation state"
  name="pin-input-10"
  length="6"
  required="true"
/>
States & design

Supporting help text

Live supporting help text example with keyboard navigation, filtering, and copyable component code.

011
Live preview
Component usage.wrn
<PinInput
  label="Supporting help text"
  name="pin-input-11"
  length="6"
  helpText="Enter the code sent to your registered email address."
/>
States & design

Large PIN cells

Live large pin cells example with keyboard navigation, filtering, and copyable component code.

012
Live preview
Component usage.wrn
<PinInput
  size="lg"
  label="Large PIN cells"
  name="pin-input-12"
  length="6"
/>
States & design

Custom placeholder

Live custom placeholder example with keyboard navigation, filtering, and copyable component code.

013
Live preview
Component usage.wrn
<PinInput
  label="Custom placeholder"
  name="pin-input-13"
  length="6"
  placeholder="•"
/>
Automation

Automatic form submission

Live automatic form submission example with keyboard navigation, filtering, and copyable component code.

014
Live preview
Component usage.wrn
<PinInput
  label="Automatic form submission"
  name="pin-input-14"
  length="6"
  autoSubmit="true"
/>
Automation

Completion events

Live completion events example with keyboard navigation, filtering, and copyable component code.

015
Live preview
Component usage.wrn
<PinInput
  label="Completion events"
  name="pin-input-15"
  length="6"
/>
Automation

JavaScript methods

Live javascript methods example with keyboard navigation, filtering, and copyable component code.

016
Live preview
Component usage.wrn
<PinInput
  label="JavaScript methods"
  name="pin-input-16"
  length="6"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@completeFires when the component emits the complete event.
@pasteFires after clipboard content is processed.
@clearFires after the current value or selection is cleared.
@errorFires when the component cannot complete an operation.
Declarative handlers.wrn
<PinInput
  @input='console.log(payload)'
  @change='console.log(payload)'
  @complete='console.log(payload)'
  @paste='console.log(payload)'
  @clear='console.log(payload)'
  @error='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"PinInput\"], [data-component=\"PinInput\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "complete", (payload) => {
  console.log("complete", payload)
})

if (component) registerOutputHandler(component, "paste", (payload) => {
  console.log("paste", payload)
})

if (component) registerOutputHandler(component, "clear", (payload) => {
  console.log("clear", payload)
})

if (component) registerOutputHandler(component, "error", (payload) => {
  console.log("error", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
labelstring"Verification code"No
namestring"pin"No
valuestring""No
lengthnumber4No
patternstring"[0-9]"No
typestring"text"No
inputModestring"numeric"No
placeholderstring"○"No
autocompletestring"one-time-code"No
maskedbooleanfalseNo
disabledbooleanfalseNo
readonlybooleanfalseNo
requiredbooleanfalseNo
autoFocusbooleanfalseNo
autoSubmitbooleanfalseNo
allowPastebooleantrueNo
clearablebooleantrueNo
clearLabelstring"Clear code"No
separatorstring""No
groupSizenumber0No
helpTextstring""No
invalidbooleanfalseNo
validationMessagestring""No
classstring""No
} }