Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danielyefet authored Oct 5, 2021
1 parent 14cd9f2 commit 3d92877
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# react-input-auto-format
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.

A super simple input component that formats as you type.
With this simple React component, you can create your own pattern using the `format` prop, start typing and witness the magic ✨

```HTML
<Input format="## - ## - ##">
Expand All @@ -22,13 +22,12 @@ Have fun:
import Input from 'react-input-auto-format';

function Foo () {
return <Input format="## - ## - ##" />;
return <Input format="## / ##" />;
}
```

The `format` prop accepts a pattern. The `#` character represents any number or letter, and you can put whatever else you like in there.
The `format` prop accepts any pattern - it's entirely up to you. Here's some inspiration:

### Examples:

| Style | Pattern | Result |
| ------------ | ------------------ | ------------ |
Expand Down

0 comments on commit 3d92877

Please sign in to comment.