Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ReactCodeInput = dynamic(import('react-code-input'));
| filterCharsIsWhitelist | bool | `filterChars` acts as blacklist if `false`, whitelist if `true`; `false` by default. |
| pattern | string | The pattern prop specifies a regular expression that the <input> element's value is checked against. |
| inputMode | string | The inputMode prop tells the browser on devices with dynamic keyboards which keyboard to display. |
| autoComplete | string | The autoComplete prop specifies whether or not an input field should have autocomplete enabled. |
| autoComplete | string | The autoComplete prop specifies whether or not an input field should have autocomplete enabled or what type of data the autocomplete should fill it with. |

## Compatible with
[`redux-form`](https://github.com/erikras/redux-form) from [erikras](https://github.com/erikras)
Expand Down
16 changes: 16 additions & 0 deletions src/ReactCodeInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ export type InputModeTypes =
'full-width-latin' | 'kana' | 'kana-name' | 'katakana' |
'numeric' | 'tel' | 'email' | 'url'

export type AutoCompleteTypes =
'off' | 'on' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' |
'family-name' | 'honorific-suffix' | 'nickname' | 'email' | 'username' |
'new-password' | 'current-password' | 'one-time-code' | 'organization-title' |
'organization' | 'street-address' | 'address-line1' | 'address-line2' |
'address-line3' | 'address-level1' | 'address-level2' | 'address-level3' |
'address-level4' | 'country' | 'country-name' | 'postal-code' | 'cc-name' |
'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' |
'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' |
'transaction-currency' | 'transaction-amount' | 'language' | 'bday' |
'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' |
'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'impp' |
'url' | 'photo'

export interface ReactCodeInputProps {

// Type of input accept
Expand Down Expand Up @@ -70,6 +84,8 @@ export interface ReactCodeInputProps {
// The inputMode prop tells the browser on devices with dynamic keyboards which keyboard to display.
inputMode: InputModeTypes

// The autoComplete prop specifies whether or not an input field should have autocomplete enabled or what type of data the autocomplete should fill it with.
autoComplete?: AutoCompleteTypes
}

declare class ReactCodeInput extends Component<ReactCodeInputProps, any> {
Expand Down