Skip to content

Commit a5bf6e6

Browse files
committed
docs: add caretColor prop and fix blur method
- fix typo in blur method name (was "blue") - update README with new prop and corrected method name
1 parent 3d1b556 commit a5bf6e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export function MyComponent() {
4545
| ------------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
4646
| `maxLength` | number - Required | The max number of digits to OTP code. |
4747
| `onFilled` | (code: string) => void - Optional | The callback function is executed when the OTP input has been entirely completed, and it receives the OTP code as a parameter. |
48+
| `caretColor` | string - Optional | The color of the blinking caret shown in the focused input slot. Accepts any valid color string (e.g., hex, rgb, color names). |
4849

4950
---
5051

@@ -76,7 +77,7 @@ The `TextInputOTP` component exposes these functions with `ref`:
7677
| ---------- | ----------------------- | -------------------------------------------------------------------------- |
7778
| `clear` | () => void | Resets the OTP input by clearing all entered values. |
7879
| `focus` | () => void | Activates the OTP input field, allowing the user to type. |
79-
| `blue` | () => void | Deactivates the OTP input field, removing focus. |
80+
| `blur` | () => void | Deactivates the OTP input field, removing focus. |
8081
| `setValue` | (value: string) => void | Sets a custom value to the OTP input fields, overriding any current input. |
8182

8283
## Examples

0 commit comments

Comments
 (0)