Files
- simbolik
- components
- button
- button.css
- manifest.ts
- card
- card.css
- manifest.ts
- button
- tokens
- color.tokens.json
- space.tokens.json
- components
- README.md
A project's files in a panel, with the line it shows, a count of changes and when it was read.A block is copied, not installed: take an example's code and the stylesheet at the foot of the page, and rename the site- prefix to your project's own.
The files of one line, open on the way to the file being read, which is chosen; the header counts them and the footer says when they were read.
main · 128 files · 3 changed
Only what changed on a line: the tree view marks each changed file and folder and counts what each folder holds.
new-checkout · 3 changed
Shows a project's files in a panel beside what a reader is working on: which line of the project it shows, how many files there are and how many changed, the files as a tree to open and choose from, and when the tree was read.
The tree behaves as the Tree view does: folders open and close, one file is chosen at a time, and the arrow keys move through it. The panel takes no focus of its own.
| Key | What it does |
|---|---|
| Tab | Moves focus into the tree, onto the row focused last, else the chosen one, else the first; pressed again, leaves the tree. |
| Down ArroworUp Arrow | Moves to the next or previous row the reader can see. |
| Right Arrow | Opens a closed folder, or moves into an open one's first row. |
| Left Arrow | Closes an open folder, or moves out to the folder a row is in. In a right-to-left page Left and Right swap. |
| HomeorEnd | Moves to the first or the last row. |
| Enter | Acts on the row, and opens or closes it if it is a folder. |
| Space | Chooses the row without opening it. |
| * | Opens every folder beside the row. |
| Any character | Typing a row's first letters moves to it. |
The file tree's own layout, its classes under the site- prefix. The components inside it are drawn by the design system's stylesheet.
/* site-file-tree — File tree, a block: a project's files in a panel, its title saying which line it shows and how
* many files have changed, and a footer saying when it was read. Copy it into your project and rename site- to
* your project's own prefix. The frame is the Card component, raised surface, in its panel layout, and the tree is
* the Tree view component; Figma draws nothing else. The block's one rule keeps a long tree inside the panel: past
* the list height it scrolls. */
.site-file-tree__tree {
max-block-size: var(--smbk-size-list-max-height);
overflow-y: auto;
}