@api-viewer/docs

API documentation viewer for Web Components

Usage no npm install needed!

<script type="module">
  import apiViewerDocs from 'https://cdn.skypack.dev/@api-viewer/docs';
</script>

README

@api-viewer/docs

API documentation for Web Components. Based on custom elements manifest JSON format.

<api-docs src="./custom-elements.json"></api-docs>

Documentation →

Live Demo →

Screenshot of api-viewer docs

Install

npm install @api-viewer/docs

Check out the Getting Started guide.

Features

  • Properties - JS properties publicly exposed by the component.
  • Attributes - HTML attributes (except those that match properties).
  • Events - DOM events dispatched by the component.
  • Slots - Default <slot> and / or named slots, if any.
  • CSS Custom Properties - Styling API of the component.
  • CSS Shadow Parts - Elements that can be styled using ::part().