Copy & locales
Start with a copy style
Section titled “Start with a copy style”Choose a complete, ready-to-edit base for both the banner and preferences modal:
lightning("init", { copyStarter: "friendly", // professional | clear | friendly | concise});professional is the default and preserves the original built-in wording.
The other starters range from direct and informative to more conversational and
compact. They all make an explicit accept/reject choice and describe optional
cookie purposes; they do not treat browsing as consent.
| Starter | Best suited to | Banner heading |
|---|---|---|
professional |
Formal or established brands | “We value your privacy” |
clear |
Broad audiences that need direct, purpose-led copy | “Your cookie choices” |
friendly |
Consumer brands wanting a warmer tone | “Cookies? Your call.” |
concise |
Compact, design-led experiences | “A quick cookie choice” |
The starter changes the complete banner and preferences-modal copy, including button labels. It does not determine legal compliance: make sure the purposes match the cookies your site actually uses and select the applicable regulation.
You can still replace any individual string with text; those overrides take
priority over the selected starter:
lightning("init", { copyStarter: "friendly", text: { acceptAll: "Sounds good" },});Override any string
Section titled “Override any string”Pass a text object to replace the selected starter’s copy. Any key you omit
keeps that starter’s value:
lightning("init", { text: { bannerTitle: "We value your privacy", bannerBody: "We use cookies to improve your experience…", acceptAll: "Accept all", rejectAll: "Reject all", customize: "Customise", save: "Save preferences", preferencesTitle: "Privacy preferences", downloadReceipt: "Download receipt", privacyPolicy: "Privacy policy", // label for the privacy-policy link // …doNotSell, poweredBy, preferencesBody },});Per-category labels & descriptions
Section titled “Per-category labels & descriptions”lightning("init", { text: { categories: { statistics: { label: "Analytics", description: "Helps us understand how the site is used.", }, }, },});Locale
Section titled “Locale”lightning("init", { locale: "fr-FR" }); // BCP-47; defaults to the document language