wp-editor-components
WordPress Editor Components
Use public WordPress components for editor/admin application UI, but keep form state, persistence, authorization, and errors in your own explicit data flow. Component visibility and disabled state are never server-side access control.
Load the package correctly
When using @wordpress/scripts, import packages normally and consume the
generated .asset.php file so wp-components, wp-element, wp-i18n, and
other dependencies are declared automatically. Do not bundle a second React or
reach through window.wp.components private properties to bypass the build.
Load component CSS in the target document. WordPress 7.1's post-editor canvas
is always iframed, so distinguish shell components from block content styles.
If custom UI uses @wordpress/theme or --wpds-* tokens, declare the matching
wp-theme script/style dependency; the two registries are independent.