@peculia/slim-table
v0.0.6
Published
Lightweight mobile table web component
Downloads
9
Maintainers
Readme
Simple Tabular Data Display For Small Mobile Devices
1. Example Usage - Vanilla Js/HTML
//Inside index.html`
............
<script src='https://unpkg.com/@peculia/slim-table@latest/dist/peculia-slim-table/peculia-slim-table.js'></script>
<slim-table title="My awsome title"></slim-table>
<script>
const testData = {
rowHeaders: ["language", "description", "age", "rating"],
dataPoints: [
{
language: "JS",
description: "Client side web scripting language",
age: 25,
rating: 3.5
},
{
language: "Java",
description: "Multi-purpose cross platform language",
age: 225,
rating: 4.5
},
{
language: "Py",
description: "Client side web scripting language",
age: 15,
rating: 4.95
}
]
};
const customTableElem = document.querySelector('slim-table');
if(customTableElem){
customTableElem.data = testData;
}
</script>
- .......