
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
@gravity-ui/dialog-fields
Advanced tools
The library helps to create dialogs with forms by using registered field-types. Also it is possible to extend it with your own field-types.
The purpose of DFDialog component is to ease of creating of forms, it is used react-final-form internally.
It supports several predefined types of fields but user can extend it by registering new ones by using registerDialogControl.
plain - static texttext - editable textmulti-text - user defined array of stringcheckbox - checkboxtumbler - tumblerradio - radio buttoneditable-list - list of removable stringsmulti-editable-list - multi list of removable stringstext area - text areaselect - selectblock - allows to add ReactNode$ npm install @gravity-ui/dialog-fields
# Use required version of react/react-dom in case you haven't installed them yet
$ npm install @gravity-ui/dialog-fields react@18 react-dom@18
Depending on your package manager you may need to install peerDependencies manually.
import {DFDialog, FormApi} from '@gravity-ui/dialog-fields';
interface FormValues {
firstName: string;
lastName: string;
}
function MyForm() {
return (
<DFDialog<FormValues>
visible={true}
headerProps={{
title: 'My form',
}}
onAdd={(form) => {
console.log(form.getState().values);
return Promise.resolve();
}}
fields={[
{
name: 'firstName',
type: 'text',
caption: 'First name',
tooltip: 'Description for first name field',
},
{
name: 'lastName',
type: 'text',
caption: 'LastName',
tooltip: 'Description for last name field',
},
]}
/>
);
}
See more examples in storybook.
FAQs
The library helps to create dialogs with forms by using registered field-types. Also it is possible to extend it with your own field-types.
The npm package @gravity-ui/dialog-fields receives a total of 188 weekly downloads. As such, @gravity-ui/dialog-fields popularity was classified as not popular.
We found that @gravity-ui/dialog-fields demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.