Socket
Socket
Sign inDemoInstall

@vivaprivacy/cookie-consent

Package Overview
Dependencies
1
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vivaprivacy/cookie-consent

Best GDPR banner


Version published
Maintainers
2
Created

Readme

Source

Examples

Installing

Using jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/@vivaprivacy/cookie-consent@1.0.0/build/cookie-consent.min.js"></script>
PropTypeDescriptionValues
themestringName of preset theme"CodGrayWhite" (default), "BigStoneTurquoise", "SeaweedAtlantis", "CharadeJaffa", "RhinoShakespeare", "CloudBurstGorse", "SanJuanGold", "BlueChillCanary", "AffairBrightSun", "PorcelainMalibu", "AliceBlueCornflowerBlue", "LinkWaterChathamsBlue", "SazeracTuscany", "CatskillWhiteAquaForest", "WhiteMineShaft"
cookieNamestringName of a cookie stored in a browser"cookie-banner"(default)
typestringType of a banner. confirm: Two buttons(let visitors accept/decline cookies). alert: One button(inform visitors)"confirm" (default), "alert"
blockTypestringDisplay banner as block or line"line" (default), "block"
blockPositionstringBanner position on the screen"bottom" (default), "bottom-left", "bottom-right", "top-left", "top-right", "center", "top", "top-scroll", "bottom-scroll"
buttonTypestringButton styles"round-fill" (default), "round", "rectangle", "rectangle-fill", "rectangle-round", "rectangle-round-fill"
buttonDirectionstringDisplay buttons in a row or one after another"row" (default), "column"
showPoweredBybooleanDisplay credentialstrue (default), false
blind.visiblebooleanDisplay screen overlay to force banner interactionfalse (default), true
blind.bgColorstringOverlay color"black" (default)
blind.opacitystringOverlay opacity".5" (default)
animation.typestringRender banner with animation"no" (default), "slide-top", "slide-bottom", "slide-left", "slide-right", "fade"
animation.delaystringAnimation delay in milliseconds"5000" (default)
animation.durationstringAnimation duration in milliseconds"500" (default)
link.htmlstringText in the link positioned after the banner message"Learn more" (default)
link.hrefstringLearn more link Href"https://gdprinfo.eu" (default)
message.htmlstringMessage displayed inside the banner"This website uses cookies to ensure you get the best experience on our website." (default)
accept.byScrollstringAuto accept and hide banner after user scrolls for x amount of pixels. Provide a number of pixels"none" (default)
accept.byTimenumberAuto accept and hide banner after x amount of milliseconds. Provide a number of milliseconds"-1" (default)
accept.byClickbooleanAuto accept and hide banner after user clicks anywhere on the screenfalse (default), true
refreshonallowbooleanRefresh a page after user accepts cookiesfalse (default),true
cookieNamestringCookie name"cookie-banner" (default)
ignoreAllow
messageStyles
linkStyle
linkStyleHover
allowHtml
allowStyle
allowStyleHover
dismissHtml
dismissStyle
dismissStyleHover
declineHtml
declineStyle
declineStyleHover
onAllow
onDecline
onDismiss
onRestore
onInit
onUpdate

Keywords

FAQs

Last updated on 17 Oct 2020

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