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

@preforms/angular

v0.1.2

Published

Angular renderer and field components for Preforms dynamic forms.

Readme

@preforms/angular

Define fields. Attach triggers. Let the form handle the rest.

Angular renderer and field components for Preforms, a TypeScript-first form engine that makes complex forms feel simple.

  • Async validation? One trigger.
  • Dependent selects from an API? One projection.
  • Dynamic cart validation? One aggregate.
  • Lazy-loaded custom fields? Built in.
  • A Pokemon battle powered by form state? Somehow, yes.

Full docs and examples ->

Quick Start

npm i @preforms/ts @preforms/angular @angular/cdk

@preforms/ts defines the field models and trigger types, while @preforms/angular renders them. @angular/cdk powers drag-and-drop array fields.

import { Component } from "@angular/core";
import { Preforms } from "@preforms/angular/core";
import { NATIVE_FORM_ELEMENTS } from "@preforms/angular/native";
import { EmailField, PasswordField, SubmitButton } from "@preforms/ts";

@Component({
  selector: "app-login",
  imports: [Preforms],
  providers: [NATIVE_FORM_ELEMENTS],
  template: `<preforms [fields]="fields" />`,
})
export class LoginComponent {
  fields = [new EmailField(), new PasswordField(), new SubmitButton("Sign in")];
}

Why It Feels Different

A field can declare behavior, not just shape:

new UserName({
  required: true,
  triggers: [
    {
      on: FormFieldEventType.CHANGE,
      action: TriggerAction.VALIDATE_ASYNC,
      fetchUrl: "/api/check-username/$value",
    },
  ],
});

That field validates itself through the form engine. No component subscription, no custom validator class, no state glue.

API Data Becomes Form State

triggers: [
  {
    on: FormFieldEventType.INIT,
    action: TriggerAction.FETCH,
    fetchUrl: "https://pokeapi.co/api/v2/type/", // yes, really
    mode: "patch",
    projection: {
      target: "options",
      source: "results",
      select: {
        value: "url",
        label: "name",
      },
    },
  },
];

Fetch remote data on init, project it into the shape the field needs, and patch the form before the user touches anything.

Lazy Custom Fields

Custom fields are just field models plus Angular components:

export class EditorField extends FormField<string> {
  constructor(key: string) {
    super({ component: "editor", key });
  }
}
provideDynamicFormLazyFields([
  {
    type: "editor",
    loader: () => import("./editor.component").then((m) => m.EditorComponent),
  },
]);

Heavy controls, editors, pickers, and custom UI can load only when the form actually needs them.

Entry Points

import { Preforms } from "@preforms/angular/core";
import { NATIVE_FORM_ELEMENTS } from "@preforms/angular/native";
import { MATERIAL_FORM_ELEMENTS } from "@preforms/angular/material";

Native controls are included. For Material components, install Angular Material:

npm i @angular/material

License

MIT