Service NSW package documentation and examples
(Login credentials required)
npm install @servicensw/responsive-table --save-dev
CSS
- PostCSS workflow:
@import '@servicensw/responsive-table';
- Sass/Eyeglass:
@import 'servicensw-responsive-table';
- Native CSS:
@import url('dist/responsive-table.css');
- Link tag:
<link href="dist/responsive-table.css" rel="stylesheet" type="text/css">
JavaScript
import ResponsiveTable from "@servicensw/responsive-table"
new ResponsiveTable("table:has(tbody th):not(.table--not-responsive)")
Legacy usage;
- IIFE:
<script src="dist/responsive-table.js" type="text/javascript"></script>
(initialized for alltable:has(tbody th):not(.table--not-responsive)
elements) - Common JS:
const ResponsiveTable = require("@servicensw/responsive-table")
(initialize yourself)