Easy to use wrapper component to enable fixed table head in tables
npm install react-sticky-table-thead> Easy to use wrapper component to enable fixed table head in tables
 
``bash`
npm install --save react-sticky-table-thead`
Orbash`
yarn add react-sticky-table-thead
!Alt Text.gif)
`jsx
import React, { Component } from "react"
import StickyTable from "react-sticky-table-thead"
class Example extends Component {
render() {
return (
| Item | Price (TZS) |
|---|---|
| Onion | 200 |
| Tomato | 200 |
| Orange | 200 |
| Banana | 200 |
| Passion | 300 |
| Mango | 300 |
| Apple | 500 |
| Avocado | 500 |
| Guava | 600 |
| Papaya | 800 |
| Watermelon | 1,000 |
| Pineapple | 1,000 |
Props
| Prop | Explanation | Data Type | (Sample) Values | Default |
| ------------- | :-: | :-: | :-: | :-: |
| height | height of table wrapper | Number | `200`
`800`
| `450` |
| hiddenVerticalScrollbar | hide the table vertical scrollbar (scrolling will still be enabled) | Bool | `true`
`false` | `false` |
| hiddenHorizontalScrollbar | hide table horizontal scrollbar (scrolling will still be enabled) | Bool | `true`
`false` | `false` |
| className | table wrapper class (useful for setting table responsiveness: .table-responsive) | String | `".css-class"`
`".table-responsive"` | `""`` |MIT © BossBele