lara-light-indigo

Password

Password displays strength indicator for password fields.

Basic
Password Meter
Show Password
Templating
Import via Module

import { Password } from 'primereact/password';
 
Import via CDN

<script src="https://unpkg.com/primereact/core/core.min.js"></script>
<script src="https://unpkg.com/primereact/password/password.min.js"></script>
 
Getting Started

Password is used as a controlled component with value and onChange properties.


<Password value={value} onChange={(e) => setValue(e.target.value)} />
 
Properties

Password accepts all valid properties of an input element in addition the the custom properties below.

NameTypeDefaultDescription
idstringnullUnique identifier of the element.
inputIdstringnullIdentifier of the input element.
promptLabelstringPlease enter a passwordText to prompt password entry.
weakLabelstringWeakText for a weak password.
mediumLabelstringMediumText for a medium password.
strongLabelstringStrongText for a strong password.
mediumRegexstring^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,}).Regex for a medium level password.
strongRegexstring^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})Regex for a strong level password.
feedbackbooleantrueWhether to show the strength indicator or not.
toggleMaskbooleanfalseWhether to show an icon to display the password as plain text.
appendToDOM element | stringdocument.bodyDOM element instance where the overlay panel should be mounted. Valid values are any DOM Element and 'self'. The self value is used to render a component where it is located.
headeranynullTemplate of panel header if "feedback" is enabled.
contentanynullTemplate of panel content if "feedback" is enabled.
footeranynullTemplate of panel footer if "feedback" is enabled.
iconanynullTemplate of mask icon if "toggleMask" is enabled.
tooltipanynullContent of the tooltip.
tooltipOptionsobjectnullConfiguration of the tooltip, refer to the tooltip documentation for more information.
styleobjectnullInline style of the element.
classNamestringnullStyle class of the element.
inputStyleanynullInline style of the input field.
inputClassNamestringnullStyle class of the input field.
panelClassNamestringnullStyle class of the overlay panel element.
panelStylestringnullInline style of the overlay panel element.
transitionOptionsobjectnullThe properties of CSSTransition can be customized, except for "nodeRef" and "in" properties.
Events
NameParametersDescription
onShow-Callback to invoke when overlay becomes visible.
onHide-Callback to invoke when overlay becomes hidden.
Styling

Following is the list of structural style classes, for theming classes visit theming page.

NameElement
p-passwordContainer element
p-password-inputInput Element
p-password-panelContainer of password panel
p-password-meterMeter element of password strength
p-password-infoText to display strength
Dependencies

None.

Component Scale

Input Style

Ripple Effect

Free Themes

Built-in component themes created by the PrimeReact Theme Designer.

Bootstrap
Blue
Purple
Blue
Purple
Material Design
Indigo
Deep Purple
Indigo
Deep Purple
Material Design Compact
Indigo
Deep Purple
Indigo
Deep Purple
Tailwind
Tailwind Light
Fluent UI
Blue
PrimeOne Design - 2022 NEW
Lara Indigo
Lara Blue
Lara Purple
Lara Teal
Lara Indigo
Lara Blue
Lara Purple
Lara Teal
PrimeOne Design - 2021
Saga Blue
Saga Green
Saga Orange
Saga Purple
Vela Blue
Vela Green
Vela Orange
Vela Purple
Arya Blue
Arya Green
Arya Orange
Arya Purple
Premium Themes

Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.

Soho Light
Soho Dark
Viva Light
Viva Dark
Mira
Nano

Legacy Free Themes

Nova
Nova Alt
Nova Accent
Luna Blue
Luna Green
Luna Amber
Luna Pink
Rhea

Premium Create-React-App Templates

Beautifully crafted premium create-react-app application templates by the PrimeTek design team.

Sakai
Atlantis
Freya
Ultima
Diamond
Sapphire
Serenity
Babylon
Avalon
Apollo
Roma