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

@sometic/elements

v1.1.5

Published

Vanilla custom elements powered by Sometic primitive engines.

Readme

@sometic/elements

Vanilla custom elements (sometic-*) powered by Sometic DOM engines.

@sometic/elements registers light-DOM-first Web Components that wrap the same controllers and resolvers used by framework adapters. Tags such as sometic-button, sometic-input, sometic-dialog, and sometic-form give HTML-first apps (or progressive enhancement stacks) a component surface without pulling React or Vue.

These elements exist so Vanilla, HTMX-adjacent, and multi-framework teams can share one behavior model. Engines live in @sometic/dom; elements are a thin custom-element shell that maps attributes, slots, and sometic-* events onto those engines. Optional Shadow DOM is available via a shadow attribute where supported, but Light DOM remains the default for form association and consumer styling.

Standout features include grouped registration helpers (registerButtonElements, registerInputElements, registerOverlayElements, …), typed custom events (SometicValueChangeDetail, SometicFormSubmitDetail, SometicOpenChangeDetail), and subpath imports (@sometic/elements/button, @sometic/elements/input, @sometic/elements/form, @sometic/elements/overlay) so you only register the families you need. Side-effect imports define the sometic-* tags once per registry.

Ecosystem placement: elements depend on @sometic/dom, @sometic/forms, @sometic/validation, and @sometic/auth for status/form wiring, while foundation utilities come from @sometic/core. Start with the introduction and the Vanilla guide.

Install

pnpm add @sometic/elements
npm install @sometic/elements
yarn add @sometic/elements

Usage

Register button elements, then use them in HTML:

import { registerButtonElements } from "@sometic/elements/button";

registerButtonElements();
<sometic-button type="button" size="md" variant="primary"> Save </sometic-button>

<sometic-async-button> Run action </sometic-async-button>

Register overlays and listen for open changes:

import { registerOverlayElements, type SometicOpenChangeDetail } from "@sometic/elements/overlay";

registerOverlayElements();

const dialog = document.querySelector("sometic-dialog");
dialog?.addEventListener("open-change", (event) => {
    const detail = (event as CustomEvent<SometicOpenChangeDetail>).detail;
    console.log("open", detail.open);
});

CDN

Docs: https://sometic.dev/frameworks/vanilla.

Simple script

<script src="https://cdn.jsdelivr.net/npm/@sometic/[email protected]/dist/cdn/sometic-elements.iife.js"></script>

<sometic-button type="button">Save</sometic-button>

Module script

<script
    type="module"
    src="https://cdn.jsdelivr.net/npm/@sometic/[email protected]/dist/cdn/sometic-elements.esm.js"
></script>

<sometic-button type="button">Save</sometic-button>

Peers / when not to use

No framework peers. Dependencies include @sometic/dom, @sometic/forms, @sometic/validation, @sometic/auth, and date packages for date inputs.

Prefer framework adapters (@sometic/react, @sometic/vue) when you want JSX/SFC components with framework lifecycle. Prefer raw @sometic/dom when you need controllers without custom elements. Do not import element side-effect barrels on the server without a custom-elements-safe guard.

Docs

License

MIT