JSPM

  • Created
  • Published
  • Downloads 199
  • Score
    100M100P100Q97115F
  • License MIT

A powerful, modern, and lightweight runtime for creating reactive web components with TypeScript

Package Exports

  • @jasonshimmy/custom-elements-runtime
  • @jasonshimmy/custom-elements-runtime/runtime.d.ts

Readme

🧩 Custom Elements Runtime

Ultra-lightweight, type-safe runtime for fast, reactive, and maintainable web components.

Build modern components with strict TypeScript, zero dependencies, and a clean functional API. Designed for speed, standards compliance, and productivity.

🚧 Active Development Notice

⚠️ This package is in active development and not yet ready for production use. Features, APIs, and stability may change frequently. Please use for testing, experimentation, or contribution only.

✨ Why You'll Love It

  • ⚑ Blazing Fast: Minimal runtime, instant updates, zero dependencies.
  • 🎨 JIT CSS: On-demand, utility-first styling directly in your HTML at runtime.
  • πŸ’ͺ No Build Necessary: Instant development feedback, no bundling required.
  • πŸ§‘β€πŸ’» TypeScript First: Strict types, intellisense, and safety everywhere.
  • 🧩 Functional API: No classes, no boilerplateβ€”just pure functions.
  • πŸ› οΈ SSR & HMR Ready: Universal rendering and instant hot reloads.
  • πŸ”Œ Extensible: Directives, event bus, store, and more for advanced use cases.
  • πŸ† Developer Friendly: Clean docs, examples, and a welcoming community.

⏱️ Getting Started

  1. Install: npm install @jasonshimmy/custom-elements-runtime
  2. Create a Component:
import { component, html } from '@jasonshimmy/custom-elements-runtime';

component('my-counter', (ctx) => html`
  <button
    @click="${() => ctx.count++}"
  >Count: ${ctx.count}</button>
`, { state: { count: 0 } });
  1. Use in HTML:
<my-counter></my-counter>
  1. Enjoy instant reactivity and type safety!

πŸ“– Documentation Index

Explore the full documentation for every runtime feature:

πŸ—οΈ Core Concepts

🧩 Reactivity & Patterns

🎨 Styling

⚑ Performance & Architecture

πŸ›‘οΈ Error Handling & Lifecycle

🧰 Utilities & Troubleshooting

πŸ”— Framework Integration

For deep dives, see each guide above or browse the source code in src/lib/.

πŸ§‘β€πŸ”¬ Real-World Examples

🌟 Showcase & Community

  • Showcase your components! Open a PR to add your project to our gallery.
  • Questions or ideas? Start a discussion or open an issue.
  • Contribute: We welcome PRs for docs, features, and examples.

πŸ›  Local Dev

# Clone the repo
git clone <repo-url>

# Run examples
npm run dev