Start with a preset
Choose minimal, glass, neo, terminal, or brutalist. Pick the look closest to your site and build from there.
Make it yours
Bring your fonts, colors, and attention to detail into the conversation. Start with a preset, then style the panel, messages, and buttons to match your site.
Start here
Choose minimal, glass, neo, terminal, or brutalist. Pick the look closest to your site and build from there.
Connect your fonts, colors, spacing, and border radius to the widget’s CSS variables.
Style the panel, launcher, input, messages, and code blocks through their public part names.
Use documented variables and parts so your styles do not depend on the widget’s internal markup.
CSS variables
Set these variables on context7-widget for core, or .context7-widget for a native framework package. Style one instance with [widget-id="docs"], or use theme and preset selectors to refine each look.
Accent color, font family, secondary text, and keyboard focus ring.
--c7-accent--c7-accent-contrast--c7-font-family--c7-muted-color--c7-focus-ringPanel background, size, borders, corners, shadow, spacing, and stacking order.
--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 overlay behind a centered dialog or any widget with its backdrop enabled.
--c7-backdrop--c7-backdrop-filterBackground colors for the top and bottom of the panel.
--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-colorBackground, border, and text colors for the input and send button.
--c7-control-background--c7-control-border--c7-control-colorApplies to managed triggers rendered by a native framework package after its stylesheet is imported.
--c7-trigger-background--c7-trigger-border--c7-trigger-color--c7-trigger-focus--c7-trigger-radius--c7-trigger-shadowShadow parts
Style individual elements with ::part(...) on the core custom element, or [part~='...'] in native framework markup. Use these for details beyond the CSS variables, such as a custom border on code blocks or a different header layout.
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
Keep your styles maintainable
CSS variables, core ::part selectors, and framework [part] selectors are the supported styling options. Avoid internal .c7-* classes, which can change between releases.