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

@xniffing/form-engine

v0.2.10

Published

A Vue 3 form engine for building web forms

Readme

Form Engine

A powerful and flexible Vue 3 form engine for building dynamic web forms. This library provides a custom web component that can be easily integrated into any web application, regardless of the framework being used.

NPM Version License: MIT

Features

  • 🎯 Framework-agnostic (works with any web framework or vanilla JS)
  • 🎨 Built with Vue 3 and TailwindCSS
  • 📱 Fully responsive design
  • 🔧 Supports multiple input types:
    • Text
    • Integer
    • Date
    • Boolean (checkbox)
    • Single Selection (radio)
    • Multi Selection (checkboxes)
    • File Upload (with image preview)
    • Sections
    • Separators
  • 🖼️ Image support for options and elements
  • ✨ Real-time validation
  • 🔄 Two-way data binding
  • 📦 Easy to integrate
  • 🎯 TypeScript support

Installation

NPM

npm install @xniffing/form-engine

Yarn

yarn add @xniffing/form-engine

PNPM

pnpm add @xniffing/form-engine

Usage

Basic Integration

  1. HTML Integration
<!DOCTYPE html>
<html>
    <head>
        <script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
        <script src="https://unpkg.com/@xniffing/form-engine"></script>
    </head>
    <body>
        <form-engine-builder></form-engine-builder>
    </body>
</html>
  1. Module Integration
import FormEngine from '@xniffing/form-engine';
import '@xniffing/form-engine/style.css';
// The component is automatically registered as a web component

Updating Form Data

The form engine listens for the updateVModelData event to receive form data:

const formData = {
  "Form Version": {
    "Form Name": "My Form",
    "Elements": [
      {
        "GUID": "element1",
        "Name": "Full Name",
        "Description": "Enter your full name",
        "Is Mandatory": 1,
        "Type": "TEXT",
        "Value": ""
      }
      // ... more elements
    ]
  }
};

// Dispatch the event with form data
const event = new CustomEvent('updateVModelData', {
  detail: formData
});
window.dispatchEvent(event);

Form Data Structure

Element Types

The form engine supports the following element types:

  • TEXT: Text input
  • INTEGER: Number input
  • DATE: Date picker
  • BOOLEAN: Checkbox
  • SINGLESELECTION: Radio buttons
  • MULTISELECTION: Multiple checkboxes
  • UPLOAD: File upload with image preview
  • SECTION: Section header
  • SEPARATOR: Visual separator

Example Form Structure

{
  "Form Version": {
    "Form Name": "Sample Form",
    "Elements": [
      {
        "GUID": "unique-id-1",
        "Name": "Personal Information",
        "Description": "Please fill in your details",
        "Object": "SECTION",
        "Is Mandatory": 0
      },
      {
        "GUID": "unique-id-2",
        "Name": "Full Name",
        "Description": "Enter your full name",
        "Type": "TEXT",
        "Is Mandatory": 1,
        "Value": ""
      },
      {
        "GUID": "unique-id-3",
        "Name": "Age",
        "Type": "INTEGER",
        "Is Mandatory": 1,
        "Value": null
      },
      {
        "GUID": "unique-id-4",
        "Name": "Profile Picture",
        "Type": "UPLOAD",
        "Is Mandatory": 0,
        "FileTypes": ["image/*"]
      }
    ]
  }
}

Events

Input Events

The form engine emits the following events:

  • submit: Triggered when the form is submitted with valid data
  • error: Triggered when there's a validation error

Event Handling

const formEngine = document.querySelector('form-engine-builder');

formEngine.addEventListener('submit', (event) => {
  const formData = event.detail;
  console.log('Form submitted:', formData);
});

formEngine.addEventListener('error', (event) => {
  const errorMessage = event.detail;
  console.error('Form error:', errorMessage);
});

Styling

The form engine uses TailwindCSS for styling and provides a clean, modern interface out of the box. Custom styles can be applied by targeting the form engine's shadow DOM elements.

Development

Prerequisites

  • Node.js 18.x or higher
  • npm, yarn, or pnpm

Setup

# Clone the repository
git clone https://github.com/yourusername/form-engine.git

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Scripts

  • npm run dev: Start development server
  • npm run build: Build for production
  • npm run preview: Preview production build
  • npm run version:patch: Bump patch version
  • npm run version:minor: Bump minor version
  • npm run version:major: Bump major version

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.