Skip to main content
Version: 1.0.3

Detail View Page

The Detail View Page template is built as compound components on the DetailViewPage namespace. You compose DetailViewPage.Root with the slots you need (TopNav, Header, Metadata, Content, RelatedList, BottomNav, and Actions when used standalone), wire your own data and routing, and keep layout consistent with other data-management templates.

A composed <DetailViewPage /> export also exists for quick scaffolding; this page documents the composable API only.

Library · Components

Button Component v2.4

Reorder TopNav, Metadata, Content, or RelatedList; inject your own data hooks per slot.

Details

Created
Apr 12, 2026
Updated
Apr 18, 2026
Status
Published
Owner
AM
Aarav Mehta

Summary for Button Component v2.4. DetailViewPage.Content accepts a string (shown with preserved line breaks) or any ReactNode for custom blocks.

  • Data Table Pagination Pattern

    Offset and cursor pagination primitives.

  • Dialog & Modal Guidelines

    Focus and stacking rules for overlays.

Installation

ignix add component detail-view-page

Composable layout

Assemble slots inside DetailViewPage.Root. Each slot is a plain React component: pass labels (use Required<DetailViewLabels> when a slot requires the full bundle), callbacks, and record-shaped props for Header, Metadata, Content, and RelatedList.

Reorder or omit slots—for example, move RelatedList above Content, or drop BottomNav when sibling navigation does not apply.

import { DetailViewPage, type DetailViewLabels } from "@ignix-ui/detail-view-page";

export function ComposableDetailExample() {
const labels: Required<DetailViewLabels> = {
back: "Back",
previous: "Previous",
next: "Next",
relatedHeading: "Related items",
edit: "Edit",
delete: "Delete",
share: "Share",
created: "Created",
updated: "Updated",
owner: "Owner",
status: "Status",
emptyRelated: "No related items yet.",
loadingHint: "Loading item…",
};

return (
<DetailViewPage.Root>
<DetailViewPage.TopNav
labels={labels}
onBack={() => window.history.back()}
onPrevious={() => {}}
onNext={() => {}}
hasPrevious
hasNext
/>
<DetailViewPage.Header
title="Item title"
eyebrow="Collection"
subtitle="Optional supporting line."
labels={labels}
onEdit={() => {}}
onShare={() => {}}
onDelete={() => {}}
/>
<DetailViewPage.Metadata
createdAt="Apr 12, 2026"
updatedAt="Apr 18, 2026"
status="Published"
owner={{ name: "Owner Name", initials: "ON" }}
statusStyles={{}}
labels={labels}
/>
<DetailViewPage.Content>
{"Prose or any ReactNode."}
</DetailViewPage.Content>
<DetailViewPage.RelatedList
items={[]}
labels={labels}
onItemClick={(item) => console.log(item.id)}
/>
<DetailViewPage.BottomNav
labels={labels}
onPrevious={() => {}}
onNext={() => {}}
hasPrevious
hasNext
/>
</DetailViewPage.Root>
);
}

Standalone actions row

Use DetailViewPage.Actions when you need the edit / share / delete cluster without the full Header title stack—for example beside a custom hero.

import { DetailViewPage, type DetailViewLabels } from "@ignix-ui/detail-view-page";

export function CustomHeroWithActions() {
const labels: Required<DetailViewLabels> = {
back: "Back",
previous: "Previous",
next: "Next",
relatedHeading: "Related items",
edit: "Edit",
delete: "Delete",
share: "Share",
created: "Created",
updated: "Updated",
owner: "Owner",
status: "Status",
emptyRelated: "No related items yet.",
loadingHint: "Loading item…",
};

return (
<DetailViewPage.Root>
<div className="flex items-center justify-between gap-4">
<h1 className="text-2xl font-semibold">Custom title region</h1>
<DetailViewPage.Actions
labels={labels}
onEdit={() => {}}
onShare={() => {}}
onDelete={() => {}}
/>
</div>
<DetailViewPage.Metadata labels={labels} status="Draft" />
</DetailViewPage.Root>
);
}

Compound slot reference

SlotRole
DetailViewPage.RootTheme wrapper, max-width column, page background.
DetailViewPage.TopNavBack + optional previous/next; supports loading to disable siblings.
DetailViewPage.HeaderEyebrow, title, subtitle, and optional actions via DetailViewPage.Actions.
DetailViewPage.ActionsEdit, share, delete buttons for whichever handlers you pass.
DetailViewPage.MetadataDefinition-list card for dates, status pill, owner.
DetailViewPage.ContentPrimary body card; string children preserve line breaks.
DetailViewPage.RelatedListRelated items or dashed empty state.
DetailViewPage.BottomNavFooter previous/next; mirrors top sibling controls.

Notes

  • Pass labels that satisfies Required<DetailViewLabels> to every slot that renders copy, so TypeScript keeps navigation, actions, and empty states aligned.
  • statusStyles maps status labels to Tailwind classes for the metadata pill; define one entry per status value you display.
  • For loading UX on the composed export only, use the loading prop on <DetailViewPage />; compound slots do not include the skeleton—swap Content / Header for your own placeholders when composing manually.