0.0.2 ā€¢ Published 7 years ago

taba v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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