Package Exports
- @jasonshimmy/custom-elements-runtime
Readme
π§© Custom Elements Runtime
Ultra-powerful, 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.
πΉοΈ Try it on Codepen.io.
β¨ 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
- Install:
npm install @jasonshimmy/custom-elements-runtime - Create a Component:
import { component, html } from '@jasonshimmy/custom-elements-runtime';
component('my-counter', (ctx) => html`
<button
class="px-4 py-2 bg-blue-500 text-white rounded"
@click="${() => ctx.count++}"
>Count: ${ctx.count}</button>
`, { state: { count: 0 } });- Use in HTML:
<my-counter></my-counter>- Enjoy instant reactivity and type safety!
π Documentation Index
Explore the full documentation for every runtime feature:
ποΈ Core Concepts
π§© Reactivity & Patterns
- Directives
- Bindings
- Events
- Slot
- Typing Components
- Advanced Usage Patterns
- Cross-Component Communication
π¨ 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.
- β€οΈ Like what you see? Support ongoing development on Patreon
π Support This Project
Custom Elements Runtime is a labor of love built to make modern web development faster and more expressive. If it's helping you build better components, consider supporting me on Patreon to help keep the momentum going.
Your support helps fund continued development, documentation, and community engagement. Every bit helpsβthank you!