BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/neon-ui/branch-tree

BranchTree

neon-ui/branch-tree
FreeComponent

A drawn branch graph: nodes colored by compute state, curved edges to each parent, default and selected marked.

Install it

npx shadcn@latest add https://ui.neon.com/r/branch-tree.json

Source

src/components/branch-tree/branch-tree.tsxui.neon.com/r/branch-tree.json · first 6 KB
1"use client";
2
3import { GitBranchIcon, SquareLock01Icon } from "@hugeicons/core-free-icons";
4import { HugeiconsIcon } from "@hugeicons/react";
5import { useState } from "react";
6import type { ComponentProps } from "react";
7
8import { cn } from "@/lib/utils";
9
10/** Compute lifecycle, mirrored from ComputeStatus. Drives the node color. */
11export type ComputeState = "active" | "idle" | "scaling" | "suspended";
12
13export interface Branch {
14 id: string;
15 name: string;
16 /** The project's default branch: its node wears a primary ring. */
17 default?: boolean;
18 /** A protected branch: shows a lock. */
19 protected?: boolean;
20 /** The parent branch's id; the edge is drawn from it. */
21 parent?: string;
22 /** Compute state, painted onto the node dot. */
23 state?: ComputeState;
24 /** ISO timestamp of the branch's last update, shown as relative time. */
25 updatedAt?: string;
26}
27
28interface TreeNode {
29 branch: Branch;
30 depth: number;
31 row: number;
32}
33
34/* ─────────────────────────────────────────────────────────
35 * GEOMETRY
36 *
37 * The graph is a real node-link drawing, not indent guides.
38 * Rows stack at a fixed height; a branch sits in the lane of
39 * its depth. Each child's edge leaves its parent's lane,
40 * runs down, and curves (a fixed-radius quarter turn) into
41 * the child's node. Node color is the compute state; the
42 * default branch and the selected branch wear a ring.
43 * ───────────────────────────────────────────────────────── */
44const ROW_H = 46;
45const LANE_W = 22;
46const PAD_X = 18;
47const DOT_R = 3.5;
48const CORNER = 12;
49
50const laneX = (depth: number) => PAD_X + depth * LANE_W;
51const rowY = (row: number) => row * ROW_H + ROW_H / 2;
52
53/** Staggered entrance: edges draw, nodes pop, rows fade, top to bottom. */
54const STAGGER = 0.06;
55const DRAW = 0.45;
56const POP = 0.32;
57
58const BRANCH_TREE_STYLES = `
59@keyframes neon-bt-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
60@keyframes neon-bt-pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
61@keyframes neon-bt-row { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
62@media (prefers-reduced-motion: reduce) {
63 [data-slot="branch-tree"] * { animation: none !important; }
64}
65`;
66
67// … truncated

What it pulls in

npm packages

  • @hugeicons/react
  • @hugeicons/core-free-icons

Other registry items

  • utils
  • https://ui.neon.com/r/neon-tokens.json

Files it writes

  • src/components/branch-tree/branch-tree.tsx

Facts

Registry
neon-ui
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

ui.neon.com neondatabase/ui on GitHub Raw registry item This item as JSON

More from neon-ui

All 77 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ActivityFeedactivity-feedneon-uiComponentsFree2 deps
AgentChatagent-chatneon-uiComponentsFree6 deps
AnimatedWashanimated-washneon-uiComponentsFreeno deps · 2 files
ApiKeyListapi-key-listneon-uiComponentsFree2 deps
AppCardapp-cardneon-uiComponentsFree2 deps
AppCreatorapp-creatorneon-uiComponentsFree2 deps
AuthFormauth-formneon-uiComponentsFreeno deps
AutoscaleChartautoscale-chartneon-uiComponentsFree1 dep

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