Start with a preset
Choose `minimal`, `glass`, `neo`, `terminal`, or `brutalist` as the starting visual language.
Design system contract
Start with a preset, override stable CSS variables, then use shadow parts only for targeted block-level styling. The public surface below is safe to theme without depending on internal class names.
context7-widget[widget-id="docs"] {
--c7-accent: #7cffb2;
--c7-accent-contrast: #07120c;
--c7-font-family: Inter, ui-sans-serif, system-ui, sans-serif;
--c7-panel-background: #101513;
--c7-panel-color: #f7f2e8;
--c7-border-color: rgba(247, 242, 232, 0.18);
--c7-muted-color: rgba(247, 242, 232, 0.66);
}Playbook
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.
Complete variable map
Set these on `context7-widget`, on a scoped instance such as `context7-widget[widget-id="docs"]`, or inside theme/preset selectors. Runtime anchor variables are intentionally not listed because the widget writes them while positioning anchored panels.
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 surface. Prefer variables for colors, radius, spacing, and typography; use parts for layout-neutral changes such as text transform, borders, and component-level shadows.
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-byPowered-by Context7 link.
launcherBuilt-in floating launcher.
Copyable CSS blocks
Rule of thumb
Avoid styling `.c7-*` classes inside the shadow DOM. They are implementation details. The variables and `::part` names documented here are the intended stable customization layer.