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

@parama-dev/form-builder-editor

v0.8.0

Published

Visual form builder editor with drag-and-drop interface

Readme

@parama-dev/form-builder-editor

A visual form builder editor with drag-and-drop interface for creating forms.

Installation

npm install @parama-dev/form-builder-editor @parama-dev/form-builder-core @parama-dev/form-builder-types @parama-dev/form-builder-renderer @parama-ui/react react react-dom

Usage

Basic Usage

import { FormEditor } from '@parama-dev/form-builder-editor';
// Import the required styles
import '@parama-dev/form-builder-editor/styles';

function App() {
  const handleSave = (schema) => {
    console.log('Form schema:', schema);
  };

  return <FormEditor schema={yourSchema} onSaveSchema={handleSave} />;
}

Alternative CSS Import

If you prefer to import CSS from your bundler configuration or CSS file:

/* In your main CSS file */
@import '@parama-dev/form-builder-editor/dist/styles.css';

Or in your bundler (webpack, vite, etc.):

// In your main.js or app.js
import '@parama-dev/form-builder-editor/dist/styles.css';

CSS Integration

For detailed CSS integration options, see CSS_INTEGRATION.md.

FormEditor props

| Prop | Type | Description | | --------------- | --------------------------------- | ------------------------------------------------------------------- | | schema | FormSchema | The form to open. Omit to start from a blank schema. | | onSaveSchema | (schema: FormSchema) => void | Called when the author clicks Save. | | loadPreset | PresetTypeDef[] \| () => … | Extra field presets for the toolbox. | | variables | VariableContext | Values available to conditions and expressions. | | options | FormEditorOptions | Panel visibility and branding — see below. | | theme | 'light' \| 'dark' \| 'system' | Initial colour scheme. Defaults to system. | | onThemeChange | (theme: ThemeMode) => void | Fires when the author uses the toolbar toggle. Not called on mount. |

FormEditorOptions

| Option | Type | Description | | --------------------- | -------------------------------- | ------------------------------------------------- | | brand | string \| ReactNode | Replaces the toolbar brand slot. | | containerClassname | string | Extra classes for the editor shell. | | defaultFieldTab | 'fields' \| 'presets' | Which toolbox tab opens first. | | showJsonCode | boolean | Shows the JSON/code editor button. | | variableConfig | VariableEditorConfig | Configures the variable editor. | | generalSettings | 'on' \| 'off' \| 'readonly' | Visibility of the General properties section. | | propertiesSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Properties section. | | dataSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Data section. | | appearanceSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Appearance section. | | validationSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Validation section. | | conditionsSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Conditions section. | | eventsSettings | 'on' \| 'off' \| 'readonly' | Visibility of the Events section. |

Theming

The editor ships a three-state theme toggle in its toolbar, cycling light → dark → system. Set the starting point with theme and observe changes with onThemeChange:

<FormEditor schema={yourSchema} theme="dark" onThemeChange={(theme) => console.log(theme)} />

The choice is persisted under the theme key in localStorage, and a stored value takes precedence over the theme prop — the prop is the default for a first-time visitor, not a forced setting.

The theme is scoped to the editor's own subtree and never applied to <html>, so an embedded editor cannot fight the host application's theme. Portalled content — dropdowns, dialogs, the preview sheet — carries the theme on its own content element, so it is styled wherever it lands.

The bundled stylesheet is safe alongside a host that already uses Tailwind: every rule is scoped to data-parama-scope, and the reset it ships in place of Tailwind's global preflight is confined to the same subtree. Nothing reaches markup the host wrote, in either direction.

Embedding under your own provider: if you already wrap your app in ThemeProvider from @parama-ui/react, the editor defers to it, and both theme and onThemeChange are ignored. The toolbar toggle keeps working — it reaches the outer provider through context — so the editor and the rest of your application stay in step. Drive and observe the theme from the provider in that case.

Exports

The package exports a single component, FormEditor. It composes the toolbar, toolbox, canvas, properties panel and preview internally; those parts are not part of the public API.

One store per page

The core store is a module-level singleton, so one page hosts one form. FormEditor and FormRenderer cannot be mounted at the same time — they would share schema, values and mode. Render one at a time.

FormEditor claims editor mode on mount, in which conditions are deliberately ignored so the author can see and edit every field. The built-in preview mounts the renderer, switches to render mode so conditions apply, and hands editor mode back when it closes.

Features

  • Visual drag-and-drop form builder
  • Monaco Editor for advanced schema editing
  • Real-time form preview
  • Component toolbox with search
  • Property panel for field customization
  • Validation rules editor
  • Conditional logic support
  • Light, dark and system themes

Requirements

  • React 18+
  • TailwindCSS for styling
  • All peer dependencies must be installed

License

MIT