w1c-json-viewer

JSON Viewer

w1c-json-viewer renders formatted JSON from a property or text attribute.

import '@w1c/components/json-viewer';
<w1c-json-viewer text='{"status":"ready"}' line-numbers></w1c-json-viewer>

API

  • value: JavaScript object value, set as a property.
  • text: JSON string or source text.
  • indent: JSON indentation size.
  • line-numbers: shows the gutter.

Slots

  • toolbar

Parts

  • chrome
  • toolbar
  • gutter
  • code