Skip to content

ConsentNoticeProps

type ConsentNoticeProps = {
children: (api) => ReactNode;
};

Defined in: notice.tsx:4

Type declaration

NameTypeDescriptionDefined in
children(api) => ReactNodeRender-prop receiving the full consent API. Renders nothing while the store is hydrating (!ready) or when the notice is closed. Use this for sites that have only notice-mode categories (e.g. UK DUAA analytics like Plausible / GoatCounter). For sites with any consent-mode category, use <ConsentBanner> instead — the banner already covers notice-mode categories in its list, and noticeOpen will stay false. Example <ConsentNotice> {({ save, deny }) => ( <div className="toast"> <p>We use privacy-friendly analytics.</p> <button onClick={() => { deny('analytics'); save() }}>Opt out</button> <button onClick={save}>Got it</button> </div> )} </ConsentNotice>notice.tsx:27