GolemUI

The one stop shop for JS forms

React + React Hook Form

0 Lines
0 Branches
  • Schema serialization (forms as JSON)
  • A11y, keyboard, ARIA out of the box
  • i18n adapter, bring your own library
{gui.}
0 Lines
0 Branches
  • Schema serialization (forms as JSON)
  • A11y, keyboard, ARIA out of the box
  • i18n adapter, bring your own library

Same form in every framework, with the code that renders it included.

Source code

01

Define your forms with our declarative API...

const formDef = [
  gui.inputs.dropdown('country', {
    items: ['United States', 'Japan', 'Brazil', 'France'],
  }),
  gui.inputs.dropdown('currency', {
    items: CURRENCIES,
    itemRenderer: 'currencyItemRenderer',
  }),
  gui.inputs.checkbox('pets', { label: 'Travelling with pets?' }),
  gui.inputs.datePicker('startDate'),
  gui.actions.button({ label: 'Submit', actionType: 'submit' }),
];

// Wire formSubmit on your component:
// formSubmit={(event) => process(event.data)}

...or generate them from JSON Schema.

[
  {
    "kind": "input",
    "type": "textinput",
    "path": "email",
    "label": "Email",
    "validator": { "type": "string", "required": true, "format": "email" }
  },
  {
    "kind": "input",
    "type": "checkbox",
    "path": "subscribe",
    "label": "Email me product updates"
  },
  { "kind": "action", "type": "button", "label": "Save" }
]
02

Use our production ready components out of the box...

calendar
list
currency
booleanInput
password
numberInput
radiogroup
tags
markdown
dateInput
textarea

...or bring your own components.

const formDef = [
  // Shoelace dropdown
  gui.inputs.custom('shoelaceDropdown', 'country', {
    label: 'Country · Shoelace',
    props: { items: COUNTRIES },
  }),
  // Material date picker
  gui.inputs.custom('matDatePicker', 'birthday', {
    label: 'Birthday · Material',
  }),
  // your own slider
  gui.inputs.custom('freedomSlider', 'satisfaction', {
    label: 'Satisfaction (0 to 10) · Custom',
    props: { min: 0, max: 10, step: 1 },
  }),
  // Material checkbox
  gui.inputs.custom('matCheckbox', 'newsletter', {
    label: 'Email me when there are updates · Material',
  }),
  // Shoelace submit button
  gui.actions.custom('shoelaceButton', { label: 'Sign up · Shoelace' }),
];
03

Save token$. Breeze through review$.

{gui.} is small enough for your agent to emit cleanly and small enough for your team to review at a glance. Same code, both jobs. And the MCP server closes the loop: it validates every definition the model writes, generates JSON or code on demand, and never hands your app an invalid form.

React + React Hook Form

0
Tokens

89 lines of form code · tokenized with cl100k_base

{gui.}

0
Tokens

52 lines · −41% on the same form

We wrote the long version of this argument: The age of token efficiency, the age of libraries.

04

What you get for free...

Accessibility · i18n · Validation · Performance
0kb
gzipped
0s
LCP
0
Lighthouse
GolemUI DIY
Schema serialization (forms as JSON)
Accessibility: WCAG 2.1 AA & ARIA
Internationalization (i18n)
Schema-driven validation
+28 built-in components

Theming

Every widget reads from one set of --gui-* custom properties — color, spacing, radius, and typography ramps. Override them in plain CSS to reskin an entire form: no component props, no theme provider, no rebuild. The tokens cascade the same way in React, Angular, Vue, and Lit.

The same sign-up form rendered with the 8-bit theme
Sign-up form rendered with the clay (dark) theme Sign-up form rendered with the clay (dark) theme
Clay 8-bit

Drag to compare. Same form, two themes.

Portability

The schema is data, not code, so a form definition travels where code cannot. Most form libraries never leave the codebase. GolemUI schemas do.

DATABASE

Save it in a database

A form definition is a row of JSON, versioned, queried and migrated like any other data.

CMS

Publish it from a CMS

Editors change the form without a deploy; the engine renders whatever the CMS ships.

LLM

Ask an LLM for it

Schemas are small and regular, so a model can write one, review one, or repair one.

FRAMEWORKS

Carry it across frameworks

The same schema renders in React, Angular, Lit, Vue and vanilla JS, unchanged.

Fully customizable

BYOFWK

Bring your own framework

React, Angular, Lit and Vue are first-class, or drive the engine from plain web components, or integrate your own.

BYOCS

Bring your own component set

Build a component set of your own against the same widget architecture. We did, and called it {gui.}.

BYOV

Bring your own validators

Any Standard Schema validator drops in: Zod, Valibot and many more. Our own are built on Zod.

BYOi18n

Bring your own i18n

Map any i18n library in through a simple adapter, and keep the advanced features it is good at.

Ready to Start Building?

Stop fighting with form state and logic. Start defining smarter, serializable forms in minutes with GolemUI.

golem noun /ˈɡəʊləm/ a figure made of clay that comes to life.

GolemUI and its clay theme take their name and character from this figure.