npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lp-table

v2.2.5

Published

A clean and responsive reflow table written in React.js and CSS. Using media queries to display a stacked view of the table on a mobile device.

Downloads

6

Readme

LP Table

A clean and responsive reflow table written in React.js and CSS. Using media queries to display a stacked view of the table on a mobile device.

Install

npm i lp-table

Descriptions

import LPTable from 'lp-table';

<LPTable
    variant='light' or 'dark'
    tableType='reflow' or 'collapse-rows'
    responsive=true or false
    style={Object of inline styles}
    ths={["Array of strings used for a table headers"]}
    headerCols={[Array of columns to use in the header (only needed for collapse-rows variant)]}
    rows={[Array of "<tr><td>Content</td></tr>" JSX objects]}
/>

Example

import LPTable from 'lp-table';

// Classic reflow table with light vairant table headers
<LPTable
    variant='light'
    tableType='reflow'
    responsive={true}
    ths={['Header 1', 'Header 2', 'Header 3']}
    rows={
        [
        <tr>
            <td data-title="Header 1">Col1</td>
            <td data-title="Header 2">Col2</td>
            <td data-title="Header 3">Col3</td>
        </tr>,
        <tr>
            <td data-title="Header 1">Col4</td>
            <td data-title="Header 2">Col5</td>
            <td data-title="Header 3">Col6</td>
        </tr>,
        <tr>
            <td data-title="Header 1">Col7</td>
            <td data-title="Header 2">Col8</td>
            <td data-title="Header 3">Col9</td>
        </tr>
        ]
    }
/>

// Collapsible row table with dark vairant table headers
<Table
  variant='dark'
  tableType='collapse-rows'
  responsive={true}
  ths={['Header 1', 'Header 2', 'Header 3']}
  headerCols={[0, 1]}
  rows={
    [
      <tr>
        <td data-title="Header 1" data-value="Col1">Col1</td>
        <td data-title="Header 2" data-value="Col2">Col2</td>
        <td data-title="Header 3">Col3</td>
      </tr>,
      <tr>
        <td data-title="Header 1" data-value="Col4">Col4</td>
        <td data-title="Header 2" data-value="Col5">Col5</td>
        <td data-title="Header 3">Col6</td>
      </tr>,
      <tr>
        <td data-title="Header 1" data-value="Col7">Col7</td>
        <td data-title="Header 2" data-value="Col8">Col8</td>
        <td data-title="Header 3">Col9</td>
      </tr>
    ]
  }
/>

Getting Started with Create React App

This project was bootstrapped with Create React App.