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

@c2n/split-panel

v0.0.24

Published

Split panel built with Lit: two panels separated by a divider the user drags (or moves with the keyboard) to resize them.

Readme

@c2n/split-panel

Split panel built with Lit: two panels separated by a divider the user drags (or moves with the keyboard) to resize them.

npm install @c2n/split-panel
<script type="module">
  import '@c2n/split-panel'
</script>

<c2-split-panel position="30" primary="start" style="height: 400px">
  <nav slot="start">Files</nav>
  <main slot="end">Editor</main>
</c2-split-panel>
  • Position: position is the start panel's share in percent (50 by default), bounded by min/max. orientation="vertical" stacks the panels; the host then needs a height.
  • Input: drag the divider with a mouse, touch or pen; or focus it and use the Arrow keys (1%, Shift for 10%), Home/End (min/max) and Enter (collapse the start panel to min, then restore it). The divider is a focusable separator following the WAI-ARIA window splitter pattern; label names it. Right-to-left contexts mirror the keys and the drag.
  • Snapping: snap="25 50 75" makes a drag stick to those positions within snap-threshold pixels (12 by default).
  • Resizing: primary="start" (or end) keeps that panel's pixel size when the host changes size, for a sidebar that should not grow with the window.
  • Events: reposition with detail.position whenever the user moves the divider. It does not bubble, so nested split panels do not hear each other.
  • Nesting: put a second c2-split-panel in a slot for a three-way layout.

Theme it with the __divider group (--c2-split-panel__divider--size, --hit-area, --background and its __hover, __active, __focus and __disabled states), the __handle grip (--c2-split-panel__handle--display: none hides it) and the __panel, __start and __end variables. The full list is in custom-elements.json and on the docs site.