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

@gitlab-ui-react/json-render

v0.3.0

Published

Pre-built GitLab UI React components for vercel-labs/json-render

Readme

@gitlab-ui-react/json-render

GitLab UI React components prepared for json-render. The package exposes model-friendly Zod definitions and the matching React component functions.

This package is a GitLab UI integration. Its JSON contracts follow GitLab component semantics and do not reproduce the shadcn preset's component API, implementation, layout primitives, or Tailwind classes.

Installation

pnpm add @gitlab-ui-react/json-render gitlab-ui-react @gitlab-ui-react/styles \
  @json-render/core @json-render/react react react-dom zod

Import the GitLab UI stylesheet once in the application entry point. The preset deliberately does not import CSS as a side effect.

import "@gitlab-ui-react/styles";

Catalog and registry

import { defineCatalog } from "@json-render/core";
import {
  JSONUIProvider,
  Renderer,
  defineRegistry,
} from "@json-render/react";
import { schema } from "@json-render/react/schema";
import {
  gitlabComponents,
  gitlabComponentDefinitions,
} from "@gitlab-ui-react/json-render";
import "@gitlab-ui-react/styles";

const catalog = defineCatalog(schema, {
  components: gitlabComponentDefinitions,
  actions: {},
});

const { registry } = defineRegistry(catalog, {
  components: gitlabComponents,
});

const spec = {
  root: "save",
  elements: {
    save: {
      type: "GlButton",
      props: {
        label: "Save changes",
        category: "primary",
        variant: "confirm",
      },
      children: [],
    },
  },
};

export function GeneratedUI() {
  return (
    <JSONUIProvider registry={registry}>
      <Renderer registry={registry} spec={spec} />
    </JSONUIProvider>
  );
}

For server-only catalog and prompt generation, use the dedicated entry. It imports only Zod and does not load React or GitLab UI:

import { defineCatalog } from "@json-render/core";
import { schema } from "@json-render/react/schema";
import { gitlabComponentDefinitions } from "@gitlab-ui-react/json-render/catalog";

export const catalog = defineCatalog(schema, {
  components: gitlabComponentDefinitions,
  actions: {},
});

Included components

  • Containers and navigation: GlCard, GlButtonGroup, GlAccordion, GlTabs, GlPagination
  • Display and feedback: GlAlert, GlAttributeList, GlAvatar, GlBadge, GlLoadingIcon, GlMarkdown, GlProgressBar, GlSkeletonLoader, GlTable
  • Actions: GlButton, GlLink
  • Forms: GlForm, GlFormField, GlFormFieldGroup, GlFormFieldSet, GlFormInputGroup, GlFormInput, GlFormPasswordInput, GlFormTextarea, GlFormDate, GlFormSelect, GlFormRadioGroup, GlFormCheckbox, GlFormCheckboxGroup, GlToggle

GlButtonGroup and GlFormInputGroup require a non-empty label prop. It names the group for assistive technology but is not rendered as visible text; give their child controls their own labels as well.

Form values, tab selection, and pagination support json-render $bindState and $bindItem expressions. Unbound controls retain interactive local state. Bound form fields can use json-render checks with validateOn: "change" | "blur" | "submit"; validation messages are connected to the control with stable ARIA IDs. Put submit-validated controls inside GlForm: it validates only its descendant fields, emits submit only when they pass, emits invalid otherwise, and focuses the first invalid control. GlForm intentionally omits navigation props such as action, method, and target; submit behavior belongs to json-render actions.

GlMarkdown applies GitLab's markdown typography but renders its text as ordinary React text. It does not parse model output as HTML. GlLink uses GitLab UI's safe protocol allowlist, and the catalog does not expose isUnsafeLink.

The catalog intentionally excludes arbitrary className and style, render callbacks, dangerouslySetInnerHTML, and other non-JSON or unsafe escape hatches.

Public API

  • @gitlab-ui-react/json-render: gitlabComponents plus all catalog exports
  • @gitlab-ui-react/json-render/catalog: gitlabComponentDefinitions, GitLabComponentName, GitLabProps<K>, and GitLabComponentDefinition