diff --git a/components/constants.js b/components/constants.js
index b5949f7..ac58eeb 100644
--- a/components/constants.js
+++ b/components/constants.js
@@ -100,4 +100,51 @@ export const INPUT_TYPES = [
"file"
];
+export const AUTOCOMPLETE_TYPES = [
+ "on",
+ "off",
+ "name",
+ "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-extension",
+ "impp",
+ "url",
+ "photo"
+];
+
export const INPUT_GROUP_ADDON_TYPES = ["prepend", "append"];
diff --git a/components/form-input/FormInput.js b/components/form-input/FormInput.js
index f6163f2..a873291 100644
--- a/components/form-input/FormInput.js
+++ b/components/form-input/FormInput.js
@@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
-import { INPUT_TYPES } from "../constants";
+import { INPUT_TYPES, AUTOCOMPLETE_TYPES } from "../constants";
/**
* The form input allows you to create various text style inputs such as `text`, `password`, `email`, `number`, `url`, `search` and more.
@@ -35,6 +35,7 @@ class FormInput extends React.Component {
const {
className,
plaintext,
+ autoComplete,
size,
invalid,
valid,
@@ -51,7 +52,7 @@ class FormInput extends React.Component {
invalid && "is-invalid"
);
- return ;
+ return ;
}
}
@@ -76,6 +77,10 @@ FormInput.propTypes = {
* Whether it is plaintext, or not.
*/
plaintext: PropTypes.bool,
+ /**
+ * Whether it is plaintext, or not.
+ */
+ autoComplete: PropTypes.oneOf(AUTOCOMPLETE_TYPES),
/**
* The input's size.
*/
diff --git a/package.json b/package.json
index 189f2bc..2e53471 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "shards-react",
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "A free, beautiful and modern React UI kit powered by Bootstrap 4 and the Shards UI kit.",
"main": "dist/shards-react.common.js",
"jsnext:main": "dist/shards-react.es.js",