Skip to content

Edito skin

Editorial-style consent banner. Renders null once consent has been recorded, so it can be mounted unconditionally. Must be rendered inside a CookieConsentProvider.

import { CookieConsentProvider } from "@vscookies/react";
import { EditoBanner } from "@vscookies/skin-edito-react";
<CookieConsentProvider>
<EditoBanner mode="default" />
</CookieConsentProvider>;
PropTypeRequiredDescription
titlestringnoHeading text. Defaults to "We use cookies".
descriptionReactNodenoBody copy. Accepts any node, so links/emphasis are allowed.
acceptLabelstringnoLabel for the accept button. Defaults to "Accept all".
rejectLabelstringnoLabel for the reject button. Defaults to "Reject all".
showRejectbooleannoRender the reject button. Set false to force an accept-only banner. Defaults to true.
onAccept() => voidnoCalled after the user accepts, following the consent write.
onReject() => voidnoCalled after the user rejects, following the consent write.
classNamestringnoExtra class name(s) merged onto the root element.
mode"default" | "ticket"noVisual mode. Defaults to "default".
<script type="module">
import { defineAll } from "@vscookies/vanilla/define";
import "@vscookies/skin-edito-vanilla";
defineAll();
</script>
<vscookies-edito mode="default"></vscookies-edito>
AttributeTypeDefaultDescription
titlestringWe use cookiesHeading text. Defaults to "We use cookies".
descriptionstringWe use cookies to improve your experience. Accept to enable optional features, or reject to use only necessary cookies.Body copy. Accepts any node, so links/emphasis are allowed.
accept-labelstringAccept allLabel for the accept button. Defaults to "Accept all".
reject-labelstringReject allLabel for the reject button. Defaults to "Reject all".
show-reject"true" | "false"trueRender the reject button. Set false to force an accept-only banner. Defaults to true.
mode"default" | "ticket"defaultVisual mode. Defaults to "default".

Every UI value is owned by this skin under --vsc-edito-* and exported as skinTokens from the skin package. Only shared --vsc-state-* values are global; --vsc-global-* is an explicit opt-in override for any skin:

import { setTokenOverrides, clearTokenOverrides } from "@vscookies/react"; // or @vscookies/vanilla
setTokenOverrides({ "--vsc-edito-color-accent": "#7c3aed" }, { skin: "edito" });
clearTokenOverrides({ skin: "edito" });
TokenGroupDefault
--vsc-edito-color-accentcolorlight-dark(#2563eb, #60a5fa)
--vsc-edito-color-accent-hovercolorlight-dark(#1d4ed8, #3b82f6)
--vsc-edito-color-accent-contrastcolorlight-dark(#ffffff, #0b1220)
--vsc-edito-color-surfacecolorlight-dark(#ffffff, #111827)
--vsc-edito-color-surface-mutedcolorlight-dark(#f9fafb, #1f2937)
--vsc-edito-color-surface-blurcolorlight-dark(rgba(255,255,255,0.72), rgba(17,24,39,0.72))
--vsc-edito-color-textcolorlight-dark(#111827, #f9fafb)
--vsc-edito-color-text-mutedcolorlight-dark(#6b7280, #9ca3af)
--vsc-edito-color-bordercolorlight-dark(#e5e7eb, #374151)
--vsc-edito-radius-smradius0.5rem
--vsc-edito-radius-mdradius0.75rem
--vsc-edito-radius-lgradius1.125rem
--vsc-edito-radius-xlradius1.25rem
--vsc-edito-radius-fullradius9999px
--vsc-edito-space-1space0.25rem
--vsc-edito-space-2space0.5rem
--vsc-edito-space-3space0.75rem
--vsc-edito-space-4space1rem
--vsc-edito-space-5space1.25rem
--vsc-edito-space-6space1.5rem
--vsc-edito-space-7space2rem
--vsc-edito-font-familyfontui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif
--vsc-edito-font-size-smfont0.875rem
--vsc-edito-font-size-mdfont1rem
--vsc-edito-font-size-lgfont1.125rem
--vsc-edito-font-weight-mediumfont500
--vsc-edito-font-weight-semiboldfont600
--vsc-edito-font-weight-boldfont700
--vsc-edito-shadow-smeffectlight-dark(0 0.0625rem 0.125rem rgba(15,23,42,0.08), 0 0.0625rem 0.125rem rgba(0,0,0,0.4))
--vsc-edito-shadow-mdeffectlight-dark(0 0.625rem 1.875rem rgba(15,23,42,0.12), 0 0.625rem 1.875rem rgba(0,0,0,0.5))
--vsc-edito-blur-smeffect0.5rem
--vsc-edito-blur-mdeffect0.75rem

Install the matching runtime zip plus this skin’s zip — see Installing.