This a ClojureScript implementation of ng9-password-strength-bar.
git clone https://github.com/rnadler/reagent-password-strength-bar.git
cd reagent-password-strength-bar
lein figwheel
lein doo node test once
[reagent-password-strength-bar.core :refer [password-strength-bar]]
(defn password-form
"The password input element and strength bar"
[password]
(fn []
[:div
[:label "Password"]
[input-element password]
[password-strength-bar password
{:bar-label "PW Strength:"
:strength-labels ["(Yuk)" "(Aweful)" "(OK)" "(Above Average)" "(Marvolous!)"]
:colors ["#DD2C00" "#FF6D00" "#FFD600" "#AEEA00" "#00C853"]
:thresholds [90 75 45 25]
:base-color "#BBB"
:bar-width "325px" }
]]))
[password-strength-bar password options]
colors[0]
..., the highest picks colors[4]
.["#F00" "#F90" "#FF0" "#9F0" "#0F0"]
:base-color "#BBB"
:strength-labels ["(Useless)" "(Weak)" "(Normal)" "(Strong)" "(Great!)"]
[90 70 40 20]
"350px"
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close