

Every state


default


focus


focus-link


saved
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "cookie-bar" | Id; the heading id hangs off it. |
| title | string | "Cookies on this site" | Heading that names the region. |
| message | string | – | The short explanation. |
| policyLabel | string | "Read our cookie policy" | Policy link text. |
| policyHref | string | "#cookie-policy" | Policy link. |
| acceptLabel | string | "Accept all" | Accept button text. |
| rejectLabel | string | "Reject all" | Reject button text. |
| settingsLabel | string | "Settings" | Settings button text. |
| savedMessage | string | – | Shown in place of the buttons once a choice is made. |
| status | "ask" | "saved" | "ask" | Starting state (for previews). |
| onChoice | (choice: "accept-all" | "reject-all") => void | – | Called with the choice. The bar sets no cookies and stores nothing. |
| onSettings | () => void | – | Opens your cookie settings, for example the cookie preferences dialog. |
| className | string | – | Extra classes on the bar. |


