Define useful fields
Each prop-producing field needs:- a stable
key; - a clear
label; - a precise
description; - a valid default when the field supports one.
WidgetSourcePropertyField and WidgetSourcePropertySchema for current field types and required members.
Keep defaults valid
The widget’sdefaultProps and field defaults must satisfy the same property contract. New widget instances should render a useful state without manual setup.
Components must also handle missing, empty, partial, or malformed JSON without crashing.
Use theme-aware visual fields
UsecolorSelect when an author must choose a color. It stores a semantic theme token. Do not add new uses of the deprecated color field.
Prefer the host theme for typography, spacing, radii, borders, shadows, focus, and charts. Add a widget-owned visual field only when the product requirement cannot use a semantic theme value.
See Runtime, styling, and accessibility for the supported theme-variable families and a complete CSS example.