

Every state


default


focus


filled


error


yes-no


under-age


passed
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "age-check" | Id; field ids hang off it. |
| mode | "date" | "yes-no" | "date" | Date of birth or one question. Same card, different content. |
| minAge | number | 18 | Age needed to go in. |
| reason | string | – | Why the site asks, in one sentence. |
| exitHref | string | "https://example.com" | Where Leave this site goes. |
| exitLabel | string | "Leave this site" | Exit link text. |
| status | "ask" | "passed" | "under-age" | "ask" | Starting state (for previews). |
| defaultDay | string | – | Starting day. |
| defaultMonth | string | – | Starting month. |
| defaultYear | string | – | Starting year. |
| error | string | – | An error to show from the start (previews). |
| today | string | – | The day to count from, as YYYY-MM-DD. Defaults to today when the form is sent. |
| onPass | () => void | – | Called when the person is old enough. Remember it yourself if you want to. |
| onFail | () => void | – | Called when the person is under age. |
| className | string | – | Extra classes on the card. |
More consent
All 6consent-01 is in UI ProGet UI Pro, €199


