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

formcraft-renderer

v1.1.0

Published

A standalone, zero-dependency vanilla JS form renderer for FormCraft JSON schemas.

Readme

FormCraft Renderer 🎨✨

FormCraft Renderer is a lightweight, zero-dependency vanilla JavaScript library designed to render beautiful, fully-themed forms exported from the FormCraft Builder.

If you've built a form using the FormCraft visual builder, this is the package you need to display it on your website or web application. It handles everything: rendering the inputs, applying the beautiful CSS themes you chose, validating the data, and handling the form submission!

🚀 Features

  • Zero Dependencies: Written in vanilla JavaScript. No heavy frameworks required.
  • Framework Agnostic: Works beautifully with raw HTML, React, Angular, Vue, Next.js, and more.
  • Built-in Theming Engine: Ships with 20+ premium CSS themes (Glassmorphism, Neobrutalism, Cyberpunk, Minimalist, Corporate, etc.).
  • Automatic Validation: Handles required fields, min/max lengths, and email patterns out of the box with zero config.
  • Tiny Footprint: Extremely small bundle size, fast to load, and easy to use.

📦 Installation

You can install formcraft-renderer via npm:

npm install formcraft-renderer

Or, if you aren't using a bundler and just want to drop it into an HTML file, use the jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/formcraft-renderer/src/renderer.js"></script>

💻 How to Use

Using FormCraft Renderer is incredibly simple. All you need is the JSON schema you copied from the FormCraft Builder and an empty HTML <div> to mount the form into.

1. Pure HTML / Vanilla JS

<!-- The container where the form will magically appear -->
<div id="my-form-container"></div>

<!-- Include the library -->
<script src="https://cdn.jsdelivr.net/npm/formcraft-renderer/src/renderer.js"></script>

<script>
  // 1. Paste the schema you exported from the FormCraft builder
  const mySchema = {
    theme: "glass-ethereal",
    fields: [
      { id: "name", type: "text", label: "Full Name", validation: { required: true } }
    ]
  };

  // 2. Render the form!
  FormCraft.render({
    target: '#my-form-container',
    schema: mySchema,
    onSubmit: (formData) => {
      console.log('Yay! The form was submitted:', formData);
      
      // Here you can send the data to your backend, e.g. using fetch()
      // fetch('/api/contact', { method: 'POST', body: JSON.stringify(formData) });
    }
  });
</script>

2. React / Next.js

import { useEffect, useRef } from 'react';
import FormCraft from 'formcraft-renderer';

// Paste your exported schema here
const mySchema = { /* ... */ };

export default function MyContactForm() {
  const formRef = useRef<HTMLDivElement>(null);

  useEffect(() => {
    // We only want to render it once the container is in the DOM
    if (formRef.current) {
      FormCraft.render({
        target: formRef.current,
        schema: mySchema,
        onSubmit: (data) => alert(JSON.stringify(data))
      });
    }
  }, []);

  return <div ref={formRef} />;
}

3. Vue 3

<template>
  <div ref="formRoot"></div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import FormCraft from 'formcraft-renderer';

const formRoot = ref(null);
const mySchema = { /* ... */ };

onMounted(() => {
  if (formRoot.value) {
    FormCraft.render({
      target: formRoot.value,
      schema: mySchema,
      onSubmit: (data) => console.log('Submitted data:', data)
    });
  }
});
</script>

4. Angular

import { Component, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
import FormCraft from 'formcraft-renderer';

@Component({
  selector: 'app-contact-form',
  standalone: true,
  template: '<div #formRoot></div>'
})
export class ContactFormComponent implements AfterViewInit {
  @ViewChild('formRoot') formRoot!: ElementRef;
  
  schema = { /* ... paste schema ... */ };

  ngAfterViewInit() {
    FormCraft.render({
      target: this.formRoot.nativeElement,
      schema: this.schema,
      onSubmit: (data) => console.log('Submitted data:', data)
    });
  }
}

🎨 Changing Themes

You don't need to write any CSS to change the look of your form. The form appearance is entirely driven by the theme property inside your JSON schema.

Just update the theme string in your schema object to immediately transform the design!

Available themes: glass-ethereal, glass-ocean, glass-frost, neo-yellow, neo-pink, neo-mint, neo-mono, cyber-neon, cyber-matrix, cyber-outrun, min-light, min-dark, min-paper, min-clay, corp-blue, corp-slate, corp-emerald, corp-indigo, modern-sunset, modern-lavender, modern-earth.


🤝 Need Help?

FormCraft is an ongoing project. If you find bugs or have feature requests, please check the main repository issues page!

Happy Form Building! 📝✨