We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2da4f7f commit 5d8767aCopy full SHA for 5d8767a
src/content/reference/react/useId.md
@@ -67,7 +67,16 @@ import { useId } from 'react';
67
68
function PasswordField() {
69
const passwordHintId = useId();
70
- // ...
+ return (
71
+ <>
72
+ <input type="password" aria-describedby={passwordHintId} />
73
+ <p id={passwordHintId}>
74
+ The password should contain at least 18 characters
75
+ </p>
76
+ </>
77
+ );
78
+}
79
+
80
```
81
82
You can then pass the <CodeStep step={1}>generated ID</CodeStep> to different attributes:
0 commit comments