-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom style for bars #26
Comments
Thank you. I'll consider it! |
For the moment, i use the following to style the bars: component: <PasswordStrengthBar
password={password}
className="passwordStrengthBar"
/> stylesheet: .passwordStrengthBar > div > div {
height: 0.5rem !important;
// add whatever style you need
// but the word "!important" is important to overwrite library's inline styles
}
// you may also use :nth-child pseudoselector to target specific bars
// https://css-tricks.com/almanac/selectors/n/nth-child/
// e.g. to change the space between bars:
.passwordStrengthBar > div > div:nth-child(even) {
width: 0.5rem !important;
} Hope this helps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using the library I figured out It's not possible to style the bars and the only prop it has is to change the colors.
https://github.com/lannex/react-password-strength-bar/blob/master/lib/Item.tsx#L9
It would be nice to add that feature. I can raise a PR for that if it's possible.
The text was updated successfully, but these errors were encountered: