v0.0.1 · MIT · Framework-agnostic

Component anatomy docs
that are actually alive

Stop exporting annotated screenshots from Figma. Annotate your rendered DOM with data-part and get an interactive, synchronized anatomy panel — in plain HTML, Astro, or Storybook.

// 1. Annotate your component
<div class="thumb" data-part="thumb"></div>

// 2. Wire it up
import { createAnatomy } from '@component-anatomy/core';
createAnatomy({ root, panel });

Try it — this is real

Hover the docs. Hover the component.

This slider is a live component on this page, documented by the library itself.

40
Rootroot

The component wrapper — groups every part below.

Tracktrack

The rail the thumb travels along.

Rangerange

The filled portion, visualizing the current value.

Thumbthumb

The draggable handle. Focusable, arrow-key operable.

Outputoutput

Live value readout, announced via aria-live.

More demos:presets & theming ·Bootstrap via CDN ·shadcn-style ·Storybook addon ↗

Why

Small API, serious rendering

Framework-agnostic core

A dependency-free ~4 kB runtime. Works in plain HTML, any bundler, any framework — anywhere a DOM exists.

Two-way hover sync

Hover docs → highlight the component. Hover the component → highlight the docs. Always in sync.

One attribute

Annotate elements with data-part="thumb". Parts are auto-discovered, names derived from ids.

Themable rendering

Four presets, one-line accent theming, CSS variables, render hooks. Beautiful defaults, full control.

Live overlays

Highlight boxes track the real rendered DOM — resize, scroll, dynamic updates included.

Astro & Storybook

A drop-in Astro component with SSR Markdown, and a Storybook addon panel for any renderer.