Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-viewer-element

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-viewer-element

Web Components API viewer element

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2K
increased by8.09%
Maintainers
1
Weekly downloads
 
Created
Source

<api-viewer>

API viewer for web-component-analyzer JSON output.

Usage

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

Live Demo ↗

Screenshot of api-viewer element

Preparing a JSON

First, install web-component-analyzer:

npm install -g web-component-analyzer

Analyze your components using --format json:

wca analyze my-element.js --outFile custom-elements.json --format json

Styling

The following custom CSS properties are available:

PropertyDescription
--ave-accent-colorAccent color, used for property names
--ave-border-colorColor used for borders and dividers
--ave-border-radiusBorder radius used for the outer border
--ave-header-colorHeader text color used for tag name
--ave-item-colorAPI items content color (main text)
--ave-label-colorAPI items labels color
--ave-monospace-fontMonospace font stack for the API items
--ave-primary-colorPrimary color, used for header and active tab
--ave-tab-colorInactive tabs color

Contributing

Install dependencies

yarn

Run demo in browser

yarn dev

Open http://127.0.0.1:8081/demo/

Create dist folder

yarn dist

Serve dist folder

yarn serve:dist

Acknowledgements

  • Big thanks to @runem for creating Web Component Analyzer.
  • Thanks to @bahrus for wc-info component which inspired me.
  • The visual appearance is largely inspired by Vuetify API docs.
  • The tabs component is based on the howto-tabs example.

FAQs

Package last updated on 22 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc