← Work

Open-source React package

shadcn Virtualized Tree

A publishable React tree component with virtualization, drag-and-drop ordering, tri-state checkboxes, and accessible keyboard navigation.

Role
Library author
Year
2024
Stack
React, TypeScript, shadcn/ui, Vitest, tsup

Problem

Tree controls get difficult quickly: nested state, selection, drag-and-drop, keyboard navigation, and large data sets all collide in the same component. The goal was to create a package that felt natural in a shadcn/ui codebase without forcing teams into one rigid visual design.

Approach

The implementation separates tree state from rendering so consumers can adopt the behavior without giving up styling control. Virtualization keeps large trees responsive, while the interaction model preserves ARIA tree expectations and keyboard navigation.

Outcome

The package is published on npm with a public playground, documentation, and test coverage. Consumers get a reusable tree API with virtualization, drag-and-drop ordering, tri-state selection, and keyboard support without giving up control of presentation.