# @eeacms/volto-object-widget

> volto-object-widget: Volto add-on

Latest version **10.0.0** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eeacms/volto-object-widget
pnpm add @eeacms/volto-object-widget
yarn add @eeacms/volto-object-widget
bun add @eeacms/volto-object-widget
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 10.0.0 |
| Published | 2026-11-19 |
| First published | 2020-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 1 |
| Unpacked size | 177.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | European Environment Agency: IDM2 A-Team |
| Maintainers | demarant, avoinea, tiberiuichim, zotya, alecghica, eea-jenkins, razvan.miu, ichimdav, valentinab25, nileshgulia1 |
| Keywords | volto-addon, volto-widget, volto, plone, react |

## Links

- npm: https://www.npmjs.com/package/@eeacms/volto-object-widget
- Repository: https://github.com/eea/volto-object-widget
- Issues: https://github.com/eea/volto-object-widget/issues
- npm.io page: https://npm.io/package/@eeacms/volto-object-widget

## Dependencies (1)

- [jsoneditor](https://npm.io/package/jsoneditor.md) 10.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 10.0.0 (latest) — 2026-11-19
- 9.1.1 — 2026-04-28
- 9.1.0 — 2026-04-14
- 9.0.1 — 2026-04-09
- 9.0.0 — 2026-03-30
- 8.0.0 — 2025-07-25
- 7.0.0 — 2024-04-22
- 6.0.0 — 2023-12-08
- 5.2.0 — 2023-11-29
- 5.1.5 — 2023-10-31
- 5.1.4 — 2023-09-29
- 5.1.3 — 2023-07-24
- 5.1.2 — 2023-06-12
- 5.1.1 — 2023-04-26
- 5.1.0 — 2023-03-27
- … 20 more at https://npm.io/package/@eeacms/volto-object-widget/versions

## README

# @eeacms/volto-object-widget

[![Releases](https://img.shields.io/github/v/release/eea/volto-object-widget)](https://github.com/eea/volto-object-widget/releases)
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-object-widget%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-object-widget/job/master/display/redirect)
[![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-object-widget&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-object-widget)

[Volto](https://github.com/plone/volto) add-on: Various Volto schema-based widgets.

## Features

This Volto addon provides several "abstract" widgets, to allow complex
information to be editable by the schema-based forms. It centers around the
concept: "we can create a form to edit a JSON object by using a schema" and so
it provides, right now, widgets to edit "list of JSON objects", a "mapping of
JSON objects" and a single "JSON object, but I choose the schema for it".

### FlatListObject

![Flat List object](https://raw.githubusercontent.com/eea/volto-object-widget/master/img/flat-list-widget.png)

This widget allows you to edit a list of objects by creating, editing and
deleting instances of objects editable with the provided `schema` parameter.
The list is sortable with drag&drop. You can also provide a schema extender,
a function with signature `(schema, data) => schema`, which will adjust, per
instance of object, its schema. To use this widget, in the schema, set the
`widget` field to `object_list_inline`.

Example of how the data could look like for a block:

```
"a55c5053-ba81-4f73-ab29-7cdea74df20f": {
	"@type": "dataTable",
	"columns": [
		{
			"@id": "f899ca76-68be-4ded-aa0b-669c04c27309",
			"column": " PERC_HA_07\n(in %)",
			"renderer": "progress",
			"title": "21"
		},
		{
			"@id": "94315c5a-e031-4b7e-acb2-93887878a252",
			"column": " PERC_HA_07\n(in %)",
			"title": "12"
		}
	],
}
```

The `columns` field, in this case, is data generated by the `FlatListObject`.
The schema for this field could look like (`ColumnSchema()` just generates
another instance of a schema, suitable for the `column` definition of our
specific use case):

```
columns: {
  title: 'Columns',
  description: 'Leave empty to show all columns',
  schema: ColumnSchema(),
  widget: 'object_list_inline',
},
```

### Mapping Widget

![Mapping widget](https://raw.githubusercontent.com/eea/volto-object-widget/master/img/mapping-widget.png)

This widget allows editing the properties of an object. For example, in the
following block data, the `row_colors` value is generated by an instance of the
`MappingWidget`.

```
"4430a32a-a266-497b-88e7-72fead5ab718": {
  "@type": "dottedTableChart",
  "column_data": "habitat_group",
  "row_colors": {
    "Bad": "#ed1834",
    "F - Heathland, scrub and tundra": "#88c24f",
    "Good": "#3c8000",
    "Poor": "#f2a70e",
    "Unknown": "#8d8d8d"
  },
  "row_data": "assessment",
  "size_data": "quantity"
},
```

You need to provide the `options`, which is a list of objects with `{id, title}` and the `field_props`, which are parameters for the actual field that
will be used to edit the values. In our case the schema definition that was
used to edit the above value is (note, the options are empty, we're populating
them in the edit component, before passing the schema to the form):

```
row_colors: {
  title: 'Colors',
  widget: 'option_mapping',
  field_props: {
    widget: 'simple_color',
    available_colors: settings.available_colors,
  },
  options: [],
}
```

To use this widget, in the schema, set the `widget` field to `option_mapping`.

### Object by type

![Object by type](https://raw.githubusercontent.com/eea/volto-object-widget/master/img/object-by-type-widget.png)

With this widget you can choose the type of value that will be used, from
a predefined list of schemas. A schema that would use this type of widget could
look like:

```
const LinkEditSchema = {
  title: 'Link',
  fieldsets: [
    {
      id: 'default',
      title: 'Default',
      fields: ['link'],
    },
  ],
  properties: {
    link: {
      title: 'Link',
      widget: 'object_by_type',
      schemas: [
        {
          id: 'internal',
          icon: internalSVG,
          schema: InternalLinkSchema,
        },
        {
          id: 'external',
          icon: externalSVG,
          schema: ExternalLinkSchema,
        },
        {
          id: 'email',
          icon: emailSVG,
          schema: EmailLinkSchema,
        },
      ],
    },
  },
  required: [],
};
```

To use this widget, in the schema, set the `widget` field to `object_by_type`.

## Upgrade

### Upgrading to 10.x

> This version requires `Volto 18` or `Volto 19` and Node.js 22.

Every widget it registers (`object_list_popup`, `object_list_inline`, `object_by_type`, `option_mapping`, `attachedimage`, `attachedfile`, `object_types_widget`, `url`, `internal_url`, `json`) and every export other add-ons import keeps the same name and behaviour, so upgrading from 9.x on Volto 18 needs no content changes. The release adds Volto 19 support and moves the repository to the Volto 19 layout, where the published package lives in `packages/volto-object-widget`.

#### Breaking changes

- **Node.js 22 or newer is required** (`engines.node >= 22`), 9.x declared no engine.
- **React 18 is required.** The package declares `react` and `react-dom` as `^18.2.0` peers, 9.x declared no peers.
- **The package no longer ships the Jest setup.** `jest-addon.config.js` and `jest.setup.js` were removed in favour of Vitest, so a Volto 18 project that still runs the Jest harness has to keep its own copy.

## Requirements

### Backend

- [Plone](https://plone.org/download)
- [plone.restapi](https://pypi.org/project/plone.restapi/)

### Frontend

- Node.js: `>=22.0.0`

## Installation

1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone

   ```Bash
   docker compose up backend
   ```

1. Start Volto frontend

* If you already have a volto project, just update `package.json`:

   ```JSON
   "dependencies": {
       "@eeacms/volto-object-widget": "*"
   }
   ```

   and `volto.config.js`:

   ```JavaScript
   const addons = ['@eeacms/volto-object-widget'];
   ```

* If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:

   ```
   uvx cookieplone project
   cd project-title
   ```

1. Install or update dependencies, then start the project:

   ```
   make install
   ```

   For a Cookieplone project, start the backend and frontend in separate terminals:

   ```
   make backend-start
   make frontend-start
   ```

1. Go to http://localhost:3000

1. Happy editing!

## License

See [LICENSE.md](LICENSE.md) for details.

## Funding

[European Environment Agency (EU)](http://eea.europa.eu)

---
_Source: https://npm.io/package/@eeacms/volto-object-widget · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
