Reusable cookie message component


4.3.04 years ago7 years agoMinified + gzip package size for @economist/component-cookie-message in KB



The cookie-message component displays an EU cookie warning in the absence of a cookie named ec_cookie_message_0.

The cookie is set to 1 upon first load.

The message will not display in the test page if the cookie is set. This code will clear it:


Accepted CSS variables:

  • --cookiemessage-vertical-padding
  • --cookiemessage-horizontal-padding
  • --cookiemessage-min-height
  • --cookiemessage-link-hover

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.