search ESC

Form Enhancements

Small JS-driven enhancers that bolt onto existing inputs: input masking, password strength, character counter, and clear button.

Input mask — phone

Use data-lp-mask to specify a pattern. # = digit, A = letter, * = any character.

Input mask — credit card
Input mask — date
Password strength

Wrap a password input in data-lp-component="password-strength" — a 4-segment bar and label appear automatically.

Character counter

Set maxlength on the input and add data-lp-component="char-counter" on the wrapper. The counter turns amber at 80% and red at the limit.

Clear button

Shows a small × button inside the input that clears the value when clicked.

Reference
EnhancerData attributeOptions
Input maskdata-lp-component="input-mask" + data-lp-mask="pattern"mask, placeholder
Password strengthdata-lp-component="password-strength"
Char counterdata-lp-component="char-counter"max, warnAt (default 0.8)
Input cleardata-lp-component="input-clear"