Skip to main content

Customize components

Before you start: reuse a component.

The CLI copies component XML, themes, assets, and licenses into your project. Edit the layout and styles in those files. Template components and icons use the existing renderer, so they do not need individual native registrations.

Use the pinned catalog​

Install the authoring tool with python3 -m pip install ./components from the Relo UI repository. In your application directory, run relo-components init --path server/ui to record the installed catalog release in relo-components.json.

Use the catalog namespace in screens/home.xml:

<ui:Theme xmlns:ui="urn:relo:registry:relo">
<Column>
<Button title="Cancel" />
<ui:Button label="Continue" />
</Column>
</ui:Theme>
relo-components check --entry screens/home.xml
relo-components build --entry screens/home.xml --out build/home.xml

The build resolves used catalog components and their dependencies. Send the output XML as the document’s source. The runtime validates expressions, registrations, and evaluated values.

Copy a component to edit it​

relo-components add button card input dialog
relo-components icon add heart arrow-right

The CLI copies definitions and dependencies under server/ui. Point a prefix at that project-relative directory to use the editable copies:

<ui:Theme xmlns:ui="urn:relo:local:server/ui">
<ui:Button label="Continue">
<ui:IconArrowRight />
</ui:Button>
</ui:Theme>

The prefix is local to the XML file. Bind one prefix to the catalog and another to your copy directory to use both libraries on a screen. A copy keeps the component’s short export name, such as Button from server/ui/xml/button/Button.xml.

Change the theme​

Edit themes/neutral.json under the directory passed to init to change the theme embedded by build. You can also use scoped Theme overrides. Styles can change colors, radii, fonts, and component classes. Use paired foreground/background tokens and test both appearances.

Fieldtrip and Sidequest use different palettes and layouts built from the same components. Their shared sources live in the backend, not in platform-specific copies.

Upgrade with a reviewable diff​

relo-components diff button
relo-components update button --dry-run
relo-components update button

Install the new catalog release and update the registry pin in relo-components.json together. Package references keep their namespace and tag names. Editable files remain application-owned. Review the diff and merge local edits before replacing any copied definition.

Prune unused definitions with all application entry points included. Use --dry-run to inspect candidates first. See the Components guide for installed paths, pruning, icons, licensing, and packaging.