https://github.com/formsandlines/form-svg
formform module to visualize FORMs in SVG format
https://github.com/formsandlines/form-svg
d3 formform formjson laws-of-form svg uform-iform
Last synced: about 2 months ago
JSON representation
formform module to visualize FORMs in SVG format
- Host: GitHub
- URL: https://github.com/formsandlines/form-svg
- Owner: formsandlines
- License: mit
- Created: 2021-05-24T19:48:29.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-19T21:06:23.000Z (almost 4 years ago)
- Last Synced: 2025-03-13T08:56:13.994Z (about 2 months ago)
- Topics: d3, formform, formjson, laws-of-form, svg, uform-iform
- Language: JavaScript
- Homepage: https://formform.dev
- Size: 1.71 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/formsandlines/boxmodel-layout-for-d3) for the `gsbhooks` visualization type (hook notation used by George Spencer-Brown in his “Laws of Form”).
## Usage
Install [formform](https://github.com/formsandlines/formform) (optional, but may be required in future releases).
Then install the module:
```bash
npm install form-svg d3@^5.16.0
``````js
// ES6:
import form_svg from 'form-svg';// CommonJS:
let form_svg = require('form-svg');
```You can then use the module like this:
```js
form_svg('pack', '((a)b)', { parentId: 'form' });
```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…