Preview Header
A collapsible metadata panel for a document preview — you provide the rows, the component owns only the collapsible shell and their two-column (key | value) layout.
<preview-header> is a collapsible container for document-preview details: a title, a toggle chevron, and a
two-column table (key | value) whose rows are entirely projected by the caller. It owns only the shell — which metadata fields to
show, and what renders them, is entirely up to the consuming app.
Minimal example
import { Component, input } from "@angular/core";
import { PreviewHeaderComponent } from "@sinequa/atomic-angular";
import type { Article } from "@sinequa/atomic";
@Component({
selector: "my-preview",
imports: [PreviewHeaderComponent],
template: `
<preview-header [title]="article().title">
<tr>
<th>Type</th>
<td>{{ article().docformat }}</td>
</tr>
@if (article().authors?.length) {
<tr>
<th>Author</th>
<td>{{ article().authors?.join(", ") }}</td>
</tr>
}
</preview-header>
`,
})
export class MyPreviewComponent {
readonly article = input.required<Article>();
}Two different host apps can project entirely different rows into the same <preview-header> — fewer fields,
or app-specific ones — without forking the component. A conditional row is written with a plain @if around
the <tr>, same as any other content projection.
Options
Prop
Type
This component has no outputs — it manages its own open/collapsed state internally (open by default).
Pitfalls
What's next
Preview Actions
The toolbar overlaid on a document preview — a converter dropdown, zoom controls, search-in-document, and a highlights popover — plus a slot for app-specific actions.
Preview service
Fetch a document's preview data, drive its zoom and pagination, and toggle its highlights — the service every preview component delegates to.