Skip to content

File explorer

In review
Live · web

The shell: eyebrow + actions over the real Tree; empty forests get the Well

nockerl-design
src
composites
ChatInput.tsx
Tabs.tsx
FileExplorer.tsx
index.ts
tokens
color.dark.json
size.json
component-catalog.md

Opened 0 files · selected chat-input · arrow-key the rows (the Tree's full WAI-ARIA semantics), collapse/expand from the header slot. The island is live.

The web console’s file explorer is, per the de-phantom verdict, a deliberately THIN SHELL that invents nothing: the forest is the shipped Tree (file-type tints, full WAI-ARIA keyboard semantics, controlled expand/select), the header is an eyebrow title plus an open actions slot (drop IconButtons or a Menu trigger in; the shell owns no controls), and an empty forest renders the packaged recessed Well with your message + optional action.

import { NockerlFileExplorer } from '@dizyx/nockerl-react';
<NockerlFileExplorer
title="nockerl-design"
nodes={forest} // NockerlTreeNode[], the shipped Tree's shape
expandedIds={expanded}
onToggleExpand={setExpanded}
selectedId={activePath}
onSelect={openFile}
actions={<NockerlIconButton icon={collapseIcon} label="Collapse all" variant="plain" size={24} onClick={collapseAll} />}
emptyTitle="No files open"
emptyAction={<NockerlButton text="Load the repo" size="sm" variant="secondary" onClick={load} />}
/>
PropTypeDefaultDescription
titlestring'Files'Eyebrow title in the header strip.
actionsReactNodeOpen header slot (IconButtons, a Menu trigger); the shell owns no controls.
nodes *NockerlTreeNode[]The forest (pass-through to NockerlTree). Empty → the built-in empty state.
ariaLabelstringAccessible name for the tree (defaults to the title).
expandedIds *Set<string>Controlled expanded folder ids (pass-through).
onToggleExpand((next: Set<string>) => void) | undefinedExpansion changes (pass-through).
selectedIdstring | nullSelected node id (single-select explorer mode; pass-through).
onSelect((id: string) => void) | undefinedLeaf activation (pass-through).
emptyTitlestring'No files'Empty-state title (nodes empty).
emptyMessagestring'Nothing to show here yet.'Empty-state supporting message.
emptyActionReactNodeOptional empty-state action node (e.g. a NockerlButton).
maxBodyHeightstringCap the tree body height; overflow scrolls (the panel, not the page).
classNamestringExtra class on the shell.