Cookie Consent is included in Pro, Prime, and Enterprise subscriptions.
Cookie Consent aims to help you comply with privacy laws such as GDPR and CCPA. They require users be informed and explicitly give consent to the usage of cookies.
Scaled down examplesThe examples on this page are scaled down so that their viewport-size dependant behavior can be demonstrated. Some examples change their behavior also based on your browser viewport size.
By default, the banner is shown at the top of the screen with a predefined text, a link to cookiesandyou.com which explains what cookies are, and a consent button.
Cookie Consent is fully customizable. You can customize the message, the "Learn More" link, the "Dismiss" button, as well as the component’s position.
<vaadin-cookie-consent message="Tämä sivusto käyttää evästeitä parhaan kokemuksen tarjoamiseksi" dismiss="Selvä" learn-more="Lue lisää" learn-more-link="https://vaadin.com/terms-of-service" ></vaadin-cookie-consent>
Cookie Consent can be positioned in the viewport in 4 non-stretched positions, or stretched across the top or bottom:
Top (stretch, default)
On smaller viewports, the component always takes up the entire width of the viewport.