Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/drozdzynski/vue-grecaptcha

Google reCAPTCHA for VueJS
https://github.com/drozdzynski/vue-grecaptcha

javascript vuejs2

Last synced: 13 days ago
JSON representation

Google reCAPTCHA for VueJS

Awesome Lists containing this project

README

        

[![TravisCI](https://travis-ci.org/drozdzynski/vue-grecaptcha.svg?branch=master)](https://travis-ci.org/drozdzynski/vue-grecaptcha)
[![npm version](https://img.shields.io/npm/v/vue-grecaptcha.svg?style=flat)](https://www.npmjs.com/package/vue-grecaptcha)
[![npm downloads](https://img.shields.io/npm/dm/vue-grecaptcha.svg?style=flat)](https://www.npmjs.com/package/vue-grecaptcha)
[![Twitter](https://img.shields.io/twitter/follow/drozdzynskime.svg?style=social&label=Follow)](https://twitter.com/drozdzynskime)
[![vuelibs.org](https://img.shields.io/badge/VueLIBs-vue--grecaptcha-C51162.svg)](https://vuelibs.org/libraries/vue-grecaptcha)

# vue-grecaptcha

## Description
Google reCAPTCHA for VueJS

## Install

### NPM

```shell
$ npm install vue-grecaptcha
```

### CDN
```html

```

## Usage

### Init
Add this just before closing body to get Google Recaptcha API
```html

```
```
With `onload` callback, it will call init function.
```

#### Setup sitekey
```javascript
Vue.use(VueGrecaptcha, {
sitekey: 'your_key'
})
```
or
```html

```

#### Usage

##### v-model
```html

```

##### callback
```vue

export default {
// ...
methods: {
callback: function (response) {
// Do stuff
}
}
}

```

### Props:
* sitekey
* callback
* type
* size
* tabindex
* badge
* theme

Informations about props available at reCAPTCHA v2 and Invisible reCAPTCHA.

### Methods:

#### reset
```vue

export default {
// ...
methods: {
resetRecaptcha() {
this.$refs.recaptcha.reset();
}
}
}

```

## License
```
The MIT License (MIT)

Copyright (c) 2017 Krystian Drożdżyński

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```