You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# react-input-auto-format
1
+
If you've ever tried to make an input field that automatically formats as you type, you'll know it's actually a pain in the 🍑. That's right, a pain in the peach.
2
2
3
-
A super simple input component that formats as you type.
3
+
With this simple React component, you can create your own pattern using the `format` prop, start typing and witness the magic ✨
4
4
5
5
```HTML
6
6
<Inputformat="## - ## - ##">
@@ -22,13 +22,12 @@ Have fun:
22
22
importInputfrom'react-input-auto-format';
23
23
24
24
functionFoo () {
25
-
return<Input format="## - ## - ##"/>;
25
+
return<Input format="## / ##"/>;
26
26
}
27
27
```
28
28
29
-
The `format` prop accepts a pattern. The `#` character represents any number or letter, and you can put whatever else you like in there.
29
+
The `format` prop accepts any pattern - it's entirely up to you. Here's some inspiration:
0 commit comments