@banclo/jsonforms-ui
v0.0.4
Published
Vue 3 drag-and-drop form builder UI components built with shadcn-vue and Tailwind CSS.
Readme
@banclo/jsonforms-ui
Vue 3 drag-and-drop form builder UI components built with shadcn-vue and Tailwind CSS.
Installation
npm install @banclo/jsonforms-ui @banclo/jsonforms-core
# or
pnpm add @banclo/jsonforms-ui @banclo/jsonforms-coreWhat's Included
Main Components
FormBuilder— Complete form builder with palette, canvas, and property panelFormBuilderProvider— WrapsFormBuilderwith Pinia and registry setup, emitsv-modelwith generated schemas
Palette
ComponentPalette— Sidebar listing available components grouped by categoryPaletteGroup/PaletteItem— Individual palette sections and draggable items
Canvas
BuilderCanvas— Drop target where the form tree is renderedCanvasNode— Renders a single node with selection, drag handles, and drop zonesCanvasToolbar— Per-node actions (delete, duplicate, move)
Properties
PropertyPanel— Right sidebar for editing selected node propertiesSchemaPropertyEditor/UISchemaPropertyEditor— JSON Schema and UI Schema property editorsValidationEditor/RuleEditor— Validation constraints and conditional visibility rules
Composables
useDragDrop— Drag-and-drop logic for palette-to-canvas and canvas reorderinguseKeyboardShortcuts— Keyboard shortcuts (delete, undo/redo, copy/paste)useDarkMode— Dark mode toggle with system preference detection
Basic Usage
<script setup>
import { FormBuilderProvider } from '@banclo/jsonforms-ui'
import '@banclo/jsonforms-ui/styles'
import { ref } from 'vue'
const schemas = ref({ jsonSchema: {}, uiSchema: {} })
</script>
<template>
<FormBuilderProvider v-model="schemas" />
</template>Styles
Import the global stylesheet for Tailwind and shadcn-vue styles:
import '@banclo/jsonforms-ui/styles'License
MIT
