RecallButton
A floating button that lets a visitor change their cookie choice later.
What it does
A small round button in the bottom-left corner. It appears once the banner is answered or closed and opens the preferences dialog, or the Do Not Sell dialog under CCPA. It hides itself while the banner or a dialog is showing.
Visitors must be able to change their choice as easily as they made it. This button is the ready-made way to give them that.
You already render it if you followed Installation.
<CookieBanner />
<CookiePreferences />
<RecallButton />Prefer your own link
A "Cookie settings" link in your footer does the same job. Render that instead of the button, or as well as it. See useConsentActions.
Change what it shows
The tooltip and screen-reader label come from the recallButtonLabel text in i18n (Translations). Pass children for your own icon:
<RecallButton>
<CookieIcon />
</RecallButton>The position is fixed to the bottom-left corner.
Restyle it
Target [data-cy-part="recall"] in your CSS. Passing className replaces the button's own class, so the default look disappears; include cy-widget if you want to keep it:
<RecallButton className="cy-widget my-extra-class" />Common mistakes
The button never appears. Under GDPR it appears only after the visitor has chosen. Accept or reject first.
The button is an unstyled circle.
You passed className, which replaced the default class. Add cy-widget to it.
Clicking it does nothing.
The dialog it opens is not rendered: CookiePreferences under GDPR, CookieOptOut under CCPA.
Next steps
- useConsentActions: a footer link or settings page instead of the button
- CookiePreferences: the dialog it opens