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

smarkform

v0.15.0

Published

[![SmarkForm Logo](docs/assets/logo/smarkform.svg)](https://smarkform.bitifet.net)

Downloads

754

Readme

SmarkForm Logo

🚀 Powerful while effortless Markup-driven and Extendable form controller.

NPM Version npm dependencies NPM Downloads jsDelivr Hits License

SmarkForm is a lightweight library designed for front-end developers and designers to enhance HTML forms with powerful features like subforms and dynamic, variable-length lists, context driven hotkeys and more...

🔧 It seamlessly integrates with the DOM to provide a markup-agnostic solution, freeing your form layout from rigid structure and styling constraints while enabling JSON form data import and export and ensuring compatibility with modern workflows.

♿ With a focus on accessibility (a11y), SmarkForm offers configurable hotkeys, smooth navigation, and a low-code experience, making it an extendable and versatile tool for building HTML form applications.

[More...]

30-second Example

A contact form with a dynamic phone-number list — no manual wiring, just markup:

<!-- HTML -->
<div id="myForm">
  <p><input name="name" data-smark placeholder="Name"></p>
  <ul data-smark='{"name":"phones","of":"input"}'>
    <li><input type="tel" data-smark placeholder="Phone"></li>
  </ul>
  <button data-smark='{"action":"addItem","context":"phones"}'>➕ Add phone</button>
  <button data-smark='{"action":"removeItem","context":"phones"}'>➖ Remove</button>
  <button data-smark='{"action":"export"}'>💾 Export JSON</button>
</div>
// JS — one line to initialize
const myForm = new SmarkForm(document.getElementById("myForm"));

// Listen for the exported data
myForm.on("AfterAction_export", ({ data }) => console.log(data));
// → { name: "Alice", phones: ["555-1234", "555-5678"] }

That's it. No schema, no bindings, no callbacks per field.

What SmarkForm Is (and Isn't Yet)

SmarkForm is:

  • ✅ A markup-driven form controller: configuration lives in data-smark attributes, not JavaScript objects.
  • Markup-agnostic: it imposes no HTML structure or CSS — you keep full design freedom.
  • ✅ A tool for JSON-based import/export of complex, nested form data.
  • ✅ Ready for subforms, variable-length lists, context-driven hotkeys, and smooth keyboard navigation.
  • ✅ Stable and in active use, but still pre-1.0 (API may evolve).

Not yet implemented (planned for a future release):

  • ❌ Built-in validation (field-level error messages).
  • ❌ Native <form> tag POST submission — use AfterAction_export + fetch instead.
  • ❌ The "API interface" for dynamic dropdown/select options from a server.

⚠️ SmarkForm is currently at version 0.x. The public API is stable for the implemented features, but breaking changes may still occur before 1.0.

TL;DR

Want to dig deeper right away? Head to the 🔗 Showcase to explore interactive demos — including the example above — that show SmarkForm's full potential at a glance.

Prefer to jump straight into code? Browse 🔗 Live Examples for a collection of ready-to-use, downloadable forms you can run locally and start tinkering with immediately.

Main Features

  • <> Markup agnostic: Maximum decoupling between design and development teams.
  • 🧩 Low code: Markup driven. No manual wiring between controls and fields.
  • 🗂 Subforms: Nested forms to any depth.
  • 📑 Lists: Sortable and variable-length lists (arrays) either of scalars or subforms.
  • 🫳 Configurable hot keys: Context-driven and discoverable keyboard shortcuts.
  • 🫶 Consistent UX: Smooth navigation and consistent behaviour across all forms.
  • {} JSON format: Data is imported / exported as JSON.
  • 🪶 Lightweight: Only ~38KB minified.
  • Accessibility: Focus on UX and accessibility (a11y).
  • 🆓 Dependency-free: No external dependencies required.
  • 💪 Flexible, extendable and more....

Usage and Documentation

For detailed usage instructions and API reference check out 📔 SmarkForm Reference Manual.

  • Check our Showcase for a quick overview of what SmarkForm can do.

  • The Quick Start Guide provides a fast introduction to get you up and running quickly.

  • Don't miss our Live Examples. You can download each one and modify as you like.

  • SmarkForm is available as ESM and UMD modules via NPM or GitHub or via CDN. See Getting SmarkForm for more details.

Troubleshooting and FAQ

For troubleshooting tips and frequently asked questions, please visit SmarkForm's Frequently Asked Questions (FAQ)

Community and Support

If you don't find a solution there, feel free to open a discussion on our GitHub repository.

For further support, you can contact me through our Contact Page or reach out via email at [email protected].

🚀 Stay tuned

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Before contributing, make sure to read our contribution guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MIT

Keywords

front-end – form – form-controller – form-library – json-form – lightweight – vanilla – css-agnostic – DOM – html-form – no-dependencies – a11y