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

@3mo/splitter

v0.2.4

Published

Web components for panes resized by dragging a line or knob between them, horizontally or vertically.

Readme

Splitter

Web components for panes resized by dragging a line or knob between them, horizontally or vertically.

npm Documentation

A layout of items the user resizes by dragging the resizers between them.

Installation

npm install @3mo/splitter
import '@3mo/splitter'

Usage

<mo-splitter direction='horizontal' style='height: 500px'>
	<mo-splitter-item size='60%'>
		<div style='background: rgba(0, 128, 128, 0.3)'>Item 1</div>
	</mo-splitter-item>
	<mo-splitter-item>
		<div style='background: rgba(255, 192, 203, 0.3)'>Item 2</div>
	</mo-splitter-item>
</mo-splitter>

Examples

  • Directions — The four directions, in order: horizontal, horizontal-reversed, vertical, which is the default, and vertical-reversed.
  • Sizes — size sets where an item starts and min how far it can shrink - drag either resizer toward the narrow items to feel them stop.
  • Nested — A splitter inside an item splits it again, along the other direction or the same one.
  • Collapsible Items — A collapsed item shrinks to its content and gives its space to the others; here each card collapses the item it sits in.
  • Custom Resizer — resizerTemplate replaces the knob between the items, here with mo-splitter-resizer-line.
  • Custom Properties — The knob and the line take their colors from custom properties, and the line also its thickness.

API

mo-splitter

Properties

| Name | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | direction | direction | FlexDirection | "vertical" | The direction in which the items are laid out; vertical by default | | resizerTemplate | resizerTemplate | HTMLTemplateResult | | The template of the resizer between two items; mo-splitter-resizer-knob by default |

Slots

| Name | Description | | --- | --- | | (default) | The mo-splitter-item elements |

CSS parts

| Name | Description | | --- | --- | | resizer-host | The element around each resizer |

mo-splitter-item

An item of a splitter, resized by the resizers beside it.

Properties

| Name | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | size | size | string \| undefined | | The initial size along the splitter's direction, such as 60%; the last item takes the rest | | min | min | string \| undefined | | The minimum size along the splitter's direction | | collapsed | collapsed | boolean | false | Whether the item shrinks to its content and leaves its space to the others |

Slots

| Name | Description | | --- | --- | | (default) | The content of the item |

mo-splitter-resizer-host

Properties

| Name | Attribute | Type | Default | | --- | --- | --- | --- | | direction | direction | FlexDirection \| undefined | | | resizing | resizing | boolean | false | | collapsed | collapsed | boolean | false |

Events

| Name | Detail | Description | | --- | --- | --- | | resizeStart | void | | | resize | { readonly x: number; readonly y: number; } | Where the pointer is while resizing, in client coordinates. | | resizeStop | void | |

mo-splitter-resizer-knob

A rounded knob between two splitter items, the default resizer.

Properties

| Name | Attribute | Type | Default | | --- | --- | --- | --- | | hostDirection | hostDirection | FlexDirection \| undefined | | | hostResizing | hostResizing | boolean | false | | hostHover | hostHover | boolean | false |

CSS custom properties

| Name | Description | | --- | --- | | --mo-splitter-resizer-knob-background | The color of the knob | | --mo-splitter-resizer-knob-active-background | The color of the knob while hovered or dragged |

mo-splitter-resizer-line

A thin line between two splitter items, as an alternative resizer.

Properties

| Name | Attribute | Type | Default | | --- | --- | --- | --- | | hostDirection | hostDirection | FlexDirection \| undefined | | | hostResizing | hostResizing | boolean | false | | hostHover | hostHover | boolean | false |

CSS custom properties

| Name | Description | | --- | --- | | --mo-splitter-resizer-line-thickness | The thickness of the line | | --mo-splitter-resizer-line-idle-background | The color of the line | | --mo-splitter-resizer-line-accent-color | The color of the line while hovered or dragged | | --mo-splitter-resizer-line-transition-quick | The transition of the line | | --mo-splitter-resizer-line-vertical-transform | The transform of a line between vertically laid out items while hovered or dragged | | --mo-splitter-resizer-line-horizontal-transform | The transform of a line between horizontally laid out items while hovered or dragged |

Links

License

MIT © 3MO GmbH