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 icon 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.3.0.json`](https://zed.dev/schema/icon_themes/v0.3.0.json).
17
18Here is an example of the structure of an icon theme:
19
20```json [icon-theme]
21{
22  "$schema": "https://zed.dev/schema/icon_themes/v0.3.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      "named_directory_icons": {
34        "stylesheets": {
35          "collapsed": "./icons/folder-stylesheets.svg",
36          "expanded": "./icons/folder-stylesheets-open.svg"
37        }
38      },
39      "chevron_icons": {
40        "collapsed": "./icons/chevron-right.svg",
41        "expanded": "./icons/chevron-down.svg"
42      },
43      "file_stems": {
44        "Makefile": "make"
45      },
46      "file_suffixes": {
47        "mp3": "audio",
48        "rs": "rust"
49      },
50      "file_icons": {
51        "audio": { "path": "./icons/audio.svg" },
52        "default": { "path": "./icons/file.svg" },
53        "make": { "path": "./icons/make.svg" },
54        "rust": { "path": "./icons/rust.svg" }
55        // ...
56      }
57    }
58  ]
59}
60```
61
62Each icon path is resolved relative to the root of the extension directory.
63
64In this example, the extension would have a structure like so:
65
66```
67extension.toml
68icon_themes/
69  my-icon-theme.json
70icons/
71  audio.svg
72  chevron-down.svg
73  chevron-right.svg
74  file.svg
75  folder-open.svg
76  folder.svg
77  rust.svg
78```