+
+
setPasswordOptions((o) => ({ ...o, length: Number(e.target.value) }))}
+ />
+
+ {(
+ [
+ ["uppercase", "A–Z"],
+ ["lowercase", "a–z"],
+ ["numbers", "0–9"],
+ ["symbols", "!@#$…"],
+ ] as const
+ ).map(([key, label]) => (
+
+
+
+ ))}
+
+
+ {noCharsetSelected &&
Pick at least one character type.
}
+
+
+ {password && (
+ <>
+
+
+ >
+ )}
+
+ {password && (
+
+ {strength.label} (~{entropy} bits of entropy)
+
+ )}
+