Start with a preset
Choose `minimal`, `glass`, `neo`, `terminal`, or `brutalist` as the starting visual language.
Styling contract
Start with a preset, map your product colors and radius to stable variables, then polish exact blocks with shadow parts.
Start here
Choose `minimal`, `glass`, `neo`, `terminal`, or `brutalist` as the starting visual language.
Map product tokens to `--c7-*` variables on the widget host or on one `widget-id` scoped instance.
Use `::part` selectors for direct styling of the panel, launcher, composer, messages, and tool blocks.
Keep internal `.c7-*` selectors out of app CSS. They can change without breaking the public contract.
CSS variables
Set these on `context7-widget`, on a scoped instance such as `context7-widget[widget-id="docs"]`, or inside theme and preset selectors. Use them for brand color, radius, surfaces, message bubbles, controls, and layout dimensions.
Brand color, contrast, text stack, muted text, and focus halo.
--c7-accent--c7-accent-contrast--c7-font-family--c7-muted-color--c7-focus-ringThe main dialog surface, dimensions, border, radius, shadow, spacing, and stacking level.
--c7-panel-background--c7-panel-backdrop-filter--c7-panel-color--c7-panel-width--c7-panel-height--c7-panel-radius--c7-panel-shadow--c7-border-color--c7-spacing--c7-z-indexThe built-in fixed launcher button. Ignored when a custom trigger replaces it.
--c7-launcher-background--c7-launcher-color--c7-launcher-gap--c7-launcher-radius--c7-launcher-shadow--c7-launcher-sizeThe modal/backdrop layer used by centered flows and any explicit backdrop-enabled widget.
--c7-backdrop--c7-backdrop-filterTop and bottom panel chrome.
--c7-header-background--c7-footer-backgroundAssistant, user, and error bubbles.
--c7-message-assistant-background--c7-message-assistant-color--c7-message-user-background--c7-message-user-color--c7-message-radius--c7-error-background--c7-error-colorInput and send control tokens.
--c7-control-background--c7-control-border--c7-control-colorOnly applies to the Vue package managed trigger after importing `@desource/context7-widget-vue/styles.css`.
--c7-vue-trigger-background--c7-vue-trigger-border--c7-vue-trigger-color--c7-vue-trigger-focus--c7-vue-trigger-radius--c7-vue-trigger-shadowShadow parts
Use `::part(...)` when a product system needs direct styling for one stable surface. Prefer variables for colors, radius, spacing, and typography; use parts for borders, shadows, text transform, and focused polish.
backdropBackdrop overlay behind the panel.
panelMain dialog/popover surface.
headerHeader bar containing title and close button.
titleWidget title text.
close-buttonClose icon button.
messagesScrollable message list.
messageAny message bubble.
assistant-messageAssistant message bubble.
user-messageUser message bubble.
error-messageError message bubble.
typingTyping indicator bubble.
tool-callBackend tool-call container.
tool-toggleButton that expands tool results.
code-blockMarkdown code block inside answers.
composerComposer form area.
inputQuestion input.
send-buttonSubmit button.
footerPowered-by footer container.
powered-byAlways-visible Context7 and DeSource Labs attribution.
launcherBuilt-in floating launcher.
CSS recipes
Public styling contract
Avoid styling `.c7-*` classes inside the shadow DOM. They are implementation details. The variables and `::part` names documented here are the stable customization layer.