Go beyond ordinary text, images, and links. Create interactive features like countdowns, calendars, and schedules that you can edit directly in Built.at.
Copy the prompt below and give it to your AI when creating a website with custom components.
Create a complete standalone HTML document compatible with Built.at (https://edit.built.at). Use semantic HTML, CSS and JavaScript as needed. Do not embed an editor script or build an editing sidebar. Ordinary static text, links and images need no special attributes. - Mark externally sourced or calculated content (RSS feeds, playback timers, live data) with data-editable="false" on the element or containing section. Built.at must not edit or reorder that region. For interactive components: - Give each component root a stable unique id, data-component="Name", data-component-schema="#schema-id", and data-component-settings="#settings-id". Supply separate script type="application/json" elements with those IDs. Schema is an object with properties; settings contain matching values. - Supported schema controls: string (text), string format textarea/date/time/color/uri/image, number/integer, boolean, enum, object and array. Use descriptive titles, valid defaults, and sensible numeric bounds. For repeatable items provide defaults for every field. - Bind directly editable text on leaf elements with data-component-field="property" or "items.0.title". Bind link destinations and image sources using data-component-field plus data-component-attribute="href" or "src". Do not duplicate inline text in settings popovers. - For functional or formatted values, put data-component-edit="property" on the actual visible control; for a nested array item use data-component-edit="items.0.minutes". Use data-component-label for a descriptive popover title. Do not bind formatted values as inline text. For example, display 60 min with data-component-edit="items.0.minutes", and display a time with data-component-edit="items.0.time". Ensure empty functional values still have a visible click target. - Mark each repeatable row with data-component-item="items.0". Keep rows as siblings in array order. Recompute all index paths after every render. Give each row a single outer element. - Render from the JSON settings on initialization and on component-settings-change dispatched on the component root. Read the latest settings each time. Do not overwrite inline edits with stale data. Use textContent and DOM methods for user-provided text. Keep runtime behavior independent of Built.at. - Ordinary text edits directly on the page; functional settings open contextual controls. Built.at handles editor UI, adding/removing/reordering supported collections, and saving. Do not implement duplicate editing controls. Return the complete HTML, not a fragment.