@current-docs/embed-wc
v0.1.0
Published
<current-docs> web component: embed a hosted Current docs site in any page with one script tag and one element, no React required.
Readme
@current-docs/embed-wc
<current-docs>: a dependency-free web component that embeds a hosted Current docs site in any page via a sandboxed iframe. No React, no build step in the host. Hosts that run React and want themeable, first-class embedding should use @current-docs/embed instead.
Install
npm install @current-docs/embed-wcOr load dist/current-docs.js directly with a script tag.
Usage
<script type="module" src="/node_modules/@current-docs/embed-wc/dist/current-docs.js"></script>
<current-docs
src="https://docs.example.com"
page="docs/guides/tasks-api"
height="600px">
</current-docs>Attributes: src (docs site origin), page (path within the site), height (frame height). Style the frame with the CSS variables --current-docs-border and --current-docs-radius.
