Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

example jsdoc

Sultan15898c9ca039
diff --git a/app/shared/design-system/components/primitives/createContentController.js b/app/shared/design-system/components/primitives/createContentController.js
index 3f99cbd6a7..e3893cb9cd 100644
--- a/app/shared/design-system/components/primitives/createContentController.js
+++ b/app/shared/design-system/components/primitives/createContentController.js
@@ -1,3 +1,16 @@
+/*
+ @example
+
+ const {update, disconnectedCallback} = createContentController(document.querySelector('input'), {
+ contents: [
+ { name: 'unit', match: (value) => value === 'px' },
+ { name: 'number', match: (value) => isNaN(parseFloat(value)) === false },
+ { name: 'unknown', match: (value) => true },
+ ],
+ onMouseMove: ({name, value, position}) => { },
+ onCaretMove: ({name, value, position}) => { },
+ });
+*/
const canvasContext = globalThis.document
?.createElement("canvas")
.getContext("2d");