1ConsentConsentDocs
Custom consent designs

Commands and consent controls

Use data-1c on native buttons and inputs. Keep keyboard behavior and accessible names.

Commands

ValueAction
command:openMainOpen notice
command:openDetailsOpen preferences
command:acceptAllAccept through the active framework
command:rejectAllReject optional choices through the active framework
command:saveCommit current selections
command:closeClose according to active view/configured behavior
command:resetReset through the runtime
view:notice, view:details, view:closeNavigation shortcuts
<div class="brand-actions">
  <button type="button" data-1c="command:acceptAll">{{ ui.button.acceptAll }}</button>
  <button type="button" data-1c="command:rejectAll">{{ ui.button.rejectAll }}</button>
  <button type="button" data-1c="view:details">{{ ui.templateLabels.preferencesLink }}</button>
</div>

Close is not a universal Save. Cancel/close in preferences discards staged changes; Save commits. Notice close follows configured geo-resolved behavior. Show it only when appearance.showClose permits it. Commands use event delegation; do not add scripts. dataset: is not a general-purpose customer action API: retain supplied service-detail components for disclosure interactions.

GDPR controls

[[each category in categories]]
<label class="brand-choice">
  <input type="checkbox" data-1c="consent:gdpr.category" data-1c-id="{{ category.id }}" />
  <span>{{ category.name }}</span>
</label>
[/each]

Use consent:gdpr.service with a service ID for individual services. The controlled-binding layer loads current values, handles input changes, and reconciles engine state. Let it own checked state and required-choice disabling. Keep essential-service explanations visible.

Other frameworks

FrameworkBinding examplesIdentity
TCFconsent:tcf.purpose, consent:tcf.vendorPurpose/vendor ID
TCF legitimate interestconsent:tcf.purposeLegitimateInterest, consent:tcf.vendorLegitimateInterestMatching purpose/vendor ID
USconsent:us.sale, consent:us.share, consent:us.limitSensitiveUseFramework-level; no category ID

US controls represent opt-out/limitation state. TCF consent and legitimate-interest controls require distinct accessible names and disclosures. Start from matching seeded views; preserve stacks, purpose/vendor disclosures, GPC handling, and sensitive-data gates. Replacing framework bindings with GDPR bindings does not reproduce the same behavior.

[[each purpose in tcf.purposes]]
<div>
  [[if purpose.hasConsentVendors]]
  <label>
    <input type="checkbox" data-1c="consent:tcf.purpose" data-1c-id="{{ purpose.id }}"
      aria-label="{{ purpose.name }} {{ ui.tcf.vendorMeta.consentLabel }}" />
    <span>{{ purpose.name }}</span>
  </label>
  [[/if]]
</div>
[/each]

Keep the distinct legitimate-interest controls and all vendor/purpose disclosures from the supplied TCF view. This component does not replace a complete TCF preference center.

US opt-out example

<label>
  <input type="checkbox" data-1c="consent:us.sale"
    aria-label="{{ ui.us.saleOptOutToggleLabel }} {{ ui.us.saleOptOutName }}" />
  <span>{{ ui.us.saleOptOutName }}</span>
</label>
[[if us.sensitivePIInUse]]
<label>
  <input type="checkbox" data-1c="consent:us.limitSensitiveUse"
    aria-label="{{ ui.us.limitSensitiveUseToggleLabel }} {{ ui.us.limitSensitiveUseName }}" />
  <span>{{ ui.us.limitSensitiveUseName }}</span>
</label>
[[/if]]

Keep the sale/share and GPC disclosures and other choices from the supplied US view. The engine owns opt-out state and GPC enforcement; the sensitive-use control appears only when configured as relevant.

What stays managed

Custom markup does not replace protocol adapters, persistence, expiry, enforcement, or evidence. Test actual choices: visual checkbox state does not prove a decision was saved. See publication checks.

On this page