Socket
Socket
Sign inDemoInstall

vue-turnstile

Package Overview
Dependencies
21
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-turnstile

Vue library for Cloudflare Turnstile CAPTCHA alternative


Version published
Maintainers
1
Created

Readme

Source

Vue Turnstile

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'
render-on-mountBooleanAutomatically render Turnstile widget after component mountsNotrue

Methods

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

Author

Rui Gomes
https://ruigomes.me

License

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

Keywords

FAQs

Last updated on 06 Jan 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc