Scan your whole stack
Are you using @xsolla/xui-input-pin?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.234.0
@xsolla/xui-input-pin was last scanned on 23 Nov 2026 at version 0.234.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.234.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.233.0 | 20 Nov 2026 | No rules fired |
| 0.232.1 | 20 Nov 2026 | No rules fired |
| 0.232.0 | 18 Nov 2026 | Not shown |
| 0.230.0 | 12 Nov 2026 | Not shown |
Findings for v0.234.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.234.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A cross-platform React PIN/OTP input component with individual cells for each digit. Features auto-advance between cells, paste support, and completion callbacks.
A specialised input for entering a short numeric or alphanumeric code — typically a PIN, OTP (one-time password), or verification code. Renders as a horizontal row of individual character cells (.pin-item), one per expected digit. Each cell has independent state, and the component supports masking, placeholder dots, and a visibility toggle.
Auto-advance — after the user types a digit into the active cell, focus automatically moves to the next empty cell. The user should never need to manually click individual cells.
Auto-submit — when the last cell receives a value and all cells are filled (State=Filled), submit the form automatically without requiring the user to press Enter or a Submit button. This is the expected UX for OTP and PIN flows.
Backspace — pressing Backspace clears the value in the current active cell and moves focus back to the previous cell. If the active cell is already empty, Backspace moves focus back and clears the previous cell.
Paste — when the user pastes a string of the correct length, distribute the characters across all cells immediately and submit if auto-submit is enabled. Trim whitespace and hyphens from pasted values (e.g. 1234 5678 → 12345678).
Numeric-only enforcement — for numeric PINs/OTPs, reject non-numeric characters silently (do not show an error for a single wrong keypress — just ignore it). Use inputmode="numeric" to trigger a numeric keyboard on mobile.
Error state — switch to State=Error when the code fails server-side validation (wrong OTP, expired code, incorrect PIN). All cells switch to error appearance simultaneously. Show a specific error message below the component. Clear the error state when the user starts typing again and reset all cells.
OTP code expiry — for time-based OTPs, show a countdown timer or "Resend code" link near the component. If the code expires mid-entry, show State=Error with the message "Code has expired. Request a new one."
Resend flow — after an error due to expiry or incorrect code, provide a "Resend code" action that clears all cells, resets to State=Default, and moves focus to the first cell.
Disabled state — use State=Disable when the PIN entry is temporarily locked (e.g. too many failed attempts). Show a reason nearby (e.g. "Too many attempts. Try again in 30 seconds.").
Mobile keyboard — use inputmode="numeric" and pattern="[0-9]"* on the underlying input. Consider rendering a single hidden text input that captures keystrokes and distributes characters to the visual cells, rather than using multiple separate elements.
Label — always provide a visible label above the component: "Enter PIN", "Verification code", "Enter the 6-digit code sent to +7 (900) •••• 1234". Include the code length and delivery channel in the label for OTP flows. Error messages — be specific and actionable:
The underlying input mechanism must be accessible via keyboard. The preferred implementation is a single visually-hidden element that captures keyboard input and distributes it to the visual cells — this avoids focus-management complexity across multiple inputs.
If multiple elements are used (one per cell), each must have aria-label identifying the position: e.g. aria-label="Digit 1 of 6".
The component container must have aria-label describing the whole field: e.g. aria-label="6-digit verification code".
When State=Error, the error message must be in an aria-live="polite" region and associated via aria-describedby so screen readers announce it.
The visual dot masking is cosmetic — the underlying must still use type="password" (or inputmode="numeric" on a text input with custom masking) to ensure the value is treated as sensitive.
Auto-advance (moving focus to the next cell) must also move focus for keyboard users, not just update visual state.
When the last cell is filled and the form is auto-submitted, announce the submission to screen readers via aria-live="assertive" or by focussing a confirmation message.
Ensure a minimum touch target of 44 × 44 px on mobile. For XS [32] and S [40] sizes, add layout padding to meet this requirement.
npm install @xsolla/xui-input-pin
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function BasicPinInput() {
const handleComplete = ({ value, isComplete }) => {
if (isComplete) {
console.log("PIN entered:", value);
}
};
return <InputPin codeLength={4} onComplete={handleComplete} />;
}
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function SixDigitPin() {
return (
<InputPin
codeLength={6}
label="Enter verification code"
onComplete={({ value }) => console.log("Code:", value)}
/>
);
}
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function ControlledPinInput() {
const [pin, setPin] = React.useState("");
return (
<div>
<InputPin
value={pin}
codeLength={4}
onChange={({ value }) => setPin(value)}
/>
<p>Current value: {pin}</p>
</div>
);
}
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function SecurePinInput() {
return (
<InputPin codeLength={4} secureTextEntry={true} label="Enter your PIN" />
);
}
import { InputPin } from "@xsolla/xui-input-pin";
<InputPin
value={pinValue} // Controlled value
onChange={handleChange} // Change handler with {value, isComplete}
onComplete={handleComplete} // Called when all digits entered
codeLength={4} // Number of digits
size="md" // Size variant
label="Label" // Label above input
secureTextEntry={false} // Hide entered digits
showPlaceholderDots={true} // Show dot placeholders
flexibleWidth={false} // Expand cells to fill width
disabled={false} // Disabled state
error={false} // Error state
errorMessage="Error" // Error message text
/>;
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function FullWidthPin() {
return (
<div style={{ width: 300 }}>
<InputPin codeLength={6} flexibleWidth={true} label="Verification Code" />
</div>
);
}
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function ErrorPinInput() {
return (
<InputPin
codeLength={4}
error={true}
errorMessage="Invalid PIN. Please try again."
label="Enter PIN"
/>
);
}
import * as React from "react";
import { InputPin } from "@xsolla/xui-input-pin";
export default function PinInputSizes() {
return (
<div style={{ display: "flex", flexDirection: "column", gap: 24 }}>
<InputPin size="xs" codeLength={4} />
<InputPin size="sm" codeLength={4} />
<InputPin size="md" codeLength={4} />
<InputPin size="lg" codeLength={4} />
<InputPin size="xl" codeLength={4} />
</div>
);
}
InputPin Props:
| Prop | Type | Default | Description |
|---|---|---|---|
testID |
string |
— | Test ID for testing frameworks. On web this renders as data-testid; on React Native it renders as testID. |
| value | string |
"" |
Current PIN value. |
| onChange | (props: OnInputPinCompleteProps) => void |
- | Called on every change. |
| onComplete | (props: OnInputPinCompleteProps) => void |
- | Called when all digits entered. |
| codeLength | number |
4 |
Number of PIN digits. |
| size | "xl" \| "lg" \| "md" \| "sm" \| "xs" |
"md" |
Component size. |
| label | string |
- | Label above input. |
| secureTextEntry | boolean |
false |
Hide entered digits. |
| showPlaceholderDots | boolean |
true |
Show dot placeholders. |
| flexibleWidth | boolean |
false |
Expand cells to fill container. |
| disabled | boolean |
false |
Disabled state. |
| error | boolean |
false |
Error state. |
| errorMessage | string |
- | Error message text. |
| testID | string |
- | Test identifier. |
| aria-label | string |
- | Accessible label for screen readers. |
OnInputPinCompleteProps:
interface OnInputPinCompleteProps {
isComplete: boolean; // Whether all digits are filled
value: string; // Current PIN value
}
| Key | Action |
|---|---|
| 0-9, A-Z | Enter character and advance |
| Backspace | Clear current cell and move back |
| Arrow Left | Move to previous cell |
| Arrow Right | Move to next cell |
| Ctrl/Cmd + V | Paste and auto-fill cells |
autoComplete="one-time-code", and tapping the code that iOS QuickType or Android Gboard suggests from an SMS or email fills all cells and fires onComplete. A full-length code always fills from the first cell, whichever cell was focused.inputMode="numeric" for mobile keyboardsaria-label indicating digit positionrole="group" on container with aria-labelledbyaria-invalid when in error statearia-describedbyFind threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.