Magoo Component UI logo Magoo Component UI
← Catalog

Age Gate

age-gate organism experimental

A centered card that asks a visitor to confirm they meet a minimum age before entering.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
TwentyOne

Props

NameTypeReq
heading string
message string
min_age string

Related components

How to use

behavior.js wires the two buttons. Clicking confirm dispatches a bubbling "age:verify" CustomEvent with detail { ok: true }; clicking Exit dispatches the same event with { ok: false }. The component does not itself hide or redirect anything - the host listens and decides. The portable self-init needs no props object and there is no data-* config to read. init returns a cleanup that removes both listeners.

Use cases

highlightgate WCAG AA SEO 20 dir: both ai-generated