@gravity-ui/dynamic-forms
TypeScript icon, indicating that this package has built-in type declarations

4.3.0 • Public • Published

@gravity-ui/dynamic-forms · npm package CI storybook

The JSON Schema-based library for rendering forms and form values.

Install

npm install --save-dev @gravity-ui/dynamic-forms

Usage

import {DynamicField, Spec, dynamicConfig} from '@gravity-ui/dynamic-forms';

// To embed in a final-form
<DynamicField name={name} spec={spec} config={config} />;

import {DynamicView, dynamicViewConfig} from '@gravity-ui/dynamic-forms';

// To get an overview of the values
<DynamicView value={value} spec={spec} config={dynamicViewConfig} />;

I18N

Certain components include text tokens (words and phrases) that are available in two languages: en (the default) and ru. To set the language, use the configure function:

// index.js

import {configure, Lang} from '@gravity-ui/dynamic-forms';

configure({lang: Lang.Ru});

Development

To start the development server with storybook execute the following command:

npm ci
npm run dev

Readme

Keywords

none

Package Sidebar

Install

npm i @gravity-ui/dynamic-forms

Weekly Downloads

474

Version

4.3.0

License

MIT

Unpacked Size

565 kB

Total Files

760

Last publish

Collaborators

  • gravity-ui-bot
  • amje
  • resure