🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@getjoystick/vue-turnstile

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getjoystick/vue-turnstile

Vue library for Cloudflare Turnstile CAPTCHA alternative

1.1.0
latest
Source
npm
Version published
Weekly downloads
19
-9.52%
Maintainers
3
Weekly downloads
 
Created
Source

vue-turnstile

Latest Stable Version

A Cloudflare Turnstile library for Vue 3

Installation

Add vue-turnstile to your Javascript project dependencies using Yarn:

yarn add vue-turnstile

Or NPM:

npm install vue-turnstile --save

Usage

<script lang="ts">
import VueTurnstile from 'vue-turnstile';

export default {
  components: { VueTurnstile },

  data() {
    return {
      token: '',
    };
  },
};
</script>

<template>
  <div>
    <vue-turnstile site-key="1x00000000000000000000AA" v-model="token" />
    <div>Token: {{ token }}</div>
  </div>
</template>

Customization options

PropTypeDescriptionRequiredDefault
site-keyStringYour Turnstile sitekey - DocsYesN/A
v-modelStringBinding that contains the token returned by the Turnstile widgetYesN/A
reset-intervalNumberGet a fresh token after reset-interval milliseconds - Turnstile tokens only last for 5 minutesNo295000
size'normal' | 'compact'Widget sizeNo'normal'
theme'light' | 'dark' | 'auto'Widget theme - auto respects the user's browser preferenceNo'auto'
actionStringA customer value that can be used to differentiate widgets under the same sitekey in analytics and which is returned upon validation.No''
render-on-mountBooleanAutomatically render Turnstile widget after component mountsNotrue
remove-before-unmountBooleanAutomatically remove the Turnstile widget in beforeUnmountNotrue

Methods

MethodDescription
reset()Resets the widget
render()Renders the widget
remove()Removes the widget

Author

Original author of the library is: Rui Gomes
https://ruigomes.me

Fork is maintained and published by: Joystick https://getjoystick.com

License

The MIT License (MIT). Please see LICENSE file for more information.

Keywords

cloudflare

FAQs

Package last updated on 22 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts