Skip to main content
registerComponent modifies named built-in Compose targets — letting you replace, wrap, or hide Aether’s native UI elements from a Script Mod. Unlike surfaces, which add content without disturbing existing UI, component registrations interact directly with the rendering pipeline for the target and can remove or restructure it entirely.

API signature

registerComponent returns a cleanup function. Call it to remove the component registration and revert the target to its previous state.

Available targets

TargetBuilt-in UI
app.contentEntire routed Aether application content
chat.screenComplete chat screen
settings.screenComplete settings screen
chat.composer.actionTraySelected Skill/MCP/Agent Mode tray
chat.composer.skillPickerSkill rows in the composer plus menu

ComponentDefinition fields

id
string
required
Unique identifier for this component registration. Aether uses this to track registrations from the same extension.
mode
string
required
One of "before", "after", "replace", "wrap", or "hide". Determines how this registration interacts with the target component and other registrations. See Mode semantics below.
order
number
Ordering priority for this registration relative to others targeting the same component. For replace and hide modes, the registration with the highest order value is decisive. For wrap, before, and after registrations, order controls layering. Defaults to 0 when omitted.
render
function
A factory function that returns a ui node tree. Required for all modes except "hide", which removes the component without rendering anything in its place.

Mode semantics

ModeBehavior
beforeRenders your content immediately before the target without removing or replacing it
afterRenders your content immediately after the target without removing or replacing it
replaceReplaces the native component entirely. When multiple extensions register replace for the same target, the registration with the highest order value wins
wrapSurrounds the native component (or the winning replacement) with your layout. Use ui.core() inside your render tree to place the wrapped content. Multiple wrappers compose outward from the center
hideRemoves the component from the UI entirely. The highest-order hide registration is decisive, following the same rule as replace

Examples

Replace

Wrap

Use ui.core() to place the wrapped content within your layout:

Hide

Multiple wrappers from different extensions are composed around a single center — the winning replace registration, or the native component if no replace registration exists. Native Mod components surround the Script component pipeline entirely, so a Native replace is decisive over any Script-level replacements.