Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T18:45:15.000Z (about 3 years ago)
- Last Synced: 2024-10-20T22:02:54.254Z (3 months 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: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pittica/gatsby-plugin-recaptcha
![License](https://img.shields.io/github/license/pittica/gatsby-plugin-recaptcha)
![Version](https://img.shields.io/github/package-json/v/pittica/gatsby-plugin-recaptcha)
![Release](https://img.shields.io/github/v/release/pittica/gatsby-plugin-recaptcha)
![React version](https://img.shields.io/github/package-json/dependency-version/pittica/gatsby-plugin-recaptcha/react)## 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
[![npm](https://img.shields.io/npm/v/@pittica/gatsby-plugin-recaptcha)](https://www.npmjs.com/package/@pittica/gatsby-plugin-recaptcha)
[![npm](https://img.shields.io/npm/dm/@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
)
}
```
### AttributesThe 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).