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

@squaredr/fieldcraft-react

v1.0.1

Published

React renderer for @squaredr/fieldcraft-core — 35+ pre-built form fields, hooks, theming, and a pluggable field registry. Styled with Tailwind CSS via shadcn/ui primitives.

Readme

@squaredr/fieldcraft-react

React renderer for @squaredr/fieldcraft-core — 35+ pre-built form fields, hooks, theming, and a pluggable field registry. Styled with Tailwind CSS via shadcn/ui primitives.

Install

npm install @squaredr/fieldcraft-core @squaredr/fieldcraft-react

Quick Start

import { FormEngineRenderer } from "@squaredr/fieldcraft-react";
import type { FormEngineSchema, FormResponse } from "@squaredr/fieldcraft-core";

const schema: FormEngineSchema = {
  id: "feedback",
  version: "1.0.0",
  title: "Feedback",
  submitAction: { type: "callback" },
  sections: [
    {
      id: "main",
      title: "Your Feedback",
      questions: [
        { id: "name", type: "short_text", label: "Name", required: true },
        { id: "rating", type: "rating", label: "How would you rate us?", config: { maxStars: 5 } },
        { id: "comments", type: "long_text", label: "Comments" },
      ],
    },
  ],
};

function App() {
  const handleSubmit = async (response: FormResponse) => {
    console.log(response);
  };

  return <FormEngineRenderer schema={schema} onSubmit={handleSubmit} />;
}

That's it. FormEngineRenderer creates its own engine, renders all fields, handles validation, and calls your onSubmit callback.

Styling

Import the pre-built stylesheet in your app entry point:

import "@squaredr/fieldcraft-react/styles.css";

Or if you use Tailwind CSS v4, import the shared theme and scan the component sources directly:

@import "@squaredr/fieldcraft-react/../tooling/tailwind-config/theme.css";
@source "node_modules/@squaredr/fieldcraft-react/src/components/**/*.tsx";

Components

Core

| Component | Description | |-----------|-------------| | FormEngineRenderer | Full form renderer — pass a schema and get a working form | | SectionRenderer | Renders a single section of fields | | FieldRenderer | Renders a single field by type | | ProgressBar | Multi-section progress indicator | | NavigationButtons | Back/Next/Submit buttons | | ErrorSummary | Validation error list | | CompletionScreen | Post-submit confirmation |

Field Types (35+)

Text: ShortTextField, LongTextField, EmailField, PhoneField, PhoneInternationalField, UrlField, LegalNameField

Numeric: NumberField, SliderField, RatingField, NpsField, LikertField, OpinionScaleField

Selection: SingleSelectField, MultiSelectField, DropdownField, BooleanField, CountrySelectField, RankingField

Date/Time: DateField, DateRangeField, TimeField, AppointmentField

Media: FileUploadField, SignatureField, ImageCaptureField

Advanced: AddressField, PaymentField, MatrixField, RepeaterField, CalculatedField, HiddenField, ScoringField

Structural: ConsentField, InfoBlockField

Hooks

import { useFormEngine } from "@squaredr/fieldcraft-react";

function CustomForm() {
  const engine = useFormEngine(schema);
  // engine.state, engine.setValue, engine.validate, etc.
}

| Hook | Description | |------|-------------| | useFormEngine(schema, options?) | Creates and subscribes to a form engine | | useFieldValue(engine, questionId) | Reactive field value | | useFieldError(engine, questionId) | Reactive field error | | useSectionProgress(engine) | Section completion progress |

Theme Presets

import { FormEngineRenderer } from "@squaredr/fieldcraft-react";
import { darkPreset } from "@squaredr/fieldcraft-react";

<FormEngineRenderer schema={schema} onSubmit={handleSubmit} theme={darkPreset} />

Available presets: cleanPreset, modernPreset, darkPreset, highContrastPreset, clinicalPreset, playfulPreset

Custom Field Registry

Override or add field components:

import { createFieldRegistry, mergeRegistries, defaultRegistry } from "@squaredr/fieldcraft-react";

const customRegistry = mergeRegistries(defaultRegistry, {
  short_text: MyCustomTextField,
});

<FormEngineRenderer schema={schema} onSubmit={handleSubmit} registry={customRegistry} />

Peer Dependencies

  • react ^18 || ^19
  • react-dom ^18 || ^19

License

MIT