HTML JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
example/webpack
images
lib
src/styles
test
.babelrc
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
bower.json
bs-config.js
build.js
dev-server.js
package.json
prod.js
rollup.config.js
screenshot.gif
yarn.lock

README.md

Taba

🔧 Fixed table that works with pure JavaScript

screenshot

Install, or Download

yarn add taba
npm i -S taba

Or access to releases page. Then, download the latest version.

Usage

import Taba from 'taba';

const data =

new Taba({
  target: getElementById('target')
  data: {
    style: {
      // defaults
      height: 'auto',
      width: '100%',
      cellPadding: '1em',
      baseColor: '#f3f3f3',
      subColor: '#ccc',
      fixedElementColor: '#fff',
      shadowColor: '#222'
    }
    data: {
      header: {
        data: [...],
        fixed: true
      },
      body: {
        data: [
          [...],
          [...],
          [...]
        ],
        // Even though scrolling horizontally,
        // the first column is displayed all the time
        fixed: 1,
        // Zip this.data
        // Using lodash.zip
        zip: false
      },
      footer: {
        data: [...],
        fixed: false
      }
    }
  }
});

Example

  • test/fixtures/index.js
  • example/webpack/index.js

LICENSE

The MIT License (MIT)

Copyright (c) 2017 nju33 nju33.ki@gmail.com