# Hello, there is an example on how to use jsonforms with vanilla js?

**URL:** <https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109>\
**Category:** General\
**Created:** [April 9, 2021, 11:32pm UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109 "2021-04-09T23:32:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [April 9, 2021, 11:32pm UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/1 "2021-04-09T23:32:45Z")

</div>

_[[original thread](https://spectrum.chat/jsonforms/general/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js-~208c4d21-fd40-422c-86cd-0388263206c3) by seu madruga]_

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [April 12, 2021, 8:18am UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/2 "2021-04-12T08:18:04Z")

</div>

You can take a look at our [React seed](https://github.com/eclipsesource/jsonforms-react-seed). There you can import the `vanillaRenderers` and `vanillaCells` from `@jsonforms/vanilla-renderers` and pass them to `JsonForms` instead of the `materialRenderers` and `materialCells`.

---

<div class="post-metadata">

**Author:** ![linonetwo](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/linonetwo/32/658_2.png) [@linonetwo](https://jsonforms.discourse.group/u/linonetwo)\
**Post date:** [February 18, 2023, 10:06am UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/3 "2023-02-18T10:06:29Z")

</div>

Sadly this example still uses `import { JsonForms } from '@jsonforms/react';`

Which is not vanilla js…

---

<div class="post-metadata">

**Author:** ![linonetwo](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/linonetwo/32/658_2.png) [@linonetwo](https://jsonforms.discourse.group/u/linonetwo)\
**Post date:** [February 18, 2023, 3:25pm UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/4 "2023-02-18T15:25:38Z")

</div>

As I can read from the code, even vanilla controls use React, so there is no way around react.

> <https://github.com/eclipsesource/jsonforms/blob/386174994eabc41758450b8d551e1c859498a468/packages/vanilla-renderers/src/controls/InputControl.tsx#L26>

It might be possible to write a real vanilla js renderer for tiddlywiki, but without enough tutorial on this, it is very hard. Still, thanks for making this library and make it modular.

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [February 20, 2023, 8:03am UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/5 "2023-02-20T08:03:30Z")

</div>

Hi @linonetwo,

At the moment we only offer binding for `React`, `Vue2/3` and `Angular`. There is no ‘Vanilla’ binding available. Initially we only offered `React` which is why the vanilla renderers were implicitly refering to React, today we would call it `react-vanilla`.

If you need a Vanilla binding you will need to implement it yourself but you can reuse `@jsonforms/core`. Still there are many things you need to handle manually then, the advantage of using React, Vue or Angular is that one can use their state management and (re)rendering systems.

---

<div class="post-metadata">

**Author:** ![SamuelMarks](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/samuelmarks/32/1237_2.png) [@SamuelMarks](https://jsonforms.discourse.group/u/SamuelMarks)\
**Post date:** [February 19, 2025, 11:53pm UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/6 "2025-02-19T23:53:10Z")

</div>

Just to confirm; two years later; is what you said still the case @sdirix ?

Keen to use this without a framework =)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [February 20, 2025, 8:20am UTC](https://jsonforms.discourse.group/t/hello-there-is-an-example-on-how-to-use-jsonforms-with-vanilla-js/109/7 "2025-02-20T08:20:08Z")

</div>

Hi @SamuelMarks,

I haven’t come across anyone creating a pure VanillaJS binding for JSON Forms. If your use case requires dynamic forms, it’s generally more practical to use an existing dynamic rendering framework. Even if you rely on `React` solely for rendering JSON Forms, its footprint is small enough to be negligible while sparing you from developing a custom, untested, and unpolished state and rendering management system.

The drawbacks of a pure VanillaJS binding (significant effort and lack of maturity) typically outweigh its advantages, such as a smaller bundle size and fewer dependencies. A motivated adopter who truly values the distinction between a VanillaJS and a React-based solution would need to drive its development.

–

That said, if your goal is a UMD-style, self-contained solution that can be used in Vanilla JavaScript without bundling a React, Angular, or Vue application, consider a web component approach. This involves packaging the React, Angular, or Vue bindings along with their renderer set into a web component, allowing integration via simple HTML without exposing the underlying framework.

We’ve previously built [Angular-based](https://github.com/eclipsesource/jsonforms-angular-webcomponent) and [React-based](https://github.com/eclipsesource/jsonforms-react-webcomponents) web components, though they are no longer actively maintained. A more up-to-date, community-maintained [Vue Vuetify web component](https://github.com/kchobantonov/jsonforms-vuetify-webcomponent) is also available.
