Skip to content

Age verification

A legal-age check window for a wine shop or brewery, accessible, remembered for the session and with the French Evin law notices.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

On arriving at the shop of a wine merchant, a craft brewery or a distillery, a modal window asks “Are you 18 or over?”, recalling that selling alcohol to minors is forbidden. “Yes” closes the window and the answer is kept until the browser is closed (session storage), so it is not asked on every page; “No” shows a kind message with a link to the French Alcool Info Service, with focus placed on that new heading. The window is a native dialog element opened with showModal: trapped focus, blurred backdrop, and the Escape key cannot skip the question. The mandatory health notice “Alcohol abuse is dangerous for your health, drink in moderation” appears in the window and on the page. Title and description linked with aria-labelledby and aria-describedby, full-width 48 px buttons, AA contrast in light and dark mode. This self-declaration is the common practice; age checks on delivery remain the seller’s responsibility.

Code

Loading the code…

The code of this component in

Archive contents

modale-verification-age-html-tailwind.zip3 files · 5 Ko

  • index.html6 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • Cart side drawer

    Coming soon

    A panel sliding in from the right to show the cart without leaving the page.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A reinforced confirmation asking to type the name of the item to delete.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A search covering the page, with popular suggestions, opened from the navigation bar.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Gallery lightbox

    Coming soon

    Thumbnails that open photos large, with previous / next navigation and caption.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component