File Tree Explorer

An editor-grade file tree: folders open on a soft height spring, hairline guides show depth, and one highlight glides between selected rows. Full WAI-ARIA tree keyboard support with type-ahead; the selected path is announced.

Try it: Click folders, or focus the tree and use ↑ ↓ ← →, Home/End, Enter and type-ahead.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/file-tree-explorer.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/file-tree-explorer. You can also copy the source into components/ui/file-tree-explorer.tsx (view on GitHub).

Usage

import { FileTreeExplorer } from '@/components/ui/file-tree-explorer'

Props

Component props
PropTypeDefaultNotes
dataTreeNode[]DEFAULT_TREE{ id, name, children? } — nodes with children are folders.
defaultExpandedstring[]['app', 'components', 'components/ui']Folder ids open on mount.
value / defaultValuestring | null— / 'components/ui/button.tsx'Selected file id, controlled or uncontrolled.
onValueChange(id, path: string[]) => void—Fires when a file is selected.
titlestring'Explorer'Header label (also the tree’s accessible name).
showPathbooleantrueShow (and announce) the selected path under the tree.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • lucide-react
  • Plucked String Tabs

    Tabs hang from a taut string. Choosing one plucks the string there and the vibration travels as a real damped wave; every tab bobs with the string above it and a glowing bead slides to the active…

  • Island Section Nav

    A floating pill that tells you where you are — current section with a scroll-progress ring — then swells into a full jump bar on hover, focus or tap with a sliding highlight, and settles back when…

  • Compass Rail

    Vertical rail with a shortest-path compass marker.

  • Command Menu

    A Ctrl/⌘ K palette for hopping around a portfolio: fuzzy search that underlines the letters it matched, grouped results, a highlight pill that springs between rows, key-cap hints and full combobox…

  • Halo Menu

    Center action opens a 6-item halo.

  • Magnetic Dock Nav

    Dock with magnetic magnification on hover.

See all 12 Navigation components