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

@anjunar/scalajs-ui-forms

v1.1.0

Published

The TypeScript forms API of Scala JS UI 1.0: model-bound inputs, validators, field groups, repeating and nested sub-forms, a combo box, and an image cropper, projected onto the ui.forms components that run in the Scala.js runtime published as @anjunar/sca

Readme

@anjunar/scalajs-ui-forms

Typed Scala JS UI 1.0 forms for model-bound inputs, validators, field groups, nested and repeating forms, combo boxes, and image cropper fields.

Overview

This package projects ui.forms into TypeScript. It does not port validation or DOM behavior: the linked Scala.js runtime performs model binding, validation, input handling, overlays, and crop interaction.

Installation

npm install @anjunar/scalajs-ui-core @anjunar/scalajs-ui-forms @anjunar/scalajs-ui-controls @anjunar/scalajs-ui-viewport @anjunar/scalajs-ui-bridge @anjunar/scalajs-ui

Import @anjunar/scalajs-ui-bridge/forms instead of the bare package to skip installing router/controls/viewport/editor -- see that package's README.

Quick start

import { property } from "@anjunar/scalajs-ui-core";
import { email, form, input, inputContainer, notBlank } from "@anjunar/scalajs-ui-forms";

const model = { name: property(""), email: property("") };

const mounted = form(model, {
  schema: { name: [notBlank()], email: [email()] },
}, () => {
  inputContainer({ label: "Name" }, () => input("name"));
  inputContainer({ label: "Email" }, () => input("email", { type: "email" }));
});

mounted.validate();

Models are records or class instances containing one Property or ListProperty per bindable field. Decorated TypeScript classes can carry validator metadata; explicit schemas are useful for records or dynamic validator lists.

Usage

  • fieldSet groups controls and propagates disabled/error state; it does not create a model binding.
  • arrayForm repeats a body over a ListProperty.
  • subForm binds a nested model through a parent Property.
  • comboBox supports local arrays or list properties and uses a viewport overlay.
  • imageCropper maps a MediaValue and uses the viewport for its dialog.

The validators mirror the Scala annotation set: notNull, notBlank, notEmpty, size, numeric bounds, decimal bounds, digits, pattern, email, and past/future constraints. Decorator counterparts such as @NotBlank() and @Email() are exported as well.

SSR and non-JavaScript behavior

SSR renders native form fields and their values. Hydration adds bidirectional updates, client validation, dropdown behavior, crop interaction, and server-error mapping. Keep the server form usable as HTML when JavaScript is disabled.

API overview

  • form, subForm, arrayForm
  • input, inputContainer, fieldSet
  • comboBox, imageCropper, MediaValue
  • FormHandle, FormOptions, FormSchema, ValidatorSpec
  • Validator functions and decorator classes exported from validators

Related modules