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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@e280/lettuce

v0.0.2

Published

splitty panelly leafy layouts

Downloads

246

Readme

🥬 lettuce

splitty-panelly tabby draggy-droppy leafy layout ui

  • 👉 https://lettuce.e280.org/ 👈 try it, nerd!
  • it's web components bruh
  • pane splitting, resizing, vertical, horizontal, you get it
  • it's like for editor apps and stuff like https://omniclip.app/
  • uses @benev/slate and lit
  • you can drag-and-drop tabs between panels
    • done efficiently with slots, tab doesn't reinitialize or rerender to move
    • that's actually legit neato if you have heavy-weight stuff in tabs

make a layout salad

  • install it down
    npm install @e280/lettuce
  • html it up
    <lettuce-layout></lettuce-layout>
  • css it this way
    lettuce-layout {
        color: #fff8;
        background: #111;
    
        --scale: 1.5em;
        --highlight: yellow;
        --special: aqua;
        --dropcover: 10%;
        --warn: red;
        --warntext: white;
        --pane: #181818;
        --taskbar: #181818;
        --tab: transparent;
        --gutter: #000;
        --focal: transparent;
        --pointerlock: yellow;
    }
  • javascript it that way
    import {Salad} from "@e280/lettuce"
    import {html, nexus, cssReset} from "@benev/slate"
    
    const lettuce = Salad
      .panels(pan => ({
    
        // example panel using @benev/slate shadowView
        about: pan.shadowView({
          label: "about",
          icon: () => html`🥬`,
          render: use => panel => {
            use.styles(css`h1 {color: skyblue;}`)
            return html`
              <h1>hello</h1>
            `
          },
        }),
    
        // example panel just using lit html
        lit: pan.plain({
          label: "lit",
          icon: () => html`🔥`,
          render: () => html`
            <p>this is an example</p>
          `,
        }),
      }))
    
      // layout configuration
      .layout(layout => ({
        default: layout.single("about"), // when user firsts visits
        empty: layout.single("about"), // when user deletes all panes
      }))
    
      // set lettuce context and register elements to dom
      .setup()

keep yourself organized

  • keep each of your panels in its own file
  • you can use Salad.pan to help with making panels in a type-happy way
    import {Salad} from "@e280/lettuce"
    
    export const aboutPanel = Salad.pan.shadowView({
      label: "about",
      icon: () => html`🥬`,
      render: use => panel => {
        use.styles(css`h1 {color: skyblue;}`)
        return html`
          <h1>hello</h1>
        `
      },
    })

you can do stuff with that lettuce instance

that lettuce instance you get is the context for the layout system.
it has a bunch of facilities and stuff for manipulating the layout and stuff.
i literally don't have time to exhaustively document it rn... plz help.
use your lsp or read lettuce.ts

i made this open sourcedly just for you

pay your respects, gimmie a github star.