FileTree. A compact, semantic repository or project tree.
- Technical content
- Static
- Stability · Initial
- ::postkit-file-tree
Publishing project
- content
- articles
- hello.mdx
- postkit.config.ts
Usage.
<FileTree
title="Publishing project"
items='[{"path":"content","type":"folder"},{"path":"content/articles","type":"folder"},{"path":"content/articles/hello.mdx","type":"file","meta":"2 KB"},{"path":"postkit.config.ts","type":"file"}]'
/>Props. Always in step with the code.
| Prop | Type | Default | Description |
|---|---|---|---|
| itemsRequired | JSON string | None | A JSON array of paths, types, and optional metadata. |
| title | string | None | The tree heading. |
| Appearance | |||
| size | "sm" | "md" | "lg" | "md" | The component density and type scale. |
| variant | "outline" | "subtle" | "plain" | "subtle" | The component visual treatment. |
Every component also takes unstyled and the part-styling props. Change a default for your whole site with defaults in createPostkit. Part styles
Anatomy. Every part is yours to restyle.
Every part
- root
- title
- list
- item
- icon
- path
- meta
Renderers. One component, everywhere you publish.
- Headless @postkit/reactSupported
- Chakra @postkit/chakraSupported
- Email @postkit/emailAs text
- Astro @postkit/astroStatic
- Web components @postkit/elementsPlanned