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

@knkcs/fieldkit

v0.0.2

Published

Specification-driven field system for defining, rendering, and tabulating structured data

Readme

@knkcs/fieldkit

Specification-driven field system for defining, rendering, and tabulating structured data. Built on top of @knkcs/anker and designed for the knkCMS ecosystem.

What is Fieldkit?

Fieldkit provides a unified system where a specification (a list of typed field definitions) drives three UI components:

  1. Specification Editor — Drag-and-drop UI for defining fields (used by admins/key users)
  2. Field Renderer — Renders interactive forms from a specification
  3. Data Table — Renders tabular data from a specification, with edit capabilities

All three share a common field type plugin system — each field type provides its own editor settings, form input, table cell, and Zod validation fragment.

Package Structure

Single npm package with five subpath exports:

@knkcs/fieldkit/schema           → Field types, registry, Zod generation, defineSpec()
@knkcs/fieldkit/editor           → Specification editor (drag-and-drop field definitions)
@knkcs/fieldkit/renderer         → Field renderer (forms from specifications)
@knkcs/fieldkit/table            → Spec-driven data table
@knkcs/fieldkit/rich-text-spec   → Rich text editor specification (node/mark configuration)

Quick Start

import { defineSpec, text, number, select } from "@knkcs/fieldkit/schema";
import { FieldKitProvider } from "@knkcs/fieldkit/renderer";
import { FieldRenderer } from "@knkcs/fieldkit/renderer";

// Define a specification
const spec = defineSpec([
  text("name", { required: true, placeholder: "Product name" }),
  number("price", { min: 0 }),
  select("category", { options: { electronics: "Electronics", clothing: "Clothing" } }),
]);

// Render a form
function ProductForm() {
  const form = useForm({
    defaultValues: spec.defaultValues,
    resolver: zodResolver(spec.zodSchema),
  });

  return (
    <FormProvider {...form}>
      <FieldKitProvider plugins={builtInFieldTypes}>
        <form onSubmit={form.handleSubmit(onSubmit)}>
          <FieldRenderer schema={spec.fields} />
          <button type="submit">Save</button>
        </form>
      </FieldKitProvider>
    </FormProvider>
  );
}

Built-in Field Types (25)

| Category | Types | |---|---| | Text | text, textarea, markdown, code, rich_text, color, email, url, slug | | Number | number | | Date/Time | date, time | | Selection | select, radio, checkboxes | | Boolean | boolean | | Structural | section, group, blocks, array | | Reference | reference, toc_reference, media, virtual_table |

Custom Field Types

Register custom field types as plugins:

const myPlugin: FieldTypePlugin = {
  id: "my_custom_field",
  name: "My Custom Field",
  description: "A custom field type",
  icon: Star,
  category: "text",
  fieldComponent: MyFieldComponent,
  cellComponent: MyCellComponent,
  toZodType: () => z.string(),
};

Tech Stack

  • React 18+
  • Chakra UI v3 (via @knkcs/anker)
  • React Hook Form + Zod
  • TanStack Table v8
  • dnd-kit (specification editor)
  • TipTap/ProseMirror (rich text, via @knkcms/knkeditor)

Contributing

This project uses Conventional Commits. All commit messages must follow the format:

<type>(<scope>): <description>

[optional body]

Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore

Scopes: schema, editor, renderer, table, rich-text-spec, or omit for cross-cutting changes.

Examples:

feat(schema): add email field type plugin
fix(renderer): handle conditional visibility for nested groups
docs: update README with quick start example
refactor(table): extract cell component lookup into utility

Documentation

License

Proprietary - knk software group