npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gaviti/vue-turnstile

v0.6.3

Published

A Vue 2.7.x component wrapper for Cloudflare's Turnstile

Downloads

2,049

Readme

Vue Turnstile

A Vue 2.7.x component wrapper for Cloudflare's Turnstile

Installation

NPM

npm install @gaviti/vue-turnstile

Yarn

yarn add @gaviti/vue-turnstile

Installation for Vue 3.3.x

For Vue 3.3.x support, you should install a version of this package greater than or equal to 1.0.0. For the code corresponding to version 1.0.0 (Vue 3) and above, please refer to the "next" branch.

Usage

<template>
  <div>
    <vue-turnstile @verified="token = $event" />
    <div>Token: {{ token }}</div>
  </div>
</template>

<script>
import VueTurnstile from '@gaviti/vue-turnstile';

export default {
  components: {
    VueTurnstile
  },
  data() {
    return {
      token: null,
    };
  },
};
</script>

Customization options

| Prop | Type | Description | Required | Default | | ---------------- | ----------------------------- | ----------------------------------------------------------------------------------------- | -------- | ----------- | | site-key | String | Your Turnstile sitekey - Docs | Yes | N/A | | theme | 'light' \| 'dark' \| 'auto' | Widget theme | No | 'auto' | | size | 'normal' \| 'compact' | Widget size | No | 'normal' | | auto-reset | Boolean | Allow to refresh the token after some time (in milliseconds) | No | false | | reset-timeout | Number | Refresh the token after some time (in milliseconds) * requires auto-reset to be true | No | 295000 | | recaptcha-compat | Boolean | Adds recaptcha compatibility layer | No | false | | explicit-render | Boolean | Renders the widget explicitly | No | false | | appearance | 'always' \| 'execute' \| 'interaction-only' | Appearance controls when the widget is visible - Docs | No | always | | Language | String | Language to display - ISO 639-1 two-letter language code - Supported languages | No | auto |

Methods

| Method | Description | | ----------- | -------------------- | | render() | Render the widget | | reset() | Reset the widget | | remove() | Remove the widget | | execute() | Generate a new token |

Events

| Name | Params | Description | | ------------ | ------ | ------------------------------------------------------------------------------------- | | @verified | | Returns the token | | @rendering | | Emitted on mounted (returns nothing) | | @rendered | | Emitted at the end of render (returns nothing) | | @error | code | Callback invoked when there is an error (e.g. network error or the challenge failed). |

Slots

| Name | Description | | --------- | ------------ | | default | Default slot |

License

MIT License

Copyright (c) 2023 Gaviti