Detail
Selected entity facts including missing fields; identity visibility is explicit.
Use the web element directly without the semantic runtime.
A registered presentation adapter can bind this component to host-owned meaning and state.
A standard recipe can select this component when its task, bindings, data, and policy are eligible.
Import and live example#
One selected Ada record with explicit identity and declared fields.
Interactive preview requires JavaScript.
View the complete example source
import {registerAeliqoElements} from "@varendo/web";
import {
AeliqoCardCollectionElement,
AeliqoDeltaElement,
AeliqoDetailElement,
AeliqoFilterBuilderElement,
AeliqoKeyValueElement,
AeliqoMetricElement,
AeliqoRecordListElement,
AeliqoSelectionSummaryElement,
AeliqoTableElement,
type AeliqoKeyValueItem,
type AeliqoTableColumn,
type AeliqoTableRow,
} from "@varendo/web/data";
import type {ResultRef,
Scalar,
} from "@varendo/core";
import type {AeliqoDataColumn, AeliqoDataScope, AeliqoFieldOption} from "@varendo/web/data";
const catalogRef: ResultRef = {
id: "aeliqo-catalog-example",
revision: "1",
outputId: "people",
queryDigest: "catalog-query",
scopeDigest: "catalog-scope",
};
const catalogRows: readonly Readonly<Record<string, Scalar>>[] = [
{id: "ada", name: "Ada Lovelace", team: "Research", date: "2026-09-08", amount: 120},
{id: "lin", name: "Lin Chen", team: "Product", date: "2026-09-09", amount: 96},
{id: "grace", name: "Grace Hopper", team: "Research", date: "2026-09-10", amount: 144},
];
const catalogColumns: readonly AeliqoDataColumn[] = [
{key: "id", label: "ID", type: "text", sortable: true},
{key: "name", label: "Name", type: "text", sortable: true},
{key: "team", label: "Team", type: "text"},
{key: "date", label: "Date", type: "date", sortable: true},
{key: "amount", label: "Amount", type: "integer", align: "end"},
];
const catalogFields: readonly AeliqoFieldOption[] = [
{id: "name", label: "Name", type: "text"},
{id: "team", label: "Team", type: "text"},
{id: "amount", label: "Amount", type: "integer"},
];
const catalogScope: AeliqoDataScope = {
loaded: catalogRows.length,
filteredTotal: catalogRows.length,
populationDigest: catalogRef.scopeDigest,
kind: "filtered",
label: "Authorized people",
};
const tableColumns: readonly AeliqoTableColumn[] = catalogColumns.map(({key, label, sortable, align}) => ({key, label, ...(sortable === undefined ? {} : {sortable}), ...(align === undefined ? {} : {align})}));
const tableRows: readonly AeliqoTableRow[] = catalogRows.map((row) => ({id: row.id ?? null, name: row.name ?? null, team: row.team ?? null, date: row.date ?? null, amount: row.amount ?? null}));
const personKeys = ["string:3:ada", "string:5:grace"] as const;
registerAeliqoElements();
const host = document.querySelector<HTMLElement>("#aeliqo-example") ?? (() => {
const created = document.createElement("div");
created.id = "aeliqo-example";
(document.body ?? document.documentElement).append(created);
return created;
})();
function createCatalogRoot(container: HTMLElement): HTMLElement {
const root = document.createElement("div");
root.dataset.catalogSourceRoot = "true";
root.style.display = "grid";
root.style.gap = "12px";
container.append(root);
return root;
}
function createCatalogElement<T extends HTMLElement>(tagName: string, container: HTMLElement): T {
const element = document.createElement(tagName) as T;
element.setAttribute("data-aeliqo-theme", "light");
container.append(element);
return element;
}
function appendSlottedText(root: HTMLElement, slot: string, textContent: string): void {
const content = document.createElement("span");
content.slot = slot;
content.textContent = textContent;
root.append(content);
}
const root = createCatalogRoot(host);
(((root) => {
const element = createCatalogElement<AeliqoDetailElement>("aeliqo-detail", root);
element.title = "Person detail";
element.record = catalogRows[0];
element.fields = catalogColumns;
element.identity = ["id"];
element.entity = "person";
element.scope = catalogScope;
}))(root);
Purpose#
Show the declared fields of one selected record as labeled facts. Missing fields stay visible; set
showIdentity to display the record key alongside them.
When to use it#
- Show every declared field of the record a person selected.
- Keep missing fields visible instead of omitting them.
- Display record identity next to a list, table, or editor by setting
showIdentity.
When to use a different component#
- Use KeyValue for a short fact list without record identity.
- Use RecordEditor when the task is editing the record through a form.
Properties and defaults#
Identity and fields are host supplied; missing values remain visible rather than being omitted.
| Property | Use and ownership | Declared type | Initial value |
|---|---|---|---|
record | Supplies the selected record that matches the declared identity and result scope. | AeliqoDataRecord | undefined | undefined |
fields | Defines the fields available to this control, including stable IDs, labels, and declared types. | readonly AeliqoDataColumn[] | [] |
identity | Lists stable identity fields used for selection, detail targeting, and state transfer. | readonly string[] | [] |
entity | Names the catalog entity whose records and identities are displayed. | string | 'record' |
title | Provides the visible title for the current data or compound surface. | string | 'Details' |
showIdentity | Shows the stable identity fields alongside the detail values. | boolean | false |
missingLabel | Provides the text used for a declared field whose value is missing. | string | 'Not available' |
scope | Supplies the visible authorization and population scope associated with the displayed value or rows. | AeliqoDataScope | undefined | undefined |
status | Supplies the explicit ready, loading, empty, partial, stale, or error state. | AeliqoDataStatus | 'ready' |
message | Provides the user-facing status, error, or recovery message. | string | '' |
Events#
- None; read-only presentation
States and failure handling#
Relevant states:
- ready
- empty
- loading
- partial
- stale
- error
Expected result: The selected identity, fields, scope, and missing values are shown honestly.
Keyboard, focus, and accessibility#
Keyboard behavior:
- Focus follows any child links
Exposed semantics:
- aria-label
- dd
- dl
- dt
- header
- role
- section
Responsive behavior#
Long field values wrap within the detail region. Keep record identity visible when the host moves detail below the list.
Style hooks#
- Shadow parts:
detail,fact,facts,header,identity,scope,status - Varendo design tokens referenced:
--aeliqo-color-muted,--aeliqo-space-12,--aeliqo-space-16,--aeliqo-space-4,--aeliqo-space-8,--aeliqo-typography-font-size-caption,--aeliqo-typography-font-size-title
Related components#
Generated TypeScript declaration#
View generated declaration
export declare class AeliqoDetailElement extends LitElement {
static readonly aeliqoVersion = "0.1.0";
static readonly properties: {
record: {
attribute: boolean;
};
fields: {
attribute: boolean;
};
identity: {
attribute: boolean;
};
entity: {
type: StringConstructor;
};
title: {
type: StringConstructor;
};
showIdentity: {
attribute: string;
type: BooleanConstructor;
};
missingLabel: {
attribute: string;
type: StringConstructor;
};
scope: {
attribute: boolean;
};
status: {
type: StringConstructor;
};
message: {
type: StringConstructor;
};
};
record: AeliqoDataRecord | undefined;
fields: readonly AeliqoDataColumn[];
identity: readonly string[];
entity: string;
title: string;
showIdentity: boolean;
missingLabel: string;
scope: AeliqoDataScope | undefined;
status: AeliqoDataStatus;
message: string;
protected render(): import("lit").TemplateResult<1>;
static readonly styles: import("lit").CSSResult[];
}Version#
This page documents the Varendo 0.6 component contract.
