There are a few bits to this to achieve your outcome using the libraries and components, so I'll try to explain as best I can.
React-Nice-Input-Password accepts a prop to provide a custom class name for each of the states and specifically for success you can use <NiceInputPassword successClassName="custom-success"
. With that added you are now able to style the bullet points and by using the same CSS selectors with your own custom-success
name you can set the final style, .input-password__description li.custom-success:before
. Note you may be able to provide a less specific selector but I didn't investigate this.
Now for the styles comes the interesting part. Set background-color: transparent
so you don't see the current style applied, then add a background image with a Data URL set to the value of the image you want. In this case I used the publicly available SVG code for CheckCircle from MUI Icons and set the width and height of the SVG to 10 each, then set the fill
of the <path>
to a blue color, fill="%232196F3"
where %23
is #
encoded for the HEX value.
.input-password__description li.custom-success:before {
background-color: transparent;
background-image: url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24"><path fill="%232196F3" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></svg>');
}
If you don't want to be stuck with just the blue color then there are two options to modify:
- edit the
fill
of the <path>
tag to the design color value, remembering to prefix %23
instead of #
for HEX values
- or, use the
filter
CSS property to adjust the color, e.g. first bullet point only:
.input-password__description li.custom-success:first-of-type:before {
filter: hue-rotate(45deg);
}
Lastly, be sure to import the CSS somewhere in your app as appropriate, import './custom.css';
Here is a fork of your work in it's own sandbox showing what I have described. The first success bullet point will be a purple hue and all others will be blue.

Supporting links: