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>;| Prop | Type | Required | Description |
|---|---|---|---|
title | string | no | Heading text. Defaults to "We use cookies". |
description | ReactNode | no | Body copy. Accepts any node, so links/emphasis are allowed. |
acceptLabel | string | no | Label for the accept button. Defaults to "Accept all". |
rejectLabel | string | no | Label for the reject button. Defaults to "Reject all". |
showReject | boolean | no | Render the reject button. Set false to force an accept-only banner. Defaults to true. |
onAccept | () => void | no | Called after the user accepts, following the consent write. |
onReject | () => void | no | Called after the user rejects, following the consent write. |
className | string | no | Extra class name(s) merged onto the root element. |
mode | "default" | "ticket" | no | Visual mode. Defaults to "default". |
Web Component
Section titled “Web Component”<script type="module"> import { defineAll } from "@vscookies/vanilla/define"; import "@vscookies/skin-edito-vanilla"; defineAll();</script><vscookies-edito mode="default"></vscookies-edito>| Attribute | Type | Default | Description |
|---|---|---|---|
title | string | We use cookies | Heading text. Defaults to "We use cookies". |
description | string | We 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-label | string | Accept all | Label for the accept button. Defaults to "Accept all". |
reject-label | string | Reject all | Label for the reject button. Defaults to "Reject all". |
show-reject | "true" | "false" | true | Render the reject button. Set false to force an accept-only banner. Defaults to true. |
mode | "default" | "ticket" | default | Visual mode. Defaults to "default". |
Tokens
Section titled “Tokens”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" });| Token | Group | Default |
|---|---|---|
--vsc-edito-color-accent | color | light-dark(#2563eb, #60a5fa) |
--vsc-edito-color-accent-hover | color | light-dark(#1d4ed8, #3b82f6) |
--vsc-edito-color-accent-contrast | color | light-dark(#ffffff, #0b1220) |
--vsc-edito-color-surface | color | light-dark(#ffffff, #111827) |
--vsc-edito-color-surface-muted | color | light-dark(#f9fafb, #1f2937) |
--vsc-edito-color-surface-blur | color | light-dark(rgba(255,255,255,0.72), rgba(17,24,39,0.72)) |
--vsc-edito-color-text | color | light-dark(#111827, #f9fafb) |
--vsc-edito-color-text-muted | color | light-dark(#6b7280, #9ca3af) |
--vsc-edito-color-border | color | light-dark(#e5e7eb, #374151) |
--vsc-edito-radius-sm | radius | 0.5rem |
--vsc-edito-radius-md | radius | 0.75rem |
--vsc-edito-radius-lg | radius | 1.125rem |
--vsc-edito-radius-xl | radius | 1.25rem |
--vsc-edito-radius-full | radius | 9999px |
--vsc-edito-space-1 | space | 0.25rem |
--vsc-edito-space-2 | space | 0.5rem |
--vsc-edito-space-3 | space | 0.75rem |
--vsc-edito-space-4 | space | 1rem |
--vsc-edito-space-5 | space | 1.25rem |
--vsc-edito-space-6 | space | 1.5rem |
--vsc-edito-space-7 | space | 2rem |
--vsc-edito-font-family | font | ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif |
--vsc-edito-font-size-sm | font | 0.875rem |
--vsc-edito-font-size-md | font | 1rem |
--vsc-edito-font-size-lg | font | 1.125rem |
--vsc-edito-font-weight-medium | font | 500 |
--vsc-edito-font-weight-semibold | font | 600 |
--vsc-edito-font-weight-bold | font | 700 |
--vsc-edito-shadow-sm | effect | light-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-md | effect | light-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-sm | effect | 0.5rem |
--vsc-edito-blur-md | effect | 0.75rem |
Install the matching runtime zip plus this skin’s zip — see Installing.