BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/bklit-ui/sunburst-chart
This component no longer exists. It was in bklit-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-10 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Sunburst Chart

bklit-ui/sunburst-chart
RemovedComponent

A composable hierarchical sunburst chart with drill-down zoom and animated segments

Install it

npx shadcn@latest add https://bklit.com/r/sunburst-chart.json

Source

src/charts/sunburst-chart.tsxbklit.com/r/sunburst-chart.json · first 6 KB
1"use client";
2
3import type { Transition } from "motion/react";
4import { animate, motion } from "motion/react";
5import {
6 Children,
7 isValidElement,
8 memo,
9 type ReactElement,
10 type ReactNode,
11 useCallback,
12 useEffect,
13 useMemo,
14 useRef,
15 useState,
16} from "react";
17import {
18 type ArcDatum,
19 buildArcs,
20 buildHoverGrowTargets,
21 buildSunburstEnterTiming,
22 defaultSunburstGrowPadding,
23 maxHoverSegmentThickness,
24} from "./sunburst";
25import {
26 defaultSunburstColors,
27 opacityForRelativeDepth,
28 type SunburstContextValue,
29 SunburstProvider,
30} from "./sunburst-context";
31import type { SunburstNode } from "./sunburst-data";
32
33export type { ArcDatum, Focus } from "./sunburst";
34export type { SunburstNode } from "./sunburst-data";
35
36const DEFAULT_HOVER_POP = 8;
37
38function componentDisplayName(child: ReactElement): string {
39 return (
40 (child.type as { displayName?: string }).displayName ||
41 (child.type as { name?: string }).name ||
42 ""
43 );
44}
45
46function isDefsComponent(child: ReactElement): boolean {
47 const name = componentDisplayName(child);
48 return (
49 name.includes("Gradient") ||
50 name.includes("Pattern") ||
51 name === "LinearGradient" ||
52 name === "RadialGradient"
53 );
54}
55
56function isOutsideSvgComponent(name: string): boolean {
57 return name === "SunburstBreadcrumb" || name === "SunburstHint";
58}
59
60function isSunburstSegment(
61 child: ReactNode
62): child is ReactElement<{ index: number }> {
63 return (
64 isValidElement(child) && componentDisplayName(child) === "SunburstSegment"
65 );
66}
67
68/** Inner rings last so parent segments win hit testing at ring boundaries. */
69function sortSunburstSegments(
70 segments: ReactElement<{ index: number }>[],
71 arcs: ArcDatum[]
72): ReactElement<{ index: number }>[] {
73 return [...segments].sort((a, b) => {
74 const arcA = arcs[a.props.index];
75 const arcB = arcs[b.props.index];
76 const depthA = arcA?.depth ?? 0;
77 const depthB = arcB?.depth ?? 0;
78 if (depthA !== depthB) {
79 return depthB - depthA;
80 }
81 return (b.props.index ?? 0) - (a.props.index ?? 0);
82 });
83}
84
85export interface SunburstChartProps {
86 data: SunburstNode;
87 size?: number;
88 /** Bump to replay the initialization animation. */
89 playKey?: number;
90 className?: string;
91 /** Controlled focus node id for drill-down. */
92 focusId?: string;
93 /** Called when focus changes via segment click or breadcrumb. */
94 onFocusChange?: (focusId: string) => void;
95 /** Controlled hover — arc index in the arcs array. */
96// … truncated

What it pulls in

npm packages

  • motion

Other registry items

  • @bklit/chart-animation
  • @bklit/utils

Files it writes

  • src/charts/sunburst-chart.tsx
  • src/charts/sunburst-context.tsx
  • src/charts/sunburst-segment.tsx
  • src/charts/sunburst-center.tsx
  • src/charts/sunburst-breadcrumb.tsx
  • src/charts/sunburst-hint.tsx
  • src/charts/sunburst-labels.tsx
  • src/charts/sunburst.ts
  • src/charts/sunburst-data.ts

Facts

Registry
bklit-ui
Type
registry:component
Access
Free
Files written
9
Licence
MIT
In the index
at or before 2026-08-06
Last confirmed
9 days ago

Go to the source

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

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