Reference
Consent v0.2.0
Preference types
Public section IDs and partial per-section overrides.
Import PreferencesSection and PreferencesSectionId from @peax/consent-banner-react.
PreferencesSectionId suggests built-in IDs while accepting custom strings. PreferencesSection is a partial override with title, text, checked and disabled; it does not contain an id field.
import type { PreferencesSection, PreferencesSectionId } from '@peax/consent-banner-react'
const ids: PreferencesSectionId[] = ['essential', 'personalization']
const overrides: Record<string, PreferencesSection> = {
personalization: { title: 'Personalization', checked: false, disabled: false },
}See preferences configuration for merging and defaults, and generated signatures for the exact installed types.