Minimalist skin
Minimalist 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 { MinimalistBanner } from "@vscookies/skin-minimalist-react";
<CookieConsentProvider> <MinimalistBanner mode="light" /></CookieConsentProvider>;| Prop | Type | Required | Description |
|---|---|---|---|
title | string | no | Heading text. Defaults to "We use cookies". Currently not rendered by this skin. |
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 cookies". |
rejectLabel | string | no | Label for the reject button. Defaults to "Decline cookies". |
manageLabel | string | no | Label for the manage button. Defaults to "Manage cookies". |
showReject | boolean | no | Render the reject button. Set false to force an accept-only banner. Defaults to true. |
showManage | boolean | no | Render the manage button. Set false to hide it (the manage view stays reachable via manageCookies()). Defaults to true. |
media | json | no | Media shown in the banner view — an image or a video. Set false to hide it. Defaults to the bundled demo image. |
position | unionOrJson | no | Anchor position of the banner, kept 1rem away from the viewport edges. Pass one of the 11 positions to apply it to every view, or an object ({ banner, manage, message }) to position each view independently. Defaults to "bottom-left" for all views. |
style | json | no | Inline styles on the banner root. Set any --vsc-min-* token here (e.g. style={{ "--vsc-min-color-banner-bg": "#fff" }}) to re-theme the whole color scheme. |
categoryAccents | json | no | Per-category accent color overrides, keyed by category name. Falls back to the catalog accent, then to the skin’s accent token. |
buttons | json | no | Inline style overrides for individual buttons (background, color, borderColor, borderRadius, …). |
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 | "light" | "dark" | "blur" | no | Visual mode. Defaults to "light". |
Web Component
Section titled “Web Component”<script type="module"> import { defineAll } from "@vscookies/vanilla/define"; import "@vscookies/skin-minimalist-vanilla"; defineAll();</script><vscookies-minimalist mode="light"></vscookies-minimalist>| Attribute | Type | Default | Description |
|---|---|---|---|
title | string | — | Heading text. Defaults to "We use cookies". Currently not rendered by this skin. |
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 cookies | Label for the accept button. Defaults to "Accept all cookies". |
reject-label | string | Decline cookies | Label for the reject button. Defaults to "Decline cookies". |
manage-label | string | Manage cookies | Label for the manage button. Defaults to "Manage cookies". |
show-reject | "true" | "false" | true | Render the reject button. Set false to force an accept-only banner. Defaults to true. |
show-manage | "true" | "false" | true | Render the manage button. Set false to hide it (the manage view stays reachable via manageCookies()). Defaults to true. |
media | "json" | { type: "image", src: demoCover, alt: "Cookies on a tray" } | Media shown in the banner view — an image or a video. Set false to hide it. Defaults to the bundled demo image. |
position | "top" | "bottom" | "left" | "right" | "center" | "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "json object" | — | Anchor position of the banner, kept 1rem away from the viewport edges. Pass one of the 11 positions to apply it to every view, or an object ({ banner, manage, message }) to position each view independently. Defaults to "bottom-left" for all views. |
category-accents | "json" | — | Per-category accent color overrides, keyed by category name. Falls back to the catalog accent, then to the skin’s accent token. |
buttons | "json" | — | Inline style overrides for individual buttons (background, color, borderColor, borderRadius, …). |
mode | "light" | "dark" | "blur" | light | Visual mode. Defaults to "light". |
Tokens
Section titled “Tokens”Every UI value is owned by this skin under --vsc-min-* 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-min-color-accent": "#7c3aed" }, { skin: "minimalist" });clearTokenOverrides({ skin: "minimalist" });| Token | Group | Default |
|---|---|---|
--vsc-min-color-accent | color | light-dark(#2563eb, #60a5fa) |
--vsc-min-color-accent-hover | color | light-dark(#1d4ed8, #3b82f6) |
--vsc-min-color-accent-contrast | color | light-dark(#ffffff, #0b1220) |
--vsc-min-color-surface | color | light-dark(#ffffff, #111827) |
--vsc-min-color-surface-muted | color | light-dark(#f9fafb, #1f2937) |
--vsc-min-color-surface-blur | color | light-dark(rgba(255,255,255,0.72), rgba(17,24,39,0.72)) |
--vsc-min-color-text | color | light-dark(#111827, #f9fafb) |
--vsc-min-color-text-muted | color | light-dark(#6b7280, #9ca3af) |
--vsc-min-color-border | color | light-dark(#e5e7eb, #374151) |
--vsc-min-radius-sm | radius | 0.5rem |
--vsc-min-radius-md | radius | 0.75rem |
--vsc-min-radius-lg | radius | 1.125rem |
--vsc-min-radius-xl | radius | 1.25rem |
--vsc-min-radius-full | radius | 9999px |
--vsc-min-space-1 | space | 0.25rem |
--vsc-min-font-family | font | ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif |
--vsc-min-font-size-sm | font | 0.875rem |
--vsc-min-font-size-md | font | 1rem |
--vsc-min-font-size-lg | font | 1.125rem |
--vsc-min-font-weight-medium | font | 500 |
--vsc-min-font-weight-semibold | font | 600 |
--vsc-min-font-weight-bold | font | 700 |
--vsc-min-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-min-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-min-blur-sm | effect | 0.5rem |
--vsc-min-blur-md | effect | 0.75rem |
--vsc-min-palette-cream | color | #FFFBEB |
--vsc-min-palette-neutral-100 | color | #F0F0F0 |
--vsc-min-palette-neutral-150 | color | #D9D9D9 |
--vsc-min-palette-neutral-200 | color | #DFDFDF |
--vsc-min-palette-neutral-300 | color | #D0D0D0 |
--vsc-min-palette-neutral-400 | color | #C6C6C6 |
--vsc-min-palette-neutral-600 | color | #9A9A9A |
--vsc-min-palette-neutral-700 | color | #939393 |
--vsc-min-palette-neutral-800 | color | #1E1E1E |
--vsc-min-palette-neutral-900 | color | #000000 |
--vsc-min-palette-amber-900 | color | #78350F |
--vsc-min-palette-accent | color | #00B009 |
--vsc-min-color-banner-bg | color | var(--vsc-min-palette-neutral-100) |
--vsc-min-color-shell-bg | color | var(--vsc-min-palette-neutral-200) |
--vsc-min-color-panel-bg | color | var(--vsc-min-palette-neutral-100) |
--vsc-min-color-panel-border | color | var(--vsc-min-palette-neutral-400) |
--vsc-min-color-divider | color | var(--vsc-min-palette-neutral-300) |
--vsc-min-color-tag-bg | color | var(--vsc-min-palette-neutral-200) |
--vsc-min-color-tag-bg-hover | color | var(--vsc-min-palette-neutral-800) |
--vsc-min-color-tag-accent-off | color | var(--vsc-min-palette-neutral-600) |
--vsc-min-color-btn-primary-bg | color | var(--vsc-min-palette-neutral-800) |
--vsc-min-color-btn-primary-border | color | var(--vsc-min-palette-neutral-800) |
--vsc-min-color-btn-primary-text | color | var(--vsc-min-palette-cream) |
--vsc-min-color-btn-secondary-bg | color | transparent |
--vsc-min-color-btn-secondary-border | color | var(--vsc-min-palette-neutral-300) |
--vsc-min-color-btn-secondary-text | color | var(--vsc-min-color-text) |
--vsc-min-color-toggle-track | color | var(--vsc-min-palette-neutral-700) |
--vsc-min-color-toggle-track-active | color | var(--vsc-min-palette-neutral-900) |
--vsc-min-color-toggle-knob | color | var(--vsc-min-palette-neutral-150) |
--vsc-min-color-media-bg | color | var(--vsc-min-palette-amber-900) |
--vsc-min-color-close-bg | color | var(--vsc-min-palette-neutral-200) |
--vsc-min-color-close-icon | color | var(--vsc-min-palette-neutral-900) |
--vsc-min-color-category-accent | color | var(--vsc-min-palette-accent) |
--vsc-min-color-badge | color | var(--vsc-min-palette-accent) |
--vsc-min-radius-banner | radius | 0.625rem |
--vsc-min-radius-btn | radius | 0.625rem |
--vsc-min-radius-media | radius | 0.5rem |
Install the matching runtime zip plus this skin’s zip — see Installing.