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

@abgov/jsonforms-components

v2.86.3

Published

Government of Alberta - React renderers for JSON Forms based on the design system.

Readme

jsonforms-components

React renderers for JSON Forms built on the Government of Alberta design system components. The ADSP form app and the form editor preview use them, and they are published to npm as @abgov/jsonforms-components so product teams can render ADSP form definitions in their own applications.

Inside this monorepo, import it through the @abgov/jsonforms-components path alias in tsconfig.base.json.

Install

npm install @abgov/jsonforms-components

These packages are peer dependencies, so install them in your application too (see package.json for the exact ranges):

  • react, @jsonforms/core, @jsonforms/react
  • @abgov/react-components, @abgov/ui-components-common
  • ajv, ajv-errors, ajv-formats
  • @mdx-js/mdx, react-markdown, rehype-sanitize, dompurify, xss
  • expr-eval-fork, pluralize

@apidevtools/json-schema-ref-parser is an optional dependency, used by resolveRefs and tryResolveRefs.

Usage

Pass GoARenderers and GoACells to the JsonForms component. Wrap it in the two context providers the renderers read from:

  • the provider returned by ContextProviderFactory(), which supplies file management, submit and save callbacks, auto-populated data and stepper navigation to the renderers;
  • JsonFormRegisterProvider, which supplies data register values to dropdown and text controls that use the register option.
import { JsonForms } from '@jsonforms/react';
import {
  ContextProviderFactory,
  createDefaultAjv,
  GoACells,
  GoARenderers,
  JsonFormRegisterProvider,
} from '@abgov/jsonforms-components';

// Create both once, at module level. JsonForms recompiles the schema when the ajv instance changes.
const ContextProvider = ContextProviderFactory();
const ajv = createDefaultAjv();

export const MyForm = ({ schema, uischema, data, onChange }) => (
  <ContextProvider>
    <JsonFormRegisterProvider defaultRegisters={undefined}>
      <JsonForms
        schema={schema}
        uischema={uischema}
        data={data}
        renderers={GoARenderers}
        cells={GoACells}
        ajv={ajv}
        validationMode="ValidateAndShow"
        onChange={onChange}
      />
    </JsonFormRegisterProvider>
  </ContextProvider>
);

To show a read-only summary of submitted data, pass GoAReviewRenderers instead of GoARenderers.

The UI schema selects and configures these renderers through its options. The Form service tutorials cover the schema side; the Cheat sheet has examples for each control, layout and stepper.

Reference

Main exports from src/index.ts:

  • Renderer sets: GoARenderers (full form, including stepper, file uploader, address lookup, name, phone, calculation and contact controls), GoAReviewRenderers (read-only review), GoABaseRenderers, GoABaseReviewRenderers and GoABaseTableReviewRenderers (subsets to build your own set), and GoACells.
  • Context: ContextProviderFactory, JsonFormContext, useShowChangeButtons, ReviewRenderProvider, useReviewContext.
  • Data registers: JsonFormRegisterProvider, JsonFormsRegisterContext, useRegisterUser, and the register types.
  • Validation and schemas: createDefaultAjv (an Ajv instance with the formats the renderers use, such as phone, sin and file-urn), resolveRefs, tryResolveRefs.
  • Auto-populate: getAutoPopulatedData, mergeAutoPopulatedData, createAutoPopulateMiddleware.
  • Controls: the individual controls and their testers, for example GoAInputTextControl and GoATextControlTester, plus the stepper navigation helpers such as getNavigationTargets and useStepChange.
  • Performance: memoizeTester and memoizeRendererTesters, which cache tester ranks so large forms don't re-run every tester on each render.

Development

npx nx test jsonforms-components
npx nx lint jsonforms-components
npx nx build jsonforms-components

The package is published to npm with semantic-release through the release target (.releaserc.json). Commits with the scope jsonforms-components trigger a release, for example feat(jsonforms-components): add a new control. See AGENTS.md for the commit conventions.

Related guides