An minimal mobile friendly responsive table
npm install @uidax/responsive-tableCreate your dom like this:
``html`
first name
last name
actions
Leo
Chow
John
Doe
Jane
Doe
The easiest way to use repsonsive-table is to include responsive-table js to your html with:
``
https://cdn.jsdelivr.net/npm/@uidax/responsive-table
Usage:
`javascript`
new ResponsiveTable(options)
To include responsive-table in Node, first install with npm:
``
npm i @uidax/responsive-table
Or yarn:
``
yarn add @uidax/responsive-table
Import:
`javascript`
import ResponsiveTable from '@uidax/responsive-table'
Usage:
`javascript`
new ResponsiveTable(options)
All the options of ResponsiveTable constructor are optional with default value:
`javascript``
new ResponsiveTable({
// string, the table selector.
tableSelector: '.responsive-table',
// string, the max width for media query.
breakPoint: '768',
// string, the label font weight for mobile.
labelFontWeight: '900',
// string, the suffix for label.
labelSuffix: ':',
// string, the margin-right of label.
labelAfterSpace: '12',
// array of number, hidden labels base on INDEX of column.
hiddenLabels: [],
})