Use case: You have an object of unknown shape and want to render it as a readable table or card — without writing field-by-field templates.
"dependencies": {
"xt-components": "^0.6.4",
"xt-plugin-default": "^0.6.4"
}In your App component, inject
XtResolverService and register the default plugin so the
resolver knows how to render primitive types (string,
number, boolean, Date,
object, arrays).
import {registerDefaultPlugin} from 'xt-plugin-default';
import {XtResolverService} from 'xt-components';
export class App {
resolverService = inject(XtResolverService);
constructor() {
registerDefaultPlugin(this.resolverService);
}
}<xt-render> to your template<xt-render displayMode="LIST_VIEW" [value]="myObject"> </xt-render>
<xt-render displayMode="FULL_VIEW" [value]="myObject"> </xt-render>| Mode | Renders as | Use when |
|---|---|---|
LIST_VIEW |
Table with key/value rows | Compact summary |
FULL_VIEW |
Spacious field-per-line layout | Detail / read-only view |
The default plugin’s object handler introspects the value at runtime
(typeof, instanceof, Object.keys)
and renders each field with the appropriate widget. Nested objects are
recursed automatically.