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

elegance-js

v3.2.3

Published

Elegance is the web-framework of the future. With FS-routing, dynamic SSR, middleware, type-safety, JSX, automatic Image optimization, zero client dependencies, and blazing speed; with Elegance you can create safer, faster and simpler web.

Readme

Elegance

Our Website

Elegance is the web-framework of the future. With FS-routing, dynamic SSR, middleware, type-safety, JSX, automatic Image optimization, zero client dependencies, and blazing speed; with Elegance you can create safer, faster and simpler web.

Features

  • Ridiculous speed: Up to ~24x faster build times compared to Next.JS, and up to ~1400x raw RPS on API Routes.
  • Optimized: 4KB client runtime
  • File‑system routing: pages and API endpoints are defined by the directory structure.
  • TSX support: use TSX with no runtime overhead.
  • Server & Client hybrid: You can write server & client-code in 1 file with no issues.
  • Reactive: atoms and components with automatic dependency tracking.
  • Dynamic rendering: opt into per‑request rendering or statically enumerate paths.
  • Server Actions: Inline API routes into your page files for faster development times.
  • Middleware: scoped request processing with the ability to pass data to downstream handlers.
  • Built‑in bundling: code splitting and advanced dead‑code elimination (DCE).
  • API routes: define GET, POST, PUT, DELETE, and OPTIONS handlers.
  • Styling: CSS, CSS Modules, and hooks for Sass/PostCSS/Tailwind.
  • Image Optimization: Reference 10Mb images in your code with no worries, Elegance automatically generates resized versions for all necessary sizes.

Quick Start

npx create-elegance-app my-app
cd my-app
npx elegance

Visit http://localhost:3000 to see the default page.

Example

A simple counter:

const counter = atom(0);

export default function CounterPage() {
    return div(
        button({
            onClick: () => counter.value++,
        }, 
            `Counter: ${counter.value}`
        )
    );
}

// JSX is also supported!

A reusable component version:

const Counter = component({
    atoms: {
        counter: 0,
    },
    view(_, { counter }) {
        return button({
            onClick: () => counter.value++,
        }, 
            `Counter: ${counter.value}`
        );
    }
});

export default function Page() {
    return Counter();
}

Styling

Extending styling is incredibly easy. Import stylesheets from any page, layout, or client component with no hassle.

import "./styles/global.css";          // global stylesheet
import styles from "./hero.module.css"; // CSS Module

export default function Page() {
    return div({ className: styles.hero }, "Scoped!");
}
import sass from "sass";

export const config: EleganceConfig = {
    css: {
        transformers: [
            { test: /\.scss$/, transform: (source, file) => sass.compileString(source, { loadPaths: [file] }).css },
        ],
    },
};

.scss, .sass, .less, .styl, .pcss/.postcss and .css files are all picked up automatically.

Project Structure

my-app/
├── pages/
│   ├── page.tsx          # / (home)
│   ├── about/
│   │   └── page.tsx      # /about
│   ├── api/
│   │   └── route.ts      # /api/*
│   ├── [slug]/
│   │   └── page.tsx      # dynamic routes
│   └── middleware.ts     # global middleware
└── ...

Documentation

Full documentation is available via Our Website Performance results, as well as methodology are available here

License

MIT