Widgets & Editor Components
Widgets
Version requirement: the widget subpaths (
/widgets/lucide-icon,/widgets/radix-icon,/widgets/aichat) ship in@laikacms/decap-cms@alpha(≥ 4.1.0-alpha.5). They are not present in@laikacms/decap-cms@latest(4.0.4-alpha.3). Install the alpha tag explicitly:bashnpm install @laikacms/decap-cms@alpha # or pnpm add @laikacms/decap-cms@alpha
| Widget | Subpath |
|---|---|
| AI Chat | @laikacms/decap-cms/widgets/aichat |
| Lucide Icons | @laikacms/decap-cms/widgets/lucide-icon |
| Radix Icons | @laikacms/decap-cms/widgets/radix-icon |
Each widget registers under a unique name (lucide-icon / radix-icon) so both can be used in the same app without one overwriting the other.
import LucideWidgetIcon from '@laikacms/decap-cms/widgets/lucide-icon';
import RadixWidgetIcon from '@laikacms/decap-cms/widgets/radix-icon';
import CMS from 'decap-cms-app';
// Registers as 'lucide-icon'
CMS.registerWidget(LucideWidgetIcon.Widget());
// Registers as 'radix-icon' — safe to call alongside lucide-icon
CMS.registerWidget(RadixWidgetIcon.Widget());
decap-cms-appvs@laikacms/decap-cmsroot import: useimport CMS from 'decap-cms-app'(consistent with quickstart-fs.md and admin-shell.md). The@laikacms/decap-cmsroot export (dist/app/index.js) imports the Node.jspathmodule and fails when bundled for the browser with esbuild.
In collection config, reference them by their distinct names:
fields:
- label: Button Icon # uses Lucide picker
name: button_icon
widget: lucide-icon
- label: Feature Icon # uses Radix picker
name: feature_icon
widget: radix-iconPackage name collision (FYI)
There are two packages in the laika-cms ecosystem with confusingly similar names:
@laikacms/decap-cms— fork of upstream Decap CMS itself (the ReactApp,DecapCmsProvider, widgets, backends likebackend-github, etc.). Lives inlaikacms/decap-cms#v4.beta.@laikacms/decap— adapters around Decap: thelaikaDecap backend (createLaikaBackend), the Decap-compatible HTTP API (decapApi), thedecapOauth2server, custom widgets. Lives in this repo underpackages/decap/.
Their subpath exports do not overlap, so you can pnpm add both side by side.