StarForge
Form

Input

Customizable input components with password visibility toggle and form integration

Note

All presented components are responsive and compatible with Tailwind CSS. Make sure Tailwind is configured in your project to use them.

Password Input

Props Reference

PropTypeDescriptionDefault
classNamestringAdditional CSS classes for stylingundefined
disabledbooleanDisables the input fieldundefined
placeholderstringPlaceholder text for the inputundefined
valuestringControlled value of the inputundefined
onChange(e: ChangeEvent) => voidCallback fired when value changesundefined

Password Input with password force

Props Reference

PropTypeDescriptionDefault
minLengthnumberMinimum password lengthundefined
maxLengthnumberMaximum password lengthundefined
requireUppercasebooleanRequire at least one uppercase letterfalse
requireLowercasebooleanRequire at least one lowercase letterfalse
requireNumbersbooleanRequire at least one numberfalse
requireSpecialCharsbooleanRequire at least one special characterfalse
showRulesbooleanDisplay password validation rulesfalse
showStrengthbooleanDisplay password strength indicatorfalse
customRulesPasswordRule[]Custom validation rules[]
onPasswordChange(password: string, isValid: boolean, rules: PasswordRule[]) => voidCallback fired when password changesundefined

PasswordRule Interface:

interface PasswordRule {
  id: string;
  label: string;
  validator: (password: string) => boolean;
}

Usage:

  • Use password-input for basic password input with visibility toggle
  • Use password-input-register for advanced validation with strength indicator

On this page

Built with ❤️ using React, Next.js, TypeScript, and Tailwind CSS