Skip to content

CategoryDefinition

type CategoryDefinition = {
default: boolean;
description: string;
mode: ConsentMode;
required: boolean;
vendors: string[];
};

Defined in: types.ts:12

Type declaration

NameTypeDescriptionDefined in
default?booleanPre-toggled state when the user hasn’t chosen yet. Ignored when required is true.types.ts:16
description?stringHuman-readable description shown in the banner / preference centre.types.ts:20
mode?ConsentModeOverride the inferred mode for this category. Normally not needed — the jurisdiction + vendor list determines the mode.types.ts:25
required?booleanTrue for strictly necessary categories that the user cannot deny.types.ts:14
vendors?string[]Vendor identifiers (e.g. ‘plausible’, ‘google-ads’) used for jurisdiction classification.types.ts:18