BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/moco/diagram

Diagram Kit

moco/diagram
FreeComponent

HTML/CSS block diagrams — rows, blocks with variants and tooltips, diamonds, brackets, notes, and a legend. Real DOM: selectable, screen-reader reachable, reflows.

Live preview

live · rendered by the registry
Rendered by moco on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://mocoui.site/r/diagram.json

Source

registry/diagram/diagram.tsxmocoui.site/r/diagram.json
1import * as React from "react";
2import "./diagram.css";
3
4/**
5 * HTML/CSS block diagrams. Real DOM, not SVG and not images: every label is
6 * selectable text, reachable by a screen reader, and reflows on mobile.
7 */
8
9export interface DgmProps {
10 children: React.ReactNode;
11 minWidth?: number;
12 live?: boolean;
13}
14
15export function Dgm({ children, minWidth, live }: DgmProps) {
16 return (
17 <div
18 className="moco-dgm"
19 style={minWidth ? { minWidth } : undefined}
20 role="group"
21 aria-live={live ? "polite" : undefined}
22 >
23 {children}
24 </div>
25 );
26}
27
28export interface DgmRowProps {
29 label?: string;
30 children: React.ReactNode;
31 note?: React.ReactNode;
32}
33
34export function DgmRow({ label, children, note }: DgmRowProps) {
35 return (
36 <>
37 <div className="moco-dgm-row">
38 <div className="moco-dgm-row-label">{label}</div>
39 <div className="moco-dgm-track">{children}</div>
40 </div>
41 {note ? (
42 <div className="moco-dgm-row" style={{ marginTop: "-0.7rem" }}>
43 <div />
44 <div className="moco-dgm-note">{note}</div>
45 </div>
46 ) : null}
47 </>
48 );
49}
50
51export type BlockVariant = "default" | "active" | "dashed" | "warn" | "ghost";
52
53export interface DgmBlockProps {
54 label: React.ReactNode;
55 sub?: React.ReactNode;
56 variant?: BlockVariant;
57 tip?: string;
58 grow?: number;
59 id?: string;
60}
61
62export function DgmBlock({
63 label,
64 sub,
65 variant = "default",
66 tip,
67 grow = 1,
68 id,
69}: DgmBlockProps) {
70 return (
71 <div
72 id={id}
73 className="moco-dgm-block"
74 data-variant={variant}
75 style={{ flexGrow: grow }}
76 tabIndex={tip ? 0 : undefined}
77 title={tip}
78 >
79 <span className="moco-b-label">{label}</span>
80 {sub ? <span className="moco-b-sub">{sub}</span> : null}
81 {tip ? <span className="moco-dgm-tip">{tip}</span> : null}
82 </div>
83 );
84}
85
86export function DgmDiamond({ label }: { label?: string }) {
87 return (
88 <span
89 style={{ display: "inline-flex", alignItems: "center", flex: "none" }}
90 aria-label={label ? `marker: ${label}` : "marker"}
91 >
92 <span className="moco-dgm-diamond" />
93 {label ? (
94 <span style={{ fontSize: 11.5, color: "var(--moco-faint)" }}>{label}</span>
95 ) : null}
96 </span>
97 );
98}
99
100export interface DgmBracketProps {
101 children: React.ReactNode;
102 /** How many block-widths the bracket covers. */
103 span?: number;
104 /** How many block-widths to skip before it starts. */
105 offset?: number;
106// … truncated

What it pulls in

Other registry items

  • https://mocoui.site/r/tokens.json

Files it writes

  • registry/diagram/diagram.tsx
  • registry/diagram/diagram.css

Facts

Registry
moco
Type
registry:component
Access
Free
Files written
2
Licence
MIT
In the index
at or before 2026-08-16
Last confirmed
today

Go to the source

Docs on moco mocoui.site shreya0204/moco on GitHub Raw registry item This item as JSON

More from moco

All 20 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
CodecodemocoComponentsFree1 dep · 3 files
ComparecomparemocoComponentsFreeno deps · 2 files
Count UpcountupmocoComponentsFreeno deps · 2 files
CovercovermocoComponentsFreeno deps · 2 files
Dot GriddotgridmocoComponentsFreeno deps · 2 files
FigurefiguremocoComponentsFreeno deps · 2 files
HookshooksmocoComponentsFreeno deps
IslandislandmocoComponentsFreeno deps · 2 files

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