# Input type with vanilla renderers?

**URL:** <https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272>\
**Category:** General\
**Created:** [July 7, 2021, 8:00pm UTC](https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272 "2021-07-07T20:00:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haddigan](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/haddigan/32/86_2.png) [@haddigan](https://jsonforms.discourse.group/u/haddigan)\
**Post date:** [July 7, 2021, 8:00pm UTC](https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272/1 "2021-07-07T20:00:42Z")

</div>

I’m trying to implement a simple login form using the React vanilla renderers. Basically, I want to be able to control the input type for the rendered text inputs (i.e. `type="email"` and `type="password"`). No matter what I try, the input type is always “text”. This is especially a problem for the password field, as passwords are displayed in plaintext.

I’ve seen it suggested to use `"options": { "format": "password" }` to render a password field but this doesn’t seem to have any effect. Is this a limitation of the vanilla renderers? Do I need to use custom renderers to use email and password inputs?

Thanks!

---

<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:** [July 8, 2021, 7:28am UTC](https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272/2 "2021-07-08T07:28:13Z")

</div>

Hi @haddigan!

The React Vanilla renderers don’t yet support as many use cases as the React Material renderers. However `email` and `password` renderers can easily be added.

Note that the React Vanilla renderers are structured slightly differently than the React Material renderers:

- In React Material each `renderer` completely takes over the rendering of a ui schema element and `cell`s are only used within the Table component.
- In React Vanilla the control `renderer` also just renders `label`, `description` etc. and then dispatches to the `cell`s.

Therefore in your case it’s enough to just register one to two custom `cell`s. You can basically just copy the [TextCell](https://github.com/eclipsesource/jsonforms/blob/8c428296f6a0c6eb98770158fb06dab38e3bdc1c/packages/vanilla/src/cells/TextCell.tsx) and modify it to support `email` and/or `password`.

If you’d like you can also contribute this back to JSON Forms 😉 In that case we should probably handle normal `text` and `password` in the `TextCell` and add a new cell for `email`.

---

<div class="post-metadata">

**Author:** ![haddigan](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/haddigan/32/86_2.png) [@haddigan](https://jsonforms.discourse.group/u/haddigan)\
**Post date:** [July 8, 2021, 1:57pm UTC](https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272/3 "2021-07-08T13:57:36Z")

</div>

Thanks for the quick reply and helpful answer! I will see what I can do about contributing back to the project!
