Age Gate
Age verification: date of birth, remember me, deny under the limit. Pro · Account and access › Security and sign-in
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add age-gate
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { AgeGate } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
minAge | number | 18 | Minimum age. Default 18. |
onVerify | (result: AgeGateResult) => void | Called on verify with the computed age; remember the pass (cookie) when allowed. | |
showRemember | boolean | true | Shows the "Remember me" checkbox. Default true. |
policyHref | string | Link after the legal line. | |
headingLevel | 1 | 2 | 3 | 4 | 5 | 6 | 2 | Level of the title (default 2). |
today | Date | Day the age is counted on (tests, server time). Default: today. | |
locale | string | BCP 47 locale for the month names and field order. | |
labels | Partial<AgeGateLabels> | Overrides for the built-in English text; keys left out keep their defaults. | |
dateLabels | Partial<DateOfBirthInputLabels> | Strings of the date fields. |
Related components
- Two Factor Setup — Two-factor setup: method, QR code or phone, code verification
- Active Sessions — Active sessions: current device, suspicious sign-ins, revoke access
- Access Tokens — Personal access tokens: scope, last used, revoke
- Profile Details — Profile: completeness, verified contacts, fields
- Address Book — Address book: home, work, default addresses and actions
- Social Profiles — Linked social profiles: reorder, verify, copy link
- Settings Panel — Settings page: section navigation, unsaved-changes bar, danger zone
- Permission Matrix — Roles and permissions matrix: inheritance, locks, bulk toggles, draft changes
- Audit Log — Activity log: filters, field diffs, CSV export, load more
- Privacy Center — Privacy center: score, setting groups, protection counters
- Support Center — Support: contact channels with status, tickets with filters
Previous: Access Tokens · Next: Profile Details · All Account and access