

Every state


default


focus


open


focus-switch


chosen


details-open
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "cookie-preferences" | Dialog id; switch ids hang off it. |
| title | string | "Cookie settings" | Dialog heading. |
| intro | string | – | Line under the heading. |
| categories | { id: string; title: string; summary: string; details: string; lockedReason?: string; defaultChecked?: boolean }[] | – | The categories. One with lockedReason is always on and locked, with that reason. |
| openLabel | string | "Cookie settings" | Text of the button that opens the dialog. |
| saveLabel | string | "Save choices" | Save button text. |
| acceptLabel | string | "Accept all" | Accept all button text. |
| rejectLabel | string | "Reject all" | Reject all button text. |
| defaultOpen | boolean | – | Opens the dialog on mount (first visits and previews). |
| onSave | (choices: Record<string, boolean>, how: "save" | "accept-all" | "reject-all") => void | – | Called with every category's choice when the dialog closes with a choice. The dialog stores nothing. |
| className | string | – | Extra classes on the wrapper. |
More consent
All 6consent-03 is in UI ProGet UI Pro, €199


