Compliance
A consent banner and preferences dialog where refusing is exactly as easy as accepting, an append-only record of every decision, and a server gate other code checks before it collects.
Accept, reject or customise, then change your mind from the trigger. Every choice appends a row; a new policy version brings the banner back. Theme tokens restyle the banner; the dialog is portalled to the page, so it keeps the site's tokens.
What ships today
fancy-compliance is the Laravel side; fancy-compliance-ui is the React side, built from react-fancy, which works with any backend that serves the same JSON.
Refusing is as easy as accepting
Accept all, Reject all and Customise are the same component, size and classes, side by side, and a test fails if one becomes more prominent. Nothing optional is pre-ticked. The banner is a labelled, non-modal region that never takes focus.
Per-category consent
Categories are yours, in config: a key, a label, a description and purposes, every one a translation key. The necessary category always exists and can never be refused. The dialog shows one switch per category.
An append-only consent record
One row per decision, withdrawal or login link: what was granted and refused, under which policy version, from which source. A withdrawal is a new row; the model refuses to edit or delete one. No IP address and no user agent, raw or hashed.
Withdrawal, and re-consent
ConsentPreferencesTrigger opens the dialog at any time, and turning a category off is recorded as a withdrawal. Change the policy version and every earlier decision stops being current: the banner shows again.
A server gate
Consent::allows('analytics') fails closed on an unknown category; the consent:analytics middleware answers 403 until consent; @consent in Blade. ConsentGate and useConsentScript do the same in React, and say honestly when a script that already ran needs a reload.
Styled to your app
Three variants (bar, card, corner) and logical positions that follow RTL. The banner reads react-fancy's theme tokens, and classNames styles each part, with one action key for all three buttons so none can be made easier than another.
An agent can never give consent
Consent is the person's own act; one an agent gave for them is not consent. So the banner, the dialog and the trigger each carry data-agent-off-limits="consent", and agent-integrations 0.58.0 or later refuses every agent action that would reach inside one: a click, a field set, a submit, a focus or a scroll. It refuses before a pendingMode confirm can stage it, and tells the agent only that a consent region exists.
Your privacy choices
We use necessary cookies, and others only if you allow them. You can change your mind at any time.We use cookies and similar technologies. The necessary ones keep the site working. With your permission we would also use others, which you can review in the settings. You can change your mind at any time.
Ask the agent
The agent here is agent-integrations' own in-page walker, the one its navigation bridge drives, acting on this page. It may click Subscribe; it is refused at Accept all.
Scroll to the foot of the page while the bar shows: the footer stays reachable above it. Decide in the bar, or remove it, and both values go back.
A fixed banner sits over the page's last content, including the footer's preferences trigger (WCAG 2.4.11, Focus Not Obscured). reserveSpace pads the body by the banner's measured height; layouts that scroll their own wrapper read the variable instead.
What these packages do not do
fancy-compliance covers consent only: GDPR data export and erasure are not in it. It does not block a script you inject outside it, and rate limits and geo rules stay yours.
Looking for bot protection?
The captcha now lives with the kit's other security capabilities. It still works with consent: fancy-captcha-ui takes anything with allows(category), which useConsent() returns, to keep a third-party captcha behind consent.
How it fits
Consent is a PHP package for Laravel and a React package built from react-fancy, which works with any backend that serves the same JSON.
Install
composer require particle-academy/fancy-compliancenpm install @particle-academy/fancy-compliance-ui
The packages
Consent for Laravel: host-defined categories, an append-only consent ledger per user and per guest (no IP address, no user agent), withdrawal, re-consent on a new policy version, and a server gate other packages check before they collect. Headless; pairs with @particle-academy/fancy-compliance-ui.
A consent banner, a preferences dialog and script gating for React, built from react-fancy. Reject is exactly as easy as accept, nothing is pre-ticked, withdrawal is one click from the footer, and a script that already ran is never claimed to be stopped. AAA, RTL, every string a translation key. Pairs with particle-academy/fancy-compliance.
Put consent in your app
Install both halves, define your categories, and render the banner once in your layout. Then read how Fancy Dev Kit handles accessibility, which the banner is held to.

