# @uidax/responsive-table

> An minimal mobile friendly responsive table

Latest version **1.0.15** (published 2020-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @uidax/responsive-table
pnpm add @uidax/responsive-table
yarn add @uidax/responsive-table
bun add @uidax/responsive-table
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.15 |
| Published | 2020-08-18 |
| First published | 2020-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Leo Chow |
| Maintainers | leochow |
| Keywords | responsive table, mobile table, mobile friendly table |

## Links

- npm: https://www.npmjs.com/package/@uidax/responsive-table
- Repository: https://github.com/uidax/responsive-table
- Homepage: https://github.com/uidax/responsive-table#readme
- Issues: https://github.com/uidax/responsive-table/issues
- npm.io page: https://npm.io/package/@uidax/responsive-table

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.15 (latest) — 2020-08-18

## README

# responsive-table
Minimal mobile friendly responsive table

## Usage

Create your dom like this:

```html
<table class="repsonsive-table">
  <thead>
    <tr>
      <th>first name</th>
      <th>last name</th>
      <th>actions</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Leo</td>
      <td>Chow</td>
      <td>
        <button>edit</button>
        <button>delete</button>
      </td>
    </tr>
    <tr>
      <td>John</td>
      <td>Doe</td>
      <td>
        <button>edit</button>
        <button>delete</button>
      </td>
    </tr>
    <tr>
      <td>Jane</td>
      <td>Doe</td>
      <td>
        <button>edit</button>
        <button>delete</button>
      </td>
    </tr>
  </tbody>
</table>
```

### CDN

The easiest way to use repsonsive-table is to include responsive-table js to your html with:

```
https://cdn.jsdelivr.net/npm/@uidax/responsive-table
```

Usage:

```javascript
new ResponsiveTable(options)
```

[Example on codesandbox](https://codesandbox.io/s/responsive-table-cdn-mgqtk)

### Node

To include responsive-table in Node, first install with npm:

```
npm i @uidax/responsive-table
```

Or yarn:

```
yarn add @uidax/responsive-table
```

Import:

```javascript
import ResponsiveTable from '@uidax/responsive-table'
```

Usage:

```javascript
new ResponsiveTable(options)
```

[Example on codesandbox](https://codesandbox.io/s/responsive-table-node-bf5i7)

## Options

All the options of ResponsiveTable constructor are optional with default value:

```javascript
new ResponsiveTable({
  // string, the table selector.
  tableSelector: '.responsive-table',
  // string, the max width for media query.
  breakPoint: '768',
  // string, the label font weight for mobile.
  labelFontWeight: '900',
  // string, the suffix for label.
  labelSuffix: ':',
  // string, the margin-right of label.
  labelAfterSpace: '12',
  // array of number, hidden labels base on INDEX of column.
  hiddenLabels: [], 
})
```

## License

[The MIT License](https://github.com/uidax/responsive-table/blob/master/LICENSE).

---
_Source: https://npm.io/package/@uidax/responsive-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
