1# Icon Themes
2
3Extensions may provide icon themes in order to change the icons Zed uses for folders and files.
4
5## Example extension
6
7The [Material Icon Theme](https://github.com/zed-extensions/material-icon-theme) serves as an example for the structure of an extension containing an icon theme.
8
9## Directory structure
10
11There are two important directories for an icon theme extension:
12
13- `icon_themes`: This directory will contain one or more JSON files containing the icon theme definitions.
14- `icons`: This directory contains the icons assets that will be distributed with the extension. You can created subdirectories in this directory, if so desired.
15
16Each icon theme file should adhere to the JSON schema specified at [`https://zed.dev/schema/icon_themes/v0.1.0.json`](https://zed.dev/schema/icon_themes/v0.1.0.json).
17
18Here is an example of the structure of an icon theme:
19
20```json
21{
22 "$schema": "https://zed.dev/schema/icon_themes/v0.1.0.json",
23 "name": "My Icon Theme",
24 "author": "Your Name",
25 "themes": [
26 {
27 "name": "My Icon Theme",
28 "appearance": "dark",
29 "directory_icons": {
30 "collapsed": "./icons/folder.svg",
31 "expanded": "./icons/folder-open.svg"
32 },
33 "chevron_icons": {
34 "collapsed": "./icons/chevron-right.svg",
35 "expanded": "./icons/chevron-down.svg"
36 },
37 "file_icons": {
38 "audio": { "path": "./icons/audio.svg" },
39 "default": { "path": "./icons/file.svg" },
40 "rust": { "path": "./icons/rust.svg" }
41 // ...
42 }
43 }
44 ]
45}
46```
47
48Each icon path is resolved relative to the root of the extension directory.
49
50In this example, the extension would have a structure like so:
51
52```
53extension.toml
54icon_themes/
55 my-icon-theme.json
56icons/
57 audio.svg
58 chevron-down.svg
59 chevron-right.svg
60 file.svg
61 folder-open.svg
62 folder.svg
63 rust.svg
64```