Guides
Using DOM Adapters
Handle custom controls and framework widgets when standard DOM execution is not enough.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Use DOM adapters for controls that do not behave like normal browser inputs, buttons, or forms.
Typical example
ts
10 lines
Cinder.registerDomAdapter({
id: 'custom-combobox',
match(context) {
return context.element.getAttribute('role') === 'combobox';
},
async execute(context) {
context.element.dispatchEvent(new Event('click', { bubbles: true }));
return true;
},
});Good adapter use cases
- headless UI widgets
- custom dropdowns
- design-system components that hide native inputs
- framework-specific surfaces that need explicit interaction logic
Bad adapter use cases
Do not reach for an adapter when standard browser behavior already works. The first question should be:
can this be solved through better tags or the normal DOM path first?
Related pages
Continue reading