Skip to content

formsandlines/form-svg

Repository files navigation

form-svg


formform module to draw FORMs (as formJSON) in D3/SVG format for visualization in the browser, in PDFs, etc.

Uses my custom boxmodel-layout-for-d3 for the gsbhooks visualization type (hook notation used by George Spencer-Brown in his “Laws of Form”).

Usage

Install formform (optional, but may be required in future releases).

Then install the module:

npm install form-svg d3@^5.16.0
// ES6:
import form_svg from 'form-svg';

// CommonJS:
let form_svg = require('form-svg');

You can then use the module like this:

form_svg('pack', '((a)b)', { parentId: 'form' });

<div id="form"></div>

The FORM visualization will then be put inside the container with the given parentId. This behaviour might change in future releases in exchange for a more flexible approach.


Documentation

Comming soon…

Releases

No releases published

Packages

No packages published