WorkingDir
moleculesPath chip that abbreviates fish-style as its width shrinks (ancestors to initials, then the leaf alone, then an ellipsis), with the full path in the tooltip.
Terminal sessions
Drag the handle: ancestors abbreviate one at a time left to right, then only the leaf stays, then it ellipsises down to minLeaf characters. The full path is always the tooltip.
active build
stale deploy
dead notes
Sizing, icon and copy
full renders the whole path at content width; shrink sizes to the path while it fits; minLeaf sets the leaf floor; mono={false} uses the body font; icon swaps the glyph; copy makes it a button that copies the full path.
default: fills the row, abbreviates to fit full · shrink in a 12rem slot: minLeaf 18 (default) vs 4
mono off with a music icon · copy with an archive icon
Edge paths
Root, home and trailing slashes normalise; a relative path keeps no leading slash; a single huge segment still ellipsises; title overrides the tooltip.
root
home
trailing slash
relative
one long segment
title
Props
| Prop | Type | Default | Description |
|---|---|---|---|
path required | string | — | |
minLeaf | number | 18 | Char floor the chip reserves so the (truncated) leaf is always legible. |
mono | boolean | true | |
full | boolean | false | Skip the fit algorithm: render the whole path and size to content. |
shrink | boolean | false | Size to the path when it fits; keep truncating when it does not. |
icon | IconName | 'folder' | |
title | string | — | Defaults to the full path. |
copy | boolean | false | Render as a button that copies the full path on click. |
copiedLabel | string | 'Copied' | |
oncopy | (ok: boolean) => void | — | |
class | string | '' | |
style | string | '' |