https://github.com/pittica/gatsby-plugin-recaptcha
ReCaptcha component for GatsbyJS.
https://github.com/pittica/gatsby-plugin-recaptcha
gatsby gatsby-plugin gatsbyjs pittica recaptcha recaptcha-v3 recaptcha-verification security
Last synced: 9 months ago
JSON representation
ReCaptcha component for GatsbyJS.
- Host: GitHub
- URL: https://github.com/pittica/gatsby-plugin-recaptcha
- Owner: pittica
- License: mit
- Created: 2020-05-24T17:33:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T18:45:15.000Z (over 4 years ago)
- Last Synced: 2025-03-08T01:02:03.072Z (over 1 year ago)
- Topics: gatsby, gatsby-plugin, gatsbyjs, pittica, recaptcha, recaptcha-v3, recaptcha-verification, security
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@pittica/gatsby-plugin-recaptcha
- Size: 671 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pittica/gatsby-plugin-recaptcha




## Description
[ReCaptcha](https://www.google.com/recaptcha/) component for [GatsbyJS](https://www.gatsbyjs.org/).
This plugin has been developed using [GatsbyJS](https://www.gatsbyjs.org/) tutorials.
## Install
[](https://www.npmjs.com/package/@pittica/gatsby-plugin-recaptcha)
[](https://www.npmjs.com/package/@pittica/gatsby-plugin-recaptcha)
```shell
npm install @pittica/gatsby-plugin-recaptcha
```
## Usage
Import the component classes.
```javascript
import ReCaptcha from "@pittica/gatsby-plugin-recaptcha"
```
Use the component in React functions.
```javascript
import React, { useState } from "react"
export default function ContactPage() {
const [submitted, setSubmitted] = useState(false)
const submit = (token) => {}
return (
submit(token)}
submitted={submitted}
/>
setSubmitted(true)}>Submit
)
}
```
### Attributes
The components has some attributes.
#### siteKey
* Type: **string**
* Required: **yes**
ReCaptcha public key.
#### action
* Type: **string**
* Required: **yes**
* Default value: **homepage**
ReCaptcha action. Common values are _homepage_ or _login_.
#### id
* Type: **string**
* Required: **no**
HTML ID for multiple ReCaptcha elements.
#### badge
* Type: **string**
* Required: **no**
* Values: **bottomright**, **bottomleft**, **inline**
* Default value: **inline**
Badge position and aspect.
#### size
* Type: **string**
* Required: **no**
* Values: **compact**, **normal**, **invisible**
* Default value: **invisible**
Badge size.
#### callback
* Type: **function**
* Required: **no**
Validation callback.
#### theme
* Type: **string**
* Required: **no**
* Values: **light**, **dark**
* Default value: **light**
## Copyright
(c) 2020-2021, [Pittica S.r.l.](https://pittica.com).