Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@norvikit/vue-cookies-consent

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@norvikit/vue-cookies-consent

Nice and clean Vue component to display message about cookies

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
295
decreased by-56.74%
Maintainers
2
Weekly downloads
 
Created
Source

Size Downloads Version

Nice and clean Vue component to display message about cookies

  • 🎬 Demo

📦 Installation

NPM

npm install --save @norvikit/vue-cookies-consent

Yarn

yarn add @norvikit/vue-cookies-consent

🚀 Usage in Vue Components

<template>
  <vue-cookies-consent>
    <template #title>Some default title for window</template>
    <template #description>
      <p>Some description in window</p>
    </template>
    <template #button>Accept cookies</template>
  </vue-cookies-consent>
</template>

<script>
  import VueCookiesConsent from '@norvikit/vue-cookies-consent'
  export default {
    components: {
      VueCookiesConsent
    }
  }
</script>

🚀 Usage throughout the Vue project

Add this content to main.js

import Vue from "vue";
import VueCookiesConsent from "@norvikit/vue-cookies-consent";
Vue.use(VueCookiesConsent)

🚀 Usage in Nuxt.js

Create a file plugins/vue-cookies-consent.js with the following content:

import Vue from "vue";
import VueCookiesConsent from "@norvikit/vue-cookies-consent";
Vue.use(VueCookiesConsent)

Then add plugin to nuxt.config.js

plugins: [
    {
      src:"plugins/vue-cookies-consent.js", mode:'client'
    }
]

🔧 Props

PropTypeDescriptionExample
colorTitleStringColor of window titlecolor-title="#000000"
colorDescriptionStringColor of window descriptioncolor-description="#000000"
colorButtonStringColor of button textcolor-button="#FFFFFF"
backgroundWindowStringBackground of windowbackground-window="#FFFFFF"
backgroundButtonStringBackground of buttonbackground-button="#C11E31"
backgroundButtonHoverStringBackground of button on hover statebackground-button-hover="#de2b40"
hasShadowBooleanWindow has shadow:has-shadow="true"
borderRadiusNumberBorder radius of window in px:border-radius="16"
offsetYNumberOffset of window by Y in px:offset-y="16"
offsetXNumberOffset of window by X in px:offset-x="16"
positionStringPosition of window: top or bottomposition="top"
saveMethodStringMethod to save window state after accept: ls or cookiessave-method="cookies"

🔧 Events

EventDescriptionExample
shownFired after window is shown@shown="someMethod"
acceptFired after accept button is clicked@accept="someMethod"
lsSavedFired after window state saved to localStorage@ls-saved="someMethod"
cookiesSavedFired after window state saved to Cookies@cookies-saved="someMethod"
hiddenFired after window is hidden@hidden="someMethod"

Keywords

FAQs

Package last updated on 20 May 2022

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc