npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jeryfan/finder-ui

v0.5.0

Published

A macOS Finder-style file browser component for React

Readme

finder-ui

A macOS Finder-style file browser component for React.

Install

npm install finder-ui

Quick Start

import { Finder } from 'finder-ui'

function App() {
  return (
    <Finder
      style={{ height: '100vh' }}
      tabs={[
        { key: 'files', label: 'Files', rootPath: '/' },
      ]}
      onFetchFiles={async (path) => {
        const res = await fetch(`/api/files?path=${path}`)
        return (await res.json()).files
      }}
    />
  )
}

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | tabs | SidebarTab[] | Yes | Tab configuration for sidebar navigation | | onFetchFiles | (path: string) => Promise<FileEntry[]> | Yes | Fetch files for a directory path | | defaultTab | string | No | Key of the initially active tab | | onOpenFile | (file: FileEntry) => Promise<string \| void> | No | Handle file open; return content string to show in preview | | onDownload | (file: FileEntry) => void | No | Handle single file download | | onBatchDownload | (files: FileEntry[]) => void | No | Handle batch file download | | onUpload | (files: File[], targetPath?: string) => Promise<void> | No | Handle file upload | | onSave | (path: string, content: string) => Promise<void> | No | Handle save of edited file content | | onRename | (file: FileEntry, newName: string) => Promise<void> | No | Handle file/folder rename | | onDelete | (files: FileEntry[]) => Promise<void> | No | Handle file/folder deletion | | onCreateFolder | (parentPath: string, name: string) => Promise<void> | No | Handle new folder creation | | editable | boolean | No | Enable file editing in preview panel | | renderMarkdown | (content: string) => ReactNode | No | Custom markdown renderer | | locale | Partial<FinderLocale> | No | Localization strings (defaults to English) | | className | string | No | Additional CSS class for root element | | style | CSSProperties | No | Inline styles for root element (e.g. dimensions) | | theme | 'target' \| 'graphite' \| 'clean' | No | Theme variant (default: 'target') |

Keyboard Shortcuts

| Key | Action | |-----|--------| | / | Navigate file list | | Enter | Open file or enter folder | | Backspace | Go to parent directory | | ⌘/Ctrl + A | Select all files | | Delete | Delete selected files | | Escape | Clear selection |

Sizing

The component fills its parent by default (width: 100%; height: 100%). Use the style or className prop to set explicit dimensions:

// Full viewport
<Finder style={{ height: '100vh' }} ... />

// Fixed height
<Finder style={{ height: 600 }} ... />

// Fill parent (parent must have explicit height)
<Finder ... />

Multiple Instances

Each <Finder> creates an isolated store — multiple instances on the same page work independently with no shared state.

Examples

Run the development server and navigate to http://localhost:5173/#examples to see all examples:

npm run dev
# open http://localhost:5173/#examples

| Example | Description | |---------|-------------| | Basic | Minimal setup — one tab, file listing only (~10 lines) | | With Preview | File preview for Markdown, code, CSV, images, and audio | | File Operations | Full CRUD — rename, delete, create folder, upload, and save | | Internationalization | Dynamic locale switching (English, Chinese, Japanese) | | Custom Theme | Theme switching (target/graphite/clean) and CSS variable overrides | | Multiple Instances | Two independent Finder instances side by side | | Kitchen Sink | All features combined — multi-tab, preview, editing, i18n, themes, CRUD |

All examples use frontend mock data with no backend required.

Peer Dependencies

{
  "react": "^18.0.0 || ^19.0.0",
  "react-dom": "^18.0.0 || ^19.0.0",
  "zustand": "^5.0.0",
  "marked": "^17.0.0",
  "@codemirror/lang-json": "^6.0.0",
  "@codemirror/theme-one-dark": "^6.0.0",
  "@codemirror/state": "^6.0.0",
  "@codemirror/view": "^6.0.0",
  "@uiw/react-codemirror": "^4.20.0"
}

License

MIT