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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@k4k3ru/components-table

v1.2.0

Published

Utility for table component

Readme

Table

@k4k3ru/components-table provides native HTML table styling. The existing editable, sticky-column and outlined variants remain available. table--plain adds a read-only presentation with horizontal dividers, token-based colors/typography and numeric alignment.

@import "@k4k3ru/components-table/dist/style.css";
<div class="table__container table__container--responsive"
     role="region" aria-label="Credit activity" tabindex="0">
  <table class="table table--plain">
    <caption class="table__caption">Credit activity</caption>
    <thead class="table__head">
      <tr class="table__row">
        <th class="table__cell table__cell--header" scope="col">Description</th>
        <th class="table__cell table__cell--header table__cell--numeric" scope="col">Change (ticks)</th>
      </tr>
    </thead>
    <tbody class="table__body">
      <tr class="table__row">
        <td class="table__cell">Signup bonus</td>
        <td class="table__cell table__cell--numeric">+10,000,000</td>
      </tr>
    </tbody>
  </table>
</div>

Use table__caption--hidden to retain the table's accessible name while hiding its caption visually. A responsive container scrolls horizontally; set a content-specific minimum table width in the consuming application when needed. Native table semantics are retained at every width. A keyboard-focusable, named region lets users scroll it.

Public properties for table--plain: --table-background, --table-divider, --table-text, --table-muted, --table-hover, --table-padding-block, --table-padding-inline. Define overrides on the table or a more specific selector. They default to the shared surface, outline and body typography tokens. Logical alignment supports RTL; numeric cells use tabular figures and align to the inline end.

Read-only tables require no JavaScript initializer. Consumers own data, pagination, filtering and loading. A decorative table of shared loading__skeleton cells can mirror the columns inside an aria-hidden="true" wrapper, with a separate loading status label. Do not expose placeholder data to assistive technology.

Build from the design system root: npm run build:table.

References: shadcn Table, and the provided /Users/kakerusato/Downloads/table/ sample (matching the existing component).

Nested collapsible groups

Use native details.table__group, with a direct summary.table__group-summary and div.table__group-content. Groups support Enter/Space, keyboard focus and nested groups without a JavaScript initializer. Omit open to start collapsed. Closing an ancestor preserves descendant open states. Do not add redundant aria-expanded attributes; the browser exposes the native disclosure state.

<details class="table__group" open>
  <summary class="table__group-summary">Venue <span class="table__group-meta">21 symbols</span></summary>
  <div class="table__group-content">
    <details class="table__group" open>
      <summary class="table__group-summary">Spot</summary>
      <div class="table__group-content">
        <!-- Native table with caption, thead and tbody goes here. -->
      </div>
    </details>
  </div>
</details>

Place groups outside a table, or inside a td spanning the relevant columns; never place details directly under table or tbody. Tables retain their native semantics. Consumers own pagination and open-state persistence when recreating DOM. --table-group-indent controls nested indentation. CSS respects RTL and reduced motion.

Compact density

Add table__container--smaller to the direct container of table--plain. This reduces cell typography to the small body token and padding to .5rem vertically and .75rem horizontally. Table alignment, numeric precision and column sizing remain owned by the table/application. Buttons and badges retain their own component sizes. The normal density remains unchanged. Font overrides are available via --table-font-size and --table-line-height.

Smaller size

Use table--smaller on the component root. Cell padding .5rem .75rem, text .875rem; also supports plain tables. Existing table__container--smaller and --smallest are preserved.

See shared sizing guidance and examples.