tablewrap is a small javascript helper that wraps your html tables on small viewports column-wise.
- no modification of existing css styles needed
- no extra markup needed
- performant and lightweight
- comes as an es6 module
- cross-browser-support (ie11)
- support for preserving the first column
npm install tablewrap
import Tablewrap from 'tablewrap';
document.addEventListener('DOMContentLoaded', () => {
let tablewrap = new Tablewrap({
selector: 'table',
breakpoint: 700,
preserveFirstCol: true
});
tablewrap.destroy();
});