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

@formitiva/angular

v2.1.2

Published

Formitiva Angular adapter — module, components and services

Readme

@formitiva/angular

npm

Angular adapter for Formitiva — build dynamic, schema-driven forms with a single component.

Features

  • Single component — render any form from a JSON schema with <fv-formitiva />
  • Standalone components — works with both standalone and NgModule-based apps
  • 25+ built-in field types — text, email, phone, dropdown, date, file, rating, slider, unit values, and more
  • Angular signals — context management powered by Angular signals
  • Dynamic validationonEdit, onBlur, or onSubmission modes with built-in and custom validators
  • Conditional visibility — show/hide fields based on other field values via parent-child relationships
  • Computed values — derive field values from other fields automatically
  • Plugin system — register custom components, validators, submission handlers, and visibility rules
  • Theming — CSS variable-based theming with light/dark support
  • Localization — 29+ languages with CDN-based translation loading
  • TypeScript — fully typed API

Installation

npm install @formitiva/angular
# or
pnpm add @formitiva/angular

Peer dependencies: @angular/core >=18, @angular/common >=18, @angular/forms >=18, rxjs >=7

Quick Start

Standalone Component

import { Component } from "@angular/core";
import { FormitivaComponent } from "@formitiva/angular";

const definition = {
  name: "contactForm",
  version: "1.0.0",
  displayName: "Contact Form",
  properties: [
    { name: "fullName", displayName: "Full Name", type: "text", defaultValue: "", required: true },
    { name: "email", displayName: "Email", type: "email", defaultValue: "", required: true },
    { name: "message", displayName: "Message", type: "multiline", defaultValue: "" },
  ],
};

@Component({
  selector: "app-root",
  standalone: true,
  imports: [FormitivaComponent],
  template: `
    <fv-formitiva
      [definitionData]="definition"
      [onSubmit]="handleSubmit"
    ></fv-formitiva>
  `,
})
export class AppComponent {
  definition = definition;

  handleSubmit = (_def: any, _instanceName: any, values: any) => {
    console.log("Submitted:", values);
    return undefined;
  };
}

NgModule

import { NgModule } from "@angular/core";
import { FormitivaModule } from "@formitiva/angular";

@NgModule({
  imports: [FormitivaModule],
})
export class AppModule {}

Inputs

| Input | Type | Default | Description | |---|---|---|---| | definitionData | string \| object \| FormitivaDefinition | — | Form schema (JSON string, object, or typed definition) | | instance | FormitivaInstance | — | Optional saved instance with pre-filled values | | language | string | "en" | Language code for localization | | theme | string | "light" | Theme name ("light" or "dark") | | fieldValidationMode | FieldValidationMode | "onEdit" | When to validate: "onEdit", "onBlur", or "onSubmission" | | displayInstanceName | boolean | true | Show an editable instance name field | | onSubmit | FormSubmissionHandler | — | Callback on form submission | | onValidation | FormValidationHandler | — | Cross-field validation callback |

Services

| Service | Description | |---|---| | FormitivaContextService | Provides form context via Angular signals (language, theme, translation function, etc.) | | FieldValidatorService | Validates fields respecting the current validation mode (change, blur, sync triggers) |

Exported Components

  • FormitivaComponent — main form entry point (<fv-formitiva>)
  • FormitivaRendererComponent — internal renderer
  • All field components (text, email, dropdown, checkbox, etc.)
  • StandardFieldLayoutComponent, FieldRendererComponent, FieldGroupComponent

Extending

Custom Validators

import { registerFieldValidator, registerTypeValidator } from "@formitiva/angular";

registerFieldValidator("myForm", "validateAge", (fieldName, value, t) => {
  if (Number(value) < 18) return t("Must be at least 18");
  return undefined;
});

Submission Handlers

import { registerSubmitter } from "@formitiva/angular";

registerSubmitter("api:saveForm", async (definition, instanceName, values, t) => {
  await fetch("/api/form", { method: "POST", body: JSON.stringify(values) });
  return undefined;
});

Themes

Import a built-in theme CSS file from @formitiva/core:

import "@formitiva/core/themes/material-dark.css";

Or in angular.json:

{
  "styles": ["node_modules/@formitiva/core/themes/material-dark.css"]
}

Or customize via CSS variables:

:root {
  --formitiva-color-primary: #3b82f6;
  --formitiva-color-error: #ef4444;
  --formitiva-border-radius: 8px;
}

Links

License

MIT