Context7 Docs
Ask about setup, API usage, or styles.Use my own trigger?Set data-custom-trigger; the launcher steps aside.
Ask about the docs...
Documentation as an interface
The page teaches the install paths while demonstrating the design contract: shadow parts, CSS variables, events, custom triggers, and package-level helpers all appear as live surfaces instead of a static README.
context7-widget {
--c7-accent: #7cffb2;
--c7-panel-radius: 8px;
}
context7-widget::part(send-button) {
text-transform: uppercase;
}Three integration paths
Replace the script URL, install the core helpers, or use Vue props and composables when the widget belongs inside a component tree.
The lowest-friction replacement for existing Context7 users. Keep data-library, swap the script origin.
Typed helpers for creating widgets, generating copy-paste script tags, and controlling instances from app code.
A Vue 3 component, composable, plugin helper, typed events, and optional SCSS-built trigger styles.
<script
async
src="https://context7.desource-labs.org/widget.js"
data-library="/vercel/next.js"
data-color="#10b981"
></script>pnpm add @desource/context7-widget
import { mountContext7Widget } from "@desource/context7-widget";
mountContext7Widget({
library: "/vercel/next.js",
theme: "auto",
color: "#10b981"
});pnpm add @desource/context7-widget-vue
<Context7Widget
library="/vercel/next.js"
color="#10b981"
@question="trackQuestion"
/>Live configuration
Change the runtime props, inspect the script tag, then open the same widget instance from the custom trigger.
<script src="https://context7.desource-labs.org/widget.js" async data-backdrop="false" data-close-on-outside-click="true" data-custom-trigger="#context7-lab-trigger" data-launcher-label="Ask docs" data-launcher-variant="pill" data-library="/desource-labs/context7-widget" data-panel-height="460px" data-panel-width="440px" data-placeholder="Ask integration questions..." data-position="anchor" data-preset="glass" data-theme="auto"></script><Context7Widget
library="/desource-labs/context7-widget"
<!-- color omitted: preset owns the action color -->
theme="auto"
position="anchor"
preset="glass"
launcher-variant="pill"
:backdrop="false"
:close-on-outside-click="true"
panel-height="460px"
custom-trigger="#context7-lab-trigger"
launcher-label="Ask docs"
placeholder="Ask integration questions..."
@question="trackQuestion"
/>Use cases
Expose custom properties and shadow parts so the widget can match dense dashboards, editorial docs, or launch pages.
Listen for question, first-token, answer-complete, tool-call, and error events for analytics or user research.
Bind the widget to a header button, command palette, or support menu item; the launcher hides automatically.
Use the same runtime from plain HTML, framework code, Vue apps, and this Nuxt information site.
Maintenance loop
The scanner keeps the official Context7 widget snapshot in the repository and opens an issue when the unversioned script changes, so compatibility work is explicit instead of accidental.
pnpm scan:upstream
# stores:
# upstream/context7-widget.latest.js
# upstream/context7-widget.normalized.js
# upstream/context7-widget.sha256