Card Tree Node
ilinxa/card-tree-nodeFreeBlock
Card-tree renderer for flow canvas nodes — read-only viewer, a consumer-owned edit dialog pattern, and a typed port editor strip.
Install it
npx shadcn@latest add https://ui.ilinxa.com/r/card-tree-node.jsonSource
1"use client";23import { memo } from "react";4import { cn } from "@/lib/utils";5import type { FlatField } from "../types";6import { formatValue } from "../lib/format-value";78/**9 * Paints the first N flat-field entries from a card-tree tree as a definition10 * list. Type-aware styling: numbers right-aligned (tabular), booleans + dates11 * narrow, strings fluid.12 */13function FlatFieldStripImpl({ fields }: { fields: FlatField[] }) {14 if (fields.length === 0) return null;15 return (16 <dl className="grid grid-cols-[max-content_1fr] gap-x-2 gap-y-0.5 px-3 py-2 text-xs">17 {fields.map((field) => (18 <div key={field.key} className="contents">19 <dt className="truncate font-medium text-muted-foreground">{field.key}</dt>20 <dd21 className={cn(22 "truncate",23 field.type === "number" && "text-right font-mono tabular-nums",24 field.type === "boolean" && "text-center",25 field.type === "date" && "font-mono",26 )}27 >28 {formatValue(field.value, field.type)}29 </dd>30 </div>31 ))}32 </dl>33 );34}3536export const FlatFieldStrip = memo(FlatFieldStripImpl);
What it pulls in
npm packages
Other registry items
Files it writes
More from ilinxa
All 184 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Switcheraccount-switcher | ilinxa | Blocks | Free | 1 dep · 10 files | |
| Account Switcher (deprecated alias)account-switcher-01 | ilinxa | Blocks | Free | no deps | |
| Account Switcher — fixturesaccount-switcher-fixtures | ilinxa | Blocks | Free | no deps | |
| App Sidebarapp-sidebar | ilinxa | Blocks | Free | 1 dep · 37 files | |
| App Sidebar — fixturesapp-sidebar-fixtures | ilinxa | Blocks | Free | no deps | |
| Rich Text Editor (deprecated alias)article-body-01 | ilinxa | Blocks | Free | no deps | |
| Article Metaarticle-meta | ilinxa | Blocks | Free | 1 dep · 4 files | |
| Article Meta (deprecated alias)article-meta-01 | ilinxa | Blocks | Free | no deps |
