Installation
npm i @vanillawc/wc-csv-table
Import from NPM
<script type="module" src="node_modules/@vanillawc/wc-csv-table/index.js"></script>
Import from CDN
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-csv-table@1/index.js"></script>
Try it on WebComponents.dev
Attributes
src
- load an external CSV fileno-headers
- there is no header row
Properties
value
- get/set the editor's contentsnoHeaders
-no-headers
as a property
<wc-csv-table src="sample.csv"></wc-csv-table>
Use no-headers
if your data doesn't contain row headers
<wc-csv-table src="sample2.csv" no-headers></wc-csv-table>
By default, <wc-csv-table>
contains an un-styled <table>
element in the lightDOM. That means, it will inherit any global CSS styles present on the site and can be styled directly using CSS.
See CONTRIBUTING.md