BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ilinxa/detail-panel

Detail Panel

ilinxa/detail-panel
FreeBlock

Selection-aware detail container with read and edit modes, lifecycle states, sticky header and footer actions, and a slot-based body.

Install it

npx shadcn@latest add https://ui.ilinxa.com/r/detail-panel.json

Source

src/registry/components/feedback/detail-panel/detail-panel.tsxui.ilinxa.com/r/detail-panel.json
1"use client";
2
3import {
4 useCallback,
5 useEffect,
6 useImperativeHandle,
7 useMemo,
8 useRef,
9} from "react";
10import type {
11 DetailPanelContextValue,
12 DetailPanelHandle,
13 DetailPanelProps,
14} from "./types";
15import { DEFAULT_DETAIL_PANEL_LABELS } from "./types";
16import { DetailPanelContext } from "./parts/detail-panel-context";
17import { DetailPanelHeader } from "./parts/detail-panel-header";
18import { DetailPanelBody } from "./parts/detail-panel-body";
19import { DetailPanelActions } from "./parts/detail-panel-actions";
20import { DetailPanelEmptyState } from "./parts/detail-panel-empty-state";
21import { DetailPanelSkeleton } from "./parts/detail-panel-skeleton";
22import { DetailPanelError } from "./parts/detail-panel-error";
23import { SelectionAnnouncer } from "./parts/selection-announcer";
24import { useDetailPanelMode } from "./hooks/use-detail-panel-mode";
25import { useFocusRestore } from "./hooks/use-focus-restore";
26import { keyForSelection } from "./lib/selection-key";
27import { cn } from "@/lib/utils";
28
29const FOCUSABLE =
30 'input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';
31
32function DetailPanelImpl({
33 selection,
34 mode: controlledMode,
35 onModeChange,
36 canEdit = true,
37 loading = false,
38 error = null,
39 emptyState,
40 children,
41 ariaLabel,
42 labels,
43 className,
44 ref,
45}: DetailPanelProps) {
46 const resolvedAriaLabel =
47 ariaLabel ?? labels?.region ?? DEFAULT_DETAIL_PANEL_LABELS.region;
48 const rootRef = useRef<HTMLDivElement>(null);
49 const bodyRef = useRef<HTMLDivElement>(null);
50
51 const selectionKey = useMemo(() => keyForSelection(selection), [selection]);
52
53 const { mode, setMode } = useDetailPanelMode({
54 controlledMode,
55 onModeChange,
56 selectionKey,
57 });
58
59 const { captureTrigger } = useFocusRestore({ mode, rootRef, bodyRef });
60
61 const wrappedSetMode = useCallback(
62 (next: typeof mode) => {
63 captureTrigger();
64 setMode(next);
65 },
66 [captureTrigger, setMode],
67 );
68
69 const hasError = !!error;
70 const hasSelection = selection !== null;
71
72 const lastSelectionKeyRef = useRef(selectionKey);
73 useEffect(() => {
74 if (lastSelectionKeyRef.current === selectionKey) return;
75 lastSelectionKeyRef.current = selectionKey;
76 rootRef.current?.focus({ preventScroll: true });
77 }, [selectionKey]);
78
79 const focusBody = useCallback(() => {
80 const body = bodyRef.current;
81 if (!body) return;
82 const focusable = body.querySelector<HTMLElement>(FOCUSABLE);
83// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • button
  • skeleton

Files it writes

  • src/registry/components/feedback/detail-panel/detail-panel.tsx
  • src/registry/components/feedback/detail-panel/index.ts
  • src/registry/components/feedback/detail-panel/types.ts
  • src/registry/components/feedback/detail-panel/hooks/use-detail-panel-mode.ts
  • src/registry/components/feedback/detail-panel/hooks/use-focus-restore.ts
  • src/registry/components/feedback/detail-panel/lib/selection-key.ts
  • src/registry/components/feedback/detail-panel/parts/detail-panel-actions.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-body.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-context.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-empty-state.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-error.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-header.tsx
  • src/registry/components/feedback/detail-panel/parts/detail-panel-skeleton.tsx
  • src/registry/components/feedback/detail-panel/parts/selection-announcer.tsx

Facts

Registry
ilinxa
Type
registry:block
Access
Free
Files written
14
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

ui.ilinxa.com ilinxa/pro-ui on GitHub Raw registry item This item as JSON

More from ilinxa

All 184 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Account Switcheraccount-switcherilinxaBlocksFree1 dep · 10 files
Account Switcher (deprecated alias)account-switcher-01ilinxaBlocksFreeno deps
Account Switcher — fixturesaccount-switcher-fixturesilinxaBlocksFreeno deps
App Sidebarapp-sidebarilinxaBlocksFree1 dep · 37 files
App Sidebar — fixturesapp-sidebar-fixturesilinxaBlocksFreeno deps
Rich Text Editor (deprecated alias)article-body-01ilinxaBlocksFreeno deps
Article Metaarticle-metailinxaBlocksFree1 dep · 4 files
Article Meta (deprecated alias)article-meta-01ilinxaBlocksFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex