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

ComponentDefinition fields

string
Unique identifier for this component registration. Aether uses this to track registrations from the same extension. If omitted, Aether generates one from the target and registration order.
string
One of "before", "after", "replace", "wrap", or "hide". Determines how this registration interacts with the target component and other registrations. Defaults to "wrap". See Mode semantics below.
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.
function
A factory function that returns a ui node tree. Use either render or tree for all modes except "hide", which removes the component without rendering anything in its place.
object
A static ui node tree used when render is omitted.

Mode semantics

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.