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

jsonschema-builder-vue

v0.4.6

Published

Vue 3 Visual JSON Schema editor for creating and manipulating JSON Schema definitions with an intuitive interface.

Downloads

721

Readme

JSON Schema Builder (Vue)

image

A modern, Vue 3 + PrimeVue visual JSON Schema editor for creating and manipulating JSON Schema definitions with an intuitive interface.

Note: This project is a fork of jsonjoy-builder by Ophir LOJKINE, rewritten from React to Vue 3 + PrimeVue.

Live Demo: https://gcasotti.github.io/jsonschema-builder-vue

Repository: https://github.com/gcasotti/jsonschema-builder-vue

NPM Version NPM Downloads NPM License

GitHub Repo GitHub Stars GitHub Issues

Bundle Size Types

CI

Demo

Features

  • Visual Schema Editor: Design your JSON Schema through an intuitive interface without writing raw JSON
  • Real-time JSON Preview: See your schema in JSON format as you build it visually
  • Schema Inference: Generate schemas automatically from existing JSON data
  • JSON Validation: Test JSON data against your schema with detailed validation feedback
  • Responsive Design: Fully responsive interface that works on desktop and mobile devices

Getting Started

Installing

npm install jsonschema-builder-vue

Also install vue if you haven't done so yet.

Then use like this:

<script setup lang="ts">
import "jsonschema-builder-vue/styles.css";
import { type JSONSchema, SchemaVisualEditor } from "jsonschema-builder-vue";
import { ref } from "vue";

const schema = ref<JSONSchema>({});
</script>

<template>
  <div>
    <SchemaVisualEditor :schema="schema" @change="schema = $event" />
  </div>
</template>

Theming

The library uses PrimeVue's styled theming system. Out of the box, four presets are available:

| Preset | Look & Feel | |--------|-------------| | auraPreset | Default — rounded, blue-tinted (Aura) | | materialPreset | Material Design 3 | | noraPreset | Minimal / flat | | laraPreset | Classic PrimeVue |

Setup

Pass a preset when installing PrimeVue:

import PrimeVue from "primevue/config";
import { auraPreset } from "jsonschema-builder-vue";

app.use(PrimeVue, { theme: { preset: auraPreset } });

Runtime theme switching

Use the useTheme composable anywhere inside a component tree with PrimeVue installed:

<script setup lang="ts">
import { useTheme } from "jsonschema-builder-vue";

const { switchPreset, toggleDarkMode, currentPreset, darkMode } = useTheme();

// Switch to Material Design
switchPreset("material");

// Toggle dark mode
toggleDarkMode();
</script>

Custom CSS variables

All design tokens are scoped under .jscb and prefixed with --jscb-*. You can override them to fine-tune the look:

Dark mode is toggled by adding the .jscb-dark class to <html>:

// Use the built-in composable
const { toggleDarkMode, darkMode } = useTheme();
toggleDarkMode();       // toggle
toggleDarkMode(true);   // force dark

PrimeVue's darkModeSelector must match:

app.use(PrimeVue, {
  theme: {
    preset: auraPreset,
    options: { darkModeSelector: ".jscb-dark" },
  },
});

Localization

By default, the editor uses English. To localize, use provideTranslation in a parent component:

<script setup lang="ts">
import "jsonschema-builder-vue/styles.css";
import { type JSONSchema, SchemaVisualEditor, provideTranslation } from "jsonschema-builder-vue";
import { de } from "jsonschema-builder-vue/i18n/locales/de";
import { ref } from "vue";

const lang = ref(de);
provideTranslation(lang);
const schema = ref<JSONSchema>({});
</script>

<template>
  <SchemaVisualEditor :schema="schema" @change="schema = $event" />
</template>

Currently we have localizations for English, German, French, Italian, Polish, Russian, Ukrainian, Spanish and Chinese. You can define your own translation like this. If you do, consider opening a PR with the translations!

import { type Translation } from "jsonschema-builder-vue";

const es: Translation = {
	// add translations here (see type Translation for the available keys and default values)
};

See also the English localizations file for the default localizations.

Development

git clone https://github.com/gcasotti/jsonschema-builder-vue.git
cd jsonschema-builder-vue
npm install

Start the development server:

npm run dev

The demo application will be available at http://localhost:8080

Building for Production

Build this library for production:

npm run build

The built files will be available in the dist directory.

Project Architecture

Core Components

  • JsonSchemaEditor: The main component that provides tabs for switching between visual and JSON views
  • SchemaVisualEditor: Handles the visual representation and editing of schemas
  • JsonSchemaVisualizer: Provides JSON view with Monaco editor for direct schema editing
  • SchemaInferencer: Dialog component for generating schemas from JSON data
  • JsonValidator: Dialog component for validating JSON against the current schema

Key Features

Schema Inference

The SchemaInferencer component can automatically generate JSON Schema definitions from existing JSON data. This feature uses a recursion-based inference system to detect:

  • Object structures and properties
  • Array types and their item schemas
  • String formats (dates, emails, URIs)
  • Numeric types (integers vs. floats)
  • Required fields

JSON Validation

Validate any JSON document against your schema with:

  • Real-time feedback
  • Detailed error reporting
  • Format validation for emails, dates, and other special formats

Technology Stack

  • Vue 3: UI framework (Composition API, <script setup>)
  • PrimeVue: Component library with built-in theming (Aura, Material, Nora, Lara presets)
  • TypeScript: Type-safe development
  • Rsbuild / Rslib: Build tool and development server
  • Monaco Editor: Code editor for JSON viewing/editing
  • Ajv: JSON Schema validation
  • Zod: Type-safe json parsing in ts
  • Lucide Vue Next: Icon library
  • Vitest: Unit and component testing

Development Scripts

| Command | Description | |---------|-------------| | npm run dev | Start development server | | npm run build | Build library for production | | npm run build:demo | Build demo page | | npm run lint | Run Biome linter | | npm run format | Format code with Biome | | npm run check | Run Biome lint + format checks | | npm run fix | Auto-fix lint issues | | npm run typecheck | Type check with vue-tsc | | npm run preview | Preview production build | | npm run test | Run unit tests | | npm run test:ui | Run component tests (Vitest) | | npm run test:all | Run all tests |

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

@gcasotti

Acknowledgements

This project is a Vue 3 port of jsonjoy-builder, originally created by Ophir LOJKINE (@lovasoa). Thanks for the excellent work on the original project!