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

very-cool-table

v1.3.2

Published

A very cool table component for Vue 3

Readme

Just a nice table with excel-like copy/paste functionality

You can play with the component and it's props here: very-cool-table storybook

  • Some hotkeys and the selection is buggy in the storybook because of storybook's own keybindings.

Installation

npm i very-cool-table @vueuse/core primevue vue
# optional
npm i primeicons

Setup

Add these to your vue app:

// Provide the PrimeVue plugin to your Vue app
app.use(PrimeVue, {
	/* whatever you like */
});

Optionally add this to your css or main.js/ts:

@import 'very-cool-table/style.css';
@import 'primeicons/primeicons.css';
import 'very-cool-table/style.css';
import 'primeicons/primeicons.css';

Use

Then you can use the <Table> component in your templates:

<script
	setup
	lang="ts"
>
	import { Table } from 'very-cool-table';

	const table = ref({
		'Column 1': ['Row 1', 'Row 2', 'Row 3'],
		'Column 2': ['Row 1', 'Row 2', 'Row 3'],
		'Column 3': ['Row 1', 'Row 2', 'Row 3'],
	});
	// This is also bound to a model because it can be reordered
	// and columns can be added/removed
	const columns = ref(Object.keys(table.value));
</script>

<template>
	<table
		v-model="table"
		v-model:columns="columns"
	/>
</template>

Hotkeys

Some of these are available in the context menu by default.

Columns can also be selected by clicking the header.

  • any text/number / double click: edit selected cell (when multiple cells are selected the last one to be selected is edited, this applies to most operations that work on a single cell)
  • Enter / : for most cells, move to the next cell below, in multiline cells enter inserts a new line
  • Shift + Enter / : move to the previous cell above
  • Tab / : move to the next cell to the right
  • Shift + Tab / : move to the previous cell to the left
  • Ctrl + C: copy selected cells
  • Ctrl + V: paste copied cells, pasting can add rows to the table if the pasted data has more rows than the current size and allowAddRows prop is true.
  • Ctrl + : move column left
  • Ctrl + : move column right
  • Ctrl + A: select all cells
  • Ctrl + Space: select row
  • Ctrl + Shift + Space: select column
  • Ctrl + Enter: add row below
  • Ctrl + Shift + Enter: add column to the right
  • Ctrl + Delete: delete selected rows
  • Ctrl + Shift + Delete: delete selected columns
  • Shift + ( / / / ): extend selection in the direction of the arrow
  • Alt + ( / / / ): move multi-selection
  • Move single selection, jumps to next/previous line/column when at the end of the current line/column:
    • Tab /
    • Shift + Tab /
    • Enter / : Enter doesn't move when editing a multiline cell.
    • Shift + Enter /
  • Esc: exit editing or multi-selection mode
  • Delete: reset selected cells to their default values
  • Alt + R: rename column

Tips

  • You can provide Proxy objects for column mapper props (e.g. columnTypes, defaultColumnValues) so you can do more advanced name matching. e.g:
const columnColors = new Proxy(
	{}, // empty target because it's mandatory
	{
		// prop is the column name
		get: (_target, prop) => {
			if (/important/i.test(prop)) {
				return '#ff5577'; // redish
			}
			if (/optional/i.test(prop))) {
				return '#50c0c0'; // very relaxing light green color
			}
			return 'rgb(0 0 0)'; // black
		},
	},
);
  • To implement custom cells refer to the various cell components like NumberCell in the source code and use the columnToCellComponentTypeMap prop and overrideTypeToCellComponentTypeMap table prop to add or override types mapped by the columnTypes prop.
    • You can also inject the OPERATIONS_SERVICE, KEY_COLUMN and the SELECTION_SERVICE into your custom cell components to access the table operations and selection features.
    • Cells recieve the following props:
      • colName: the name of the column
      • col: the column index in the columns array
      • row: the row index
      • value: the value of the cell (= table[colName][row])
      • readonly: whether the cell is readonly (from the readonlyColumns prop)
      • editing: whether the cell is selected for editing
      • defaultValue: the default value for the cell (from the defaultColumnValues and defaultColumnValue props)
      • precision: the precision for number cells (from the columnPrecisions and defaultColumnPrecision props)
  • The table exposes the above services too so you can control the table programmatically from a parent component through a useTemplateRef or something similar.
  • Play with the component in the storybook to see all the props and features available.

Development

PRs and requests are welcome!