// 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 = 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" state playground_disabled = ctx.url.searchParams.get("pg_disabled") ?? "false" state playground_readonly = ctx.url.searchParams.get("pg_readonly") ?? "false" state playground_required = ctx.url.searchParams.get("pg_required") ?? "false" state playground_autoFocus = ctx.url.searchParams.get("pg_autoFocus") ?? "false" state playground_autoSubmit = ctx.url.searchParams.get("pg_autoSubmit") ?? "false" state playground_allowPaste = ctx.url.searchParams.get("pg_allowPaste") ?? "true" state playground_clearable = ctx.url.searchParams.get("pg_clearable") ?? "true" state playground_clearLabel = ctx.url.searchParams.get("pg_clearLabel") ?? "Clear code" state playground_separator = ctx.url.searchParams.get("pg_separator") ?? "" state playground_groupSize = 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" 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 eventsTheme 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"
/>
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 events

Events

Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.

@inputFires immediately as the component value changes.
@changeFires when the component value or selection changes.
@completeFires when the component's operation completes.
@pasteFires when the component emits the paste event.
@clearFires after the current value or collection is cleared.
@errorFires when the component encounters an error.
Event listener.js
const component = document.querySelector('[data-wrn-events]')

component.addEventListener('input', (event) => {
  console.log(event.detail)
})
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
} }