ModernTable
Simple modern JavaScript ES6 library that fetches JSON data into an HTML table which displays nicely within a Bootstrap 4 Card.
Notes:
- Only targets modern browsers.
- To help Microsoft phase out IE11 and in anticipation of Bootstrap 5 dropping IE support, IE is not supported.
- Compatible with Bootstrap 4.4.1 and higher.
- Specifically tested with Bootstrap 4.4.1 and 4.5.3.
- Theoretically, this should work with other CSS frameworks. However, this has NOT been tested with other CSS frameworks, so your mileage may vary.
- If number or date formatting are specified in the configuration, but the proper library does not load, this gracefully fails to no formatting.
- Strongly recommended to use ISO 8601 date formats in your source data and configuration. Then use the UI for localization.
Live Demo
https://simplenotsimpler.github.io/modern-table-example/
Getting Started
Documentation
https://simplenotsimpler.github.io/modern-table/
Requires:
- JSON data source
- Container to hold the table
- modern-table.css
Recommended:
- Number formatting: format-intl-number library
- Date formatting: Moment.js
CDN:
-
CSS:
-
JS:
Example
HTML:
<div class="card card-body rounded shadow-lg"> <div id="table-container" class="table-responsive table-height">div> div>