Skip to content

Documentation

Widget System Overview

Hub for SveltyCMS widget documentation.

9/22/2026
1 min read Edit on GitHub
On this page

A widget is a field. Editors meet widgets inside the Collection Builder. This section is for someone adding a field type.

The three parts

Part File Role
Definition index.ts createWidget() — Valibot schema, GUI config, validation
Input input.svelte The editor control
Display display.svelte The read-only view

Filenames are lowercase. The folder is kebab-case. The factory Name is PascalCase, and widgetNameToFolder(Name) must equal the folder.

Kind Folder
Core src/widgets/core/{kebab}/
Custom src/widgets/custom/{kebab}/
Marketplace src/widgets/marketplace/{kebab}/

Where to go

Task Page
Build one Widget development
Publish one Widget marketplace
See a built-in field The .mdx file next to that widget under src/widgets/

Tests for core widgets live in tests/unit/widgets/core/. A custom widget keeps its tests in its own tests/ folder.

Related

widgetsguidedevelopmentcms
Was this page helpful?