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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ww-form-designer

v0.0.3

Published

A React form designer component for building dynamic forms.

Readme

WW Form Designer

A React form designer component for building dynamic forms.

Installation

npm install ww-form-designer
# or
yarn add ww-form-designer

Usage

Basic Usage

import { FormDesigner } from 'ww-form-designer';
import 'ww-form-designer/styles'; // Import the styles (required)

function App() {
  const [formJSON, setFormJSON] = useState({});
  const initialFormDesign = [];

  return (
    <FormDesigner 
      getFormJSON={setFormJSON}
      initialFormDesign={initialFormDesign}
    />
  );
}

With Custom Font Family

import { FormDesigner } from 'ww-form-designer';
import 'ww-form-designer/styles';

function App() {
  const [formJSON, setFormJSON] = useState({});
  const initialFormDesign = [];
  const fontFamily = "'Inter', sans-serif";

  return (
    <FormDesigner 
      getFormJSON={setFormJSON}
      initialFormDesign={initialFormDesign}
      fontFamily={fontFamily}
    />
  );
}

With Lookup Data

import { FormDesigner } from 'ww-form-designer';
import 'ww-form-designer/styles';

function App() {
  const [formJSON, setFormJSON] = useState({});
  const initialFormDesign = [];
  const lookupData = {
    // Your lookup data structure
  };

  return (
    <FormDesigner 
      getFormJSON={setFormJSON}
      initialFormDesign={initialFormDesign}
      lookupData={lookupData}
    />
  );
}

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | getFormJSON | Dispatch<React.SetStateAction<GetFormJsonTypes>> | Yes | Function to receive the form JSON data | | initialFormDesign | ComponentProperties[] | Yes | Initial form design configuration | | lookupData | any | No | Data for lookup fields | | fontFamily | any | No | Custom font family for the form designer |

Styling

The package includes its own styles. You must import the styles entry point:

import 'ww-form-designer/styles';

This ensures all required CSS is loaded. If you do not see styles, check your build system or import the CSS manually as above.

TypeScript Support

  • Full TypeScript declarations are included.
  • You can import types directly:
import type { FormDesignerProps } from 'ww-form-designer';

If you see errors like:

  • Cannot find module 'ww-form-designer/styles' or its corresponding type declarations.
  • Could not find a declaration file for module 'ww-form-designer'.

Try:

  • Deleting node_modules and dist in your project and reinstalling dependencies.
  • Ensuring your tsconfig.json does not exclude node_modules/ww-form-designer.
  • If using a local build, make sure you have run yarn build in the package directory.

Dependencies

This package has the following peer dependencies:

  • React (^18.0.0 || ^19.0.0)
  • React DOM (^18.0.0 || ^19.0.0)
  • Ant Design (^5.0.0)

Make sure these are installed in your project.


Troubleshooting

  • Styles not loading?
    • Ensure you have import 'ww-form-designer/styles'; in your entry file.
    • Check your build system supports CSS imports from node_modules.
  • TypeScript errors?
    • Make sure you are using the latest version of the package and have built it if using locally.
    • Check your tsconfig.json includes the package for type checking.

Example Usage (for README)

import { FormDesigner } from 'ww-form-designer';
import 'ww-form-designer/styles';

Summary:
Your package is now set up correctly for both styling and TypeScript. If you want, I can help you further polish your README or provide troubleshooting tips for consumers.