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

@tapx/columns

v0.1.0

Published

Multi-column layout extension for TipTap

Readme

@tapx/columns

Multi-column layout extension for TipTap. Supports 2 and 3 column layouts with configurable widths, gap, and mobile behaviour.

Installation

npm install @tapx/columns
# or
pnpm add @tapx/columns

Usage

import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'
import { columnsKit } from '@tapx/columns'

const editor = new Editor({
  extensions: [StarterKit, ...columnsKit],
})

// Insert a 2-column block
editor.commands.insertColumns(2)

// Insert a 3-column block
editor.commands.insertColumns(3)

Commands

| Command | Description | |---|---| | insertColumns(count) | Insert a new 2 or 3 column block at the current position | | setColumnCount(count) | Change the column count of the columns block the cursor is in | | setColumnsGap(gap) | Set the gap between columns: 'tight', 'normal' (default), 'wide' | | setColumnsMobileStack(value) | Toggle whether columns stack vertically on mobile (true = stack, default) | | setColumnsLayout(flexValues) | Set the relative widths of each column, e.g. [2, 1] for 2/3 + 1/3 |

Layout presets

// Equal columns
editor.commands.setColumnsLayout([1, 1])

// 2/3 + 1/3
editor.commands.setColumnsLayout([2, 1])

// 1/3 + 2/3
editor.commands.setColumnsLayout([1, 2])

// Three equal columns
editor.commands.setColumnsLayout([1, 1, 1])

// 1/2 + 1/4 + 1/4
editor.commands.setColumnsLayout([2, 1, 1])

Customising allowed content

By default, columns accept standard block nodes (paragraph, heading, lists, blockquote, image). To allow additional node types, extend the Column node:

import { Column, Columns2, Columns3, ColumnsCommands } from '@tapx/columns'

const CustomColumn = Column.extend({
  content: '(paragraph | heading | bulletList | orderedList | blockquote | image | video)+',
})

const editor = new Editor({
  extensions: [StarterKit, CustomColumn, Columns2, Columns3, ColumnsCommands],
})

CSS

The extension renders semantic HTML with data attributes. Style it however you like:

[data-cols] {
  display: flex;
  gap: 1rem; /* normal gap */
}

[data-col-gap="tight"] { gap: 0.5rem; }
[data-col-gap="wide"]  { gap: 2rem; }

[data-col] {
  flex: 1;
  min-width: 0;
}

/* Mobile: stack by default */
@media (max-width: 640px) {
  [data-cols]:not([data-col-mobile="side"]) {
    flex-direction: column;
  }
}

HTML output

<!-- 2-column, wide gap, 2/3 + 1/3, no mobile stack -->
<div data-cols="2" data-col-gap="wide" data-col-mobile="side">
  <div data-col data-col-flex="2">
    <p>Left content</p>
  </div>
  <div data-col>
    <p>Right content</p>
  </div>
</div>

Attributes with default values are omitted from the HTML output to keep markup clean.

License

MIT