Graph Features
Deep dive into Fewer's graph visualization: React Flow canvas, custom card types, layout engines, connection styles, and navigation features.
Fewer is a very feature-rich directory viewer. Here is a deep dive into all of its features:
Canvas
Fewer uses React Flow v12 as the rendering engine. The canvas supports:
- Pan (drag empty space)
- Zoom (scroll wheel or +/- keys)
- Scroll action (Settings → Advanced): defaults to Scroll to pan, where the wheel pans vertically and Ctrl/⌘+scroll zooms; switch to Scroll to zoom to make the wheel zoom directly instead (trackpad pinch-zoom always works)
- Fit view (Space key)
- Minimap (bottom-right, configurable): chips are flat fills in the card accents, everything outside the current viewport is dimmed toward the active theme's background (light, dark and custom themes alike), and the viewport itself is outlined in the selection colour (both disappear at fit-zoom, where the whole graph is the viewport). Drag the map to pan, wheel to zoom it
- Controls (zoom in/out, fit view buttons)
- Right-click empty canvas for the canvas context menu
Canvas Context Menu
Right-click empty canvas space to open quick actions. The menu opens with a header naming what you hit — Canvas, with the card count under it (and how many are hidden):
- Select All: select every visible card
- Organize: re-runs the tree layout to reflow the graph, in every view and not just the active one. The view re-fits to the whole graph afterwards, and a layout-direction change does the same
- Paste: paste clipboard contents at the mouse position (Power User mode)
- Show All: reveal hidden cards (Power User mode)
- Hide Files / Show Files and Hide Minimap / Show Minimap: per-view toggles for the panel this canvas shows
- Clear Canvas: empties the whole graph
Connection Context Menu
Right-click a connection for a menu headed Connection, with both ends named
(src → index.ts):
- Go to Parent: selects and centres the card the arrow starts from
- Go to Child: selects and centres the card it points at
- Delete Connection: removes just that link, leaving both cards in place
Right-clicking a single card of a multi-selection opens the selection menu instead (see Multi-Select), headed with the count and how it breaks down.
Card Types
Folder Cards (Orange)
- Children inline: scrollable list of child cards inside the card
- Item counts: shows number of children
- Size display: total size of all children
- Collapsible: click to expand/collapse children
- Level of detail (zoom): zoom below 0.3 and every folder paints as its one-line pill — child rows drop away with the zoom and come back when you cross the seam again. The pill's chevron zooms you in past the seam rather than writing collapse state, so your own collapse choices (and exports) are untouched
- Resizable: drag corners to adjust (multi-direction)
File Cards (Purple)
- Filename + extension: displayed with category icon
- Size: file size in bytes/KB/MB
- Category: auto-detected from extension (image, code, doc, etc.)
- No children: source handle hidden
- Resizable: horizontal only (width)
Card Resizing
Select a card to see resize handles:
- Folders: resize in all directions
- Files: resize horizontally only (width)
Handle Shortcuts
Ctrl+click a card's input or output handle removes all connections from that handle.
Build the Tree by Dragging Handles
Every card has an input handle (entry, on the left/top) and an output handle (exit, on the right/bottom).
- Drag from a folder's output handle and release over empty canvas → the Add child card dialog opens, letting you create a folder or file inside that folder.
- Drag from any card's input handle and release over empty canvas → the Add parent card dialog opens, letting you create a folder that becomes the card's new parent. The new parent is always a folder:
Multi-Select
- Ctrl+A: select all visible cards
- Shift+Arrow keys: add cards to the selection while navigating
- Parent selected cards: batch-parent multiple selected cards under the last-selected folder (Alt+P)
- Alt+Shift+P: unparents the selected cards. Only the top-most ones detach (a selected descendant whose selected ancestor also detaches stays put), the whole thing is one undo step, and nothing is toasted when there was nothing to detach
- Batch delete, copy, cut, duplicate all work on multi-selections
Drag & Drop (from your OS)
Disabled in the web build. Dropping a folder from your file system onto the
canvas (to expand it from disk, or to import it directly on an empty canvas)
needs OS drop events and File System Access handles, which are switched off by
the LOCAL_FS_FEATURES flags in src/lib/fewer/features.ts. Use Import from
disk (Alt+I) instead.
Dragging cards within the canvas (reparenting, adding a child from a folder's output handle) is unaffected: it uses the app's own drag payload, not the OS.
Layout Engine
Fewer ships a single custom Reingold-Tilford tree layout with contour matching, designed specifically for directory trees. It handles large graphs (1K+ cards) and is used for both initial import and relayout operations.
The layout is not the limit of the app. The whole canvas has been tested with 5,000 folders on it, and we have run it up to 25,000 files: it stays smooth, because zoomed-out folders collapse to a one-line pill, large folders hide their rows, and the layout runs asynchronously, so the canvas keeps up while you zoom, search and rearrange.
- Strict parents-centered-over-children placement with contour matching
- Tighter spacing (35px average) and collision prevention
- Crown shyness spacing: gaps between sibling subtrees scale with subtree depth and size (like tree canopies that never touch), so large branch clusters get natural breathing room instead of uniform packing. Adjust it from 0 to 3 with the Crown Shyness slider in Settings → Advanced (Power User mode); click the value next to the slider to type an intensity, which applies as soon as you release the slider or commit the typed value. Changing the intensity clears the active view's manual card positions, since those were spaced for the old value. The slider is curved rather than linear: 0 is flat, 1 (the default) keeps the spacing a default canvas has always had, 2 is clearly looser, and 3 opens the tree right up. The top of the range is capped there, so 3 is as loose as the layout gets (roughly +70% spread on a wide graph, against about +10% before this was tuned)
- Best for large graphs (1K+ cards)
- Async computation for large imports, sync for relayout
- Supports all 4 layout directions (Top→Bottom, Left→Right, Bottom→Top, Right→Left)
Layout Directions
Cycle through 4 directions (two if in basic mode) with Ctrl+L or via sidebar:
- Top → Bottom (default)
- Left → Right
- Bottom → Top (limited to advanced mode)
- Right → Left (limited to advanced mode)
Sibling Sort
Children within each folder are drawn in a chosen order. The sort applies recursively at every level, so folders and files are laid out consistently across the whole graph. Change it in Settings → Appearance → Sibling Sort:
- Order by:
- Direction: Ascending / Descending (it only inverts the primary key: Name and Size both sort unknown or empty values last in either direction, and Type always keeps folders first).
Changing either control re-lays out the graph immediately. The choice is saved with your other preferences and is not tied to a saved graph.
Tags (Pro)
Tags are named, colored labels you can attach to any folder or file card. Tagging requires a signed-in Pro account.
Assign tags: right-click any card → Tags. The submenu lists every tag as a checkbox (checked = assigned) and a + New tag row that creates one and immediately assigns it. While naming a new tag, click a color swatch to pick that color, or press Enter to accept the next palette color.
Tag many at once: select several cards, then right-click the selection → Tags — the very same submenu, not a separate dialog. There the checkbox is checked when every selected card carries the tag and shows a dash when only some do; clicking a mixed or unchecked tag assigns it to the whole selection, and clicking a fully-checked one removes it from all of them. A tag created from it is applied to every selected card in the same single undo step.
The highlight ring: every tagged card shows a permanent ring around its border, colored by its tags. With multiple tags, the ring is split into even, hard-edged segments, one per tag (up to 5; extra tags collapse into a "+N" dot), never a gradient blend. When the card is selected, the themed selection ring replaces the tag ring; deselect to see the tags again.
Manage the palette: the sidebar Tags panel (visible once a graph is loaded) lists every tag with its color swatch. Create, rename, recolor (color picker), or delete tags. New tags can pick a color from the swatch row (or the sidebar panel) at creation time; deleting a tag removes it from every card that carries it.
Undo: assigning or unassigning a tag is undoable (Ctrl+Z), and a batch assignment reverts as one step. Deleting a tag is undoable too; undo restores the tag itself, re-assigns the cards it was stripped from, and returns it to the active filter. Deleting a tag that was filtering also releases the cards it was hiding (hides owned by other layers stay). Creating, renaming, or recoloring a tag only edits the palette and is not a history step.
Filter by tag: the search panel shows a chip per tag. Toggle chips to filter the canvas: only cards that carry at least one selected tag (OR semantics) stay visible, and every other card is removed. Folders are hidden too, but only when neither they nor anything inside them matches, so a folder that contains a matching card stays visible as an anchor. Clear with the ✕.
Sort by tag: Settings → Appearance → Sibling Sort → Order by: Tag orders siblings by the alphabetical label of their first tag; untagged cards always trail.
Tags are part of the graph data: they ride along with saved graphs, share links, version history, and the local reload cache.
Tags vs groups: a tag classifies a card wherever it sits; a canvas group (Editing → Groups) boxes a set of cards on this one canvas. Reach for the label when the meaning should follow the card across the whole graph, and for the frame when the cluster itself is the point — the two are separate systems on purpose.
Max Display Depth
Configurable display depth (default 6 levels) for both import-time and post-import. Deeper cards go to the Hidden Cards panel. Adjust in Settings → Advanced (Power User mode).
Connection Styles
Curved
Smooth bezier curves. Best for general use.
Angled
Sharp corners with configurable radius (0-20px). Adjust via sidebar.
Straight
Direct lines. Minimalist look.
Connection Motion
Optional motion effects:
- None: static connections
- Flow: animated dash offset
- Pulse: animated stroke opacity
Connection motion is a signed-in (Power User) feature: it's only available to authenticated users. A Settings → Appearance toggle, Animate Selected Connections Only, limits the animation to the connections along the selected cards' path to the root (the same connections that get the selection highlight) instead of every connection on the canvas. It works on its own: you do not have to turn on the connection motion toggle first. The animated connections use the Selected Connection Pattern (dashed or dotted) chosen in the same dialog, and connections outside the selection follow the Motion and Pattern controls in the same tab.
Connection Pattern & Weight
In Power User mode, Settings → Appearance → Connection Styling controls:
- Motion: static or animated. It applies to every connection, or only to the non-selected ones when Animate Selected Connections Only is on
- Pattern: solid, dashed or dotted, with the same scope as Motion
- Line Thickness: 0.5px to 6px slider
The sidebar keeps a quick Style picker (curved / straight / angled); corner radius for angled connections also lives in Connection Styling.
Breadcrumb Bar
Shows selected card's full path. Click any segment to navigate to that ancestor.
With split panes (the Pro panel workspace) the bar is per pane: each canvas shows the path of the card selected in that pane, and clicking a segment selects within it — panes never mirror whichever pane was touched last.
Auto-hide Large Folders
Every folder shows its first N children — the Auto-hide Limit in Settings → Advanced, default 10 — in the canvas sort order. Children past that limit, and everything under them, are hidden on import. The rule cascades: any visible folder (including one you reveal by hand) shows its own first N and no more. Hidden cards appear in the sidebar Hidden Cards section as a nested tree, and the folder card keeps its N hidden badge.
Reveal a folder: click the eye icon next to it, double-click its hidden row inside the parent card, or use Show Children. The folder comes up with its first N children (cascading the same way); the rest of its children stay hidden until you reveal them one by one. A reveal is not undone by the auto-hide pass afterwards, whether it came from the sidebar, a canvas double-click, Show Children, or a search jump. Hiding a card again gives the auto-hide its exemption back, so a later folder refresh, sort change or limit change may hide it as usual. Reveal All / Shift+H clear the cap entirely.
Visibility: Hide Files / Show Children
- Hide Files / Show Files (canvas toolbar or right-click → Visibility) hides or reveals every file card. Folders stay visible either way.
- Show Children (right-click a folder → Visibility → Show Children) reveals that folder's direct children and whole subtree up to the Auto-hide Limit (children past the limit stay hidden so you can reveal them individually), and it also wins over an active "Hide Files": the folder's files appear even while Hide Files stays on everywhere else (files outside the folder remain hidden).
Hidden Cards Panel
Access via sidebar. Shows all hidden cards grouped by their visible parent folder, so you can always tell which folder a hidden file belongs to:
- Folder group headers: each visible parent folder with a
N hiddencount and a collapse toggle - Nested expandable tree (any depth) for fully-hidden subtrees
- Eye button reveals an individual item (or a whole hidden subtree) in the active view. One action covers both, so revealing here and on the canvas never cancel each other out
- "Show All" button reveals everything
- One reveal is one undo step (it used to be two or three, one per internal action)
- Hover a row to highlight the corresponding folder(s) on the canvas. Hovering a folder header also glows the hidden child rows inside that card and lights up the ancestor-path connections (root→folder), like global search and selection
- Search filters by folder name or path as well as file name
- Row budget: at most 300 rows are rendered at once (folder headers plus roots), so a graph with thousands of hidden cards stays fast. A footer shows
Showing X of Y rowswhen rows were left out — use search to narrow the list, and the budget lifts for a query that matches only a few. Rows are filtered by search first, so a narrow query is never truncated
Search
Fuzzy search across filenames, paths, and extensions.
- Click result → zoom to card
- Hidden matches appear with badge; clicking reveals the match and all its hidden ancestors up to root — releasing whatever hide layer holds them, including the active view's Hide Files — then zooms
- Highlight/dim matched/unmatched cards
- Recent searches: committed terms are kept per browser session (sessionStorage) and shown when reopening search; clear them from the panel
Multiple Graph Views
Split the workspace into two or more areas and every graph view keeps its own settings (hidden cards, collapsed folders, card positions, layout direction, connection style and connection width). Clicking a card, its pane, or its header makes that view the active one, so it owns clicks, selection and keyboard actions.
The active view is marked with an accent inset border plus a dot in its header, so it is obvious which pane will respond. The marker only appears when the workspace holds more than one view, keeping a single-view layout unmarked. It is a UI affordance: it is never drawn into SVG/PNG exports.
Image exports mirror the active view (see Import & Export); JSON, CSV, DOT, script and tree exports always cover the full graph.
Card positions are per view, and so is undo. Moving a card in one view records the move in that view's history, and undo/redo puts the card back there; the other views keep the arrangement they had and do not follow along.
Organize (sidebar, Alt+R, or the canvas context menu) is the exception: it re-flows the whole graph, dropping the manual card positions of every view and re-running the layout, so a card that was moved or created in one pane never sits stale in another. Within a view, a card you dragged keeps its spot while every other card re-flows around it. Organize and a layout-direction change both re-fit the view to the whole graph once the new layout settles, so working close to a card never leaves the re-flowed tree offscreen.
Sort by Name/Size/Type is a lighter touch than Organize: it re-flows the layout in every view but keeps manual card positions, so a hand-placed card stays where you put it and its siblings re-order around it.
Non-graph panes (Layout, Connections, File & Actions, Hidden Cards, Tags, Graph Analytics) scroll vertically when the area is too short for the content, so nothing is clipped. Sidebar sections can be reordered by dragging the grip handle (⋮⋮) next to each section title; sections shift as you cross their midpoints, and Escape cancels. Dragging a section outside the sidebar docks it as a ~25% column (Pro only), with a preview band showing where the column will land. To move a section from the keyboard, focus its grip and press Alt+↑/↓. Panel docking and Tags both require Pro.
Sidebar
- Drag-resizable: drag the right edge to resize (200-560px)
- Collapsible sections: File & Actions, Layout, Connections & Style, Hidden Cards, Graph Analytics
Stats Panel
Real-time statistics in sidebar:
- Total files and folders
- Total size
- Breakdown by category (code, image, doc, config, etc.)