Cookie

Singleton cookie consent notice that stores agreement in localStorage, with a cancel option that clears data and redirects

Live preview

Open in new tab ↗
  • singleton
  • uses localStorage
  • supports cancel operation (removes cookies, localStorage and redirects to about:blank)

Configuration:

  • agree {String} a label for the agree button (default: OK)
  • cancel {String} a label for the cancel button (default: Cancel)
  • redirect {String} URL to redirect if the user pressed cancel button (default: about:blank)

More UI components

Browse all 348