🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@sentinel-password/react-components

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentinel-password/react-components - npm Package Compare versions

Comparing version
0.4.6
to
0.4.7
+3
-3
package.json
{
"name": "@sentinel-password/react-components",
"version": "0.4.6",
"version": "0.4.7",
"type": "module",

@@ -59,4 +59,4 @@ "description": "Accessible, headless React components for @sentinel-password - password validation UI made simple",

"dependencies": {
"@sentinel-password/core": "0.4.4",
"@sentinel-password/react": "0.5.6"
"@sentinel-password/core": "0.4.5",
"@sentinel-password/react": "0.5.7"
},

@@ -63,0 +63,0 @@ "devDependencies": {

# @sentinel-password/react-components
[![npm version](https://img.shields.io/npm/v/@sentinel-password/react-components.svg)](https://www.npmjs.com/package/@sentinel-password/react-components)
[![TypeScript](https://img.shields.io/badge/TypeScript-6.0+-blue.svg)](https://www.typescriptlang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Accessible, headless React components for password validation built on top of `@sentinel-password/core` and `@sentinel-password/react`.
**[Documentation](https://akankov.github.io/sentinel-password/)** | **[Interactive Playground](https://akankov.github.io/sentinel-password/playground/)** | **[API Reference](https://akankov.github.io/sentinel-password/api/react-components.html)**
## Features

@@ -13,2 +19,3 @@

- **Flexible** - Controlled and uncontrolled modes
- **React 18 & 19** - Supports both React 18 and 19

@@ -36,3 +43,4 @@ ## Installation

onValidationChange={(result) => {
console.log('Valid:', result.isValid)
console.log('Valid:', result.valid)
console.log('Strength:', result.strength)
}}

@@ -56,2 +64,7 @@ />

onValidationChange={(result) => console.log(result)}
onChange={(value) => console.log(value)}
showPassword={false}
onShowPasswordChange={(show) => console.log(show)}
validateOnMount={false}
debounceMs={300}
/>

@@ -62,7 +75,15 @@ ```

- `label` - Accessible label for the input
- `description` - Optional description text
- `onValidationChange` - Callback fired when validation state changes
- Standard HTML input props supported
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `label` | `string` | **required** | Accessible label for the input |
| `description` | `string` | - | Optional description text |
| `onValidationChange` | `(result: ValidationResult) => void` | - | Callback when validation state changes |
| `onChange` | `(value: string) => void` | - | Callback when input value changes |
| `showPassword` | `boolean` | `false` | Whether to show/hide the password |
| `onShowPasswordChange` | `(show: boolean) => void` | - | Callback when show/hide toggle changes |
| `validateOnMount` | `boolean` | `false` | Validate immediately on mount |
| `debounceMs` | `number` | `300` | Debounce delay in ms |
All standard HTML input props are also supported (except `type` and `onChange`).
## Accessibility

@@ -78,4 +99,9 @@

## Related Packages
- [`@sentinel-password/core`](https://www.npmjs.com/package/@sentinel-password/core) - Core validation engine (zero dependencies)
- [`@sentinel-password/react`](https://www.npmjs.com/package/@sentinel-password/react) - React hook for password validation
## License
MIT © Aleksei Kankov