{"id":49603,"library":"uniforms-bridge-json-schema","title":"uniforms-bridge-json-schema","description":"JSON Schema bridge for uniforms, a React library for generating forms from schemas. Current stable version is 4.0.0. This package allows you to use JSON Schema as the schema definition for uniforms forms, translating JSON Schema constraints into form fields and validation. It is part of the uniforms ecosystem, which also supports other schema formats like GraphQL, SimpleSchema, and Zod. The bridge requires uniforms 4.0.0 as a peer dependency and is written in TypeScript with type definitions included.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/vazco/uniforms#master","tags":["javascript","form","forms","jsonschema","react","schema","validation","typescript"],"install":[{"cmd":"npm install uniforms-bridge-json-schema","lang":"bash","label":"npm"},{"cmd":"yarn add uniforms-bridge-json-schema","lang":"bash","label":"yarn"},{"cmd":"pnpm add uniforms-bridge-json-schema","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: core uniforms library required for form rendering and schema bridge interface.","package":"uniforms","optional":false}],"imports":[{"note":"ESM-only since v3; CommonJS require() is not supported.","wrong":"const JSONSchemaBridge = require('uniforms-bridge-json-schema')","symbol":"JSONSchemaBridge","correct":"import { JSONSchemaBridge } from 'uniforms-bridge-json-schema'"},{"note":"The bridge is used with uniforms' createSchemaBridge factory function. Direct instantiation is deprecated.","wrong":"import { JSONSchemaBridge } from 'uniforms-bridge-json-schema';\nconst bridge = new JSONSchemaBridge(schema);","symbol":"JSONSchemaBridge","correct":"import { createSchemaBridge } from 'uniforms';\nimport JSONSchemaBridge from 'uniforms-bridge-json-schema';\nconst bridge = createSchemaBridge(schema, JSONSchemaBridge);"},{"note":"The package exports JSONSchemaBridge as a named export, not default. But for backward compatibility, default export also works in some versions.","wrong":"import { default as JSONSchemaBridge } from 'uniforms-bridge-json-schema';","symbol":"default (JSONSchemaBridge)","correct":"import JSONSchemaBridge from 'uniforms-bridge-json-schema';\nconst bridge = new JSONSchemaBridge(schema);"}],"quickstart":{"code":"import React from 'react';\nimport { AutoForm, createSchemaBridge } from 'uniforms';\nimport JSONSchemaBridge from 'uniforms-bridge-json-schema';\n\nconst schema = {\n  type: 'object',\n  properties: {\n    name: { type: 'string' },\n    age: { type: 'integer', minimum: 0 },\n    email: { type: 'string', format: 'email' }\n  },\n  required: ['name', 'email']\n};\n\nconst bridge = createSchemaBridge(schema, JSONSchemaBridge);\n\nexport default function MyForm() {\n  return (\n    <AutoForm schema={bridge} onSubmit={console.log} />\n  );\n}","lang":"typescript","description":"Creates a form from a JSON Schema using the JSONSchemaBridge and uniforms' AutoForm component."},"warnings":[{"fix":"Ensure you have uniforms@4.0.0 installed as a dependency.","message":"Uniforms v4 requires peer dependency uniformity 4.0.0 exactly. Incompatibility with older uniforms versions (3.x or earlier).","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use createSchemaBridge(schema, JSONSchemaBridge) instead of new JSONSchemaBridge(schema).","message":"Direct instantiation of JSONSchemaBridge with 'new JSONSchemaBridge(schema)' is deprecated in favor of using uniforms' createSchemaBridge factory function.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Provide a custom validation function to the bridge or use a library like ajv to validate before submission.","message":"JSON Schema formats (e.g., 'email', 'date-time') are not natively supported by uniforms for validation. You must provide a custom validation function or use a separate validator.","severity":"gotcha","affected_versions":"*"},{"fix":"Validate your JSON Schema against the supported draft before passing it to the bridge.","message":"The schema must be a valid JSON Schema object; otherwise the bridge may throw or produce incorrect fields. Ensure the schema conforms to the Draft 4/7 specification supported by uniforms.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'4.0.0':23,70 'allow':26 'also':56 'bridg':3,8,67 'constraint':42 'current':19 'definit':35,82 'depend':74 'ecosystem':54 'field':45 'form':16,38,44,85,86 'format':60 'generat':15 'graphql':62 'includ':83 'javascript':84 'json':4,6,30,40 'jsonschema':87 'librari':13 'like':61 'packag':25 'part':50 'peer':73 'react':12,88 'requir':68 'schema':5,7,18,31,34,41,59,89 'simpleschema':63 'stabl':20 'support':57 'translat':39 'type':81 'typescript':79,91 'uniform':2,10,37,53,69 'uniforms-bridge-json-schema':1 'use':29 'valid':47,90 'version':21 'written':77 'zod':65","created_at":"2026-06-07T17:02:37.204402+00:00","updated_at":"2026-06-07T17:02:37.204402+00:00","problems":[{"fix":"Install uniforms@4.0.0: npm install uniforms@4.0.0","cause":"Missing or incorrect version of uniforms peer dependency.","error":"TypeError: Class extends value undefined is not a constructor or null"},{"fix":"Import createSchemaBridge from 'uniforms' and call it with your schema and JSONSchemaBridge: createSchemaBridge(schema, JSONSchemaBridge).","cause":"Using the wrong bridge or incorrect import; likely not using createSchemaBridge.","error":"Error: [uniforms] No schema bridge factory for this type."},{"fix":"Install the package: npm install uniforms-bridge-json-schema","cause":"Package not installed or import path incorrect.","error":"Module not found: Can't resolve 'uniforms-bridge-json-schema'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/vazco/uniforms/tree/master#readme","github":"https://github.com/vazco/uniforms#master","docs":null,"changelog":null,"pypi":null,"npm":"uniforms-bridge-json-schema","openapi_spec":null,"status_page":null,"smithery":null,"categories":["forms","validation"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}