Skip to content

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>;
PropTypeRequiredDescription
titlestringnoHeading text. Defaults to "We use cookies". Currently not rendered by this skin.
descriptionReactNodenoBody copy. Accepts any node, so links/emphasis are allowed.
acceptLabelstringnoLabel for the accept button. Defaults to "Accept all cookies".
rejectLabelstringnoLabel for the reject button. Defaults to "Decline cookies".
manageLabelstringnoLabel for the manage button. Defaults to "Manage cookies".
showRejectbooleannoRender the reject button. Set false to force an accept-only banner. Defaults to true.
showManagebooleannoRender the manage button. Set false to hide it (the manage view stays reachable via manageCookies()). Defaults to true.
mediajsonnoMedia shown in the banner view — an image or a video. Set false to hide it. Defaults to the bundled demo image.
positionunionOrJsonnoAnchor 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.
stylejsonnoInline 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.
categoryAccentsjsonnoPer-category accent color overrides, keyed by category name. Falls back to the catalog accent, then to the skin’s accent token.
buttonsjsonnoInline style overrides for individual buttons (background, color, borderColor, borderRadius, …).
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"light" | "dark" | "blur"noVisual mode. Defaults to "light".
<script type="module">
import { defineAll } from "@vscookies/vanilla/define";
import "@vscookies/skin-minimalist-vanilla";
defineAll();
</script>
<vscookies-minimalist mode="light"></vscookies-minimalist>
AttributeTypeDefaultDescription
titlestring—Heading text. Defaults to "We use cookies". Currently not rendered by this skin.
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 all cookiesLabel for the accept button. Defaults to "Accept all cookies".
reject-labelstringDecline cookiesLabel for the reject button. Defaults to "Decline cookies".
manage-labelstringManage cookiesLabel for the manage button. Defaults to "Manage cookies".
show-reject"true" | "false"trueRender the reject button. Set false to force an accept-only banner. Defaults to true.
show-manage"true" | "false"trueRender 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"lightVisual mode. Defaults to "light".

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" });
TokenGroupDefault
--vsc-min-color-accentcolorlight-dark(#2563eb, #60a5fa)
--vsc-min-color-accent-hovercolorlight-dark(#1d4ed8, #3b82f6)
--vsc-min-color-accent-contrastcolorlight-dark(#ffffff, #0b1220)
--vsc-min-color-surfacecolorlight-dark(#ffffff, #111827)
--vsc-min-color-surface-mutedcolorlight-dark(#f9fafb, #1f2937)
--vsc-min-color-surface-blurcolorlight-dark(rgba(255,255,255,0.72), rgba(17,24,39,0.72))
--vsc-min-color-textcolorlight-dark(#111827, #f9fafb)
--vsc-min-color-text-mutedcolorlight-dark(#6b7280, #9ca3af)
--vsc-min-color-bordercolorlight-dark(#e5e7eb, #374151)
--vsc-min-radius-smradius0.5rem
--vsc-min-radius-mdradius0.75rem
--vsc-min-radius-lgradius1.125rem
--vsc-min-radius-xlradius1.25rem
--vsc-min-radius-fullradius9999px
--vsc-min-space-1space0.25rem
--vsc-min-font-familyfontui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif
--vsc-min-font-size-smfont0.875rem
--vsc-min-font-size-mdfont1rem
--vsc-min-font-size-lgfont1.125rem
--vsc-min-font-weight-mediumfont500
--vsc-min-font-weight-semiboldfont600
--vsc-min-font-weight-boldfont700
--vsc-min-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-min-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-min-blur-smeffect0.5rem
--vsc-min-blur-mdeffect0.75rem
--vsc-min-palette-creamcolor#FFFBEB
--vsc-min-palette-neutral-100color#F0F0F0
--vsc-min-palette-neutral-150color#D9D9D9
--vsc-min-palette-neutral-200color#DFDFDF
--vsc-min-palette-neutral-300color#D0D0D0
--vsc-min-palette-neutral-400color#C6C6C6
--vsc-min-palette-neutral-600color#9A9A9A
--vsc-min-palette-neutral-700color#939393
--vsc-min-palette-neutral-800color#1E1E1E
--vsc-min-palette-neutral-900color#000000
--vsc-min-palette-amber-900color#78350F
--vsc-min-palette-accentcolor#00B009
--vsc-min-color-banner-bgcolorvar(--vsc-min-palette-neutral-100)
--vsc-min-color-shell-bgcolorvar(--vsc-min-palette-neutral-200)
--vsc-min-color-panel-bgcolorvar(--vsc-min-palette-neutral-100)
--vsc-min-color-panel-bordercolorvar(--vsc-min-palette-neutral-400)
--vsc-min-color-dividercolorvar(--vsc-min-palette-neutral-300)
--vsc-min-color-tag-bgcolorvar(--vsc-min-palette-neutral-200)
--vsc-min-color-tag-bg-hovercolorvar(--vsc-min-palette-neutral-800)
--vsc-min-color-tag-accent-offcolorvar(--vsc-min-palette-neutral-600)
--vsc-min-color-btn-primary-bgcolorvar(--vsc-min-palette-neutral-800)
--vsc-min-color-btn-primary-bordercolorvar(--vsc-min-palette-neutral-800)
--vsc-min-color-btn-primary-textcolorvar(--vsc-min-palette-cream)
--vsc-min-color-btn-secondary-bgcolortransparent
--vsc-min-color-btn-secondary-bordercolorvar(--vsc-min-palette-neutral-300)
--vsc-min-color-btn-secondary-textcolorvar(--vsc-min-color-text)
--vsc-min-color-toggle-trackcolorvar(--vsc-min-palette-neutral-700)
--vsc-min-color-toggle-track-activecolorvar(--vsc-min-palette-neutral-900)
--vsc-min-color-toggle-knobcolorvar(--vsc-min-palette-neutral-150)
--vsc-min-color-media-bgcolorvar(--vsc-min-palette-amber-900)
--vsc-min-color-close-bgcolorvar(--vsc-min-palette-neutral-200)
--vsc-min-color-close-iconcolorvar(--vsc-min-palette-neutral-900)
--vsc-min-color-category-accentcolorvar(--vsc-min-palette-accent)
--vsc-min-color-badgecolorvar(--vsc-min-palette-accent)
--vsc-min-radius-bannerradius0.625rem
--vsc-min-radius-btnradius0.625rem
--vsc-min-radius-mediaradius0.5rem

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