https://github.com/material-extensions/svg-icon-review
Automatically review your SVG icons
https://github.com/material-extensions/svg-icon-review
review-tools svg
Last synced: about 1 month ago
JSON representation
Automatically review your SVG icons
- Host: GitHub
- URL: https://github.com/material-extensions/svg-icon-review
- Owner: material-extensions
- License: mit
- Created: 2023-11-12T11:18:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-21T11:21:47.000Z (over 1 year ago)
- Last Synced: 2026-02-18T04:35:10.155Z (6 months ago)
- Topics: review-tools, svg
- Language: TypeScript
- Homepage:
- Size: 424 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
SVG Icon Review
Tool to review SVG icons automatically
## CLI Command
The tool can be executed with this command:
```
npx svg-icon-review file1.svg file2.svg
```
It also supports glob file patterns to check multiple files matching the pattern like this:
```
npx svg-icon-review ./images/**/*.svg
```
The output is a preview of how the icons look in either dark or light backgrounds:

## Options
### `--bigIcon`
Optionally, an additional bigger icon (in size of 32x32px) will be shown in front of the preview. This is useful to see the icon in more detail. This can be done by adding the `--bigIcon` option like this:
```bash
npx svg-icon-review --bigIcon file1.svg file2.svg
```
The preview will look like this:

### `--silent`
By default, the tool will output a result message to the console. If you want to avoid this output, you can use the `--silent` option:
```bash
npx svg-icon-review --silent file1.svg file2.svg
```
### `--debug`
If you want to see the debug information, you can use the `--debug` option:
```bash
npx svg-icon-review --debug file1.svg file2.svg
```
### `--noSandbox`
By default, the tool uses a sandboxed environment to render the SVG icons. If you want to disable this sandbox, you can use the `--noSandbox` option:
```bash
npx svg-icon-review --noSandbox file1.svg file2.svg
```
Running without a sandbox is strongly discouraged because of security risks. Consider configuring a sandbox instead. If you absolutely trust the content you with this tool, you can launch it with the --noSandbox argument.
### `--help`
If further help is needed, the `--help` option can be used:
```bash
npx svg-icon-review --help
```
## Development
First you have to install the dependencies:
```bash
npm install
```
Then you can run the tool with:
```bash
npm run start
```
It is going to create a preview image of the logo.svg file in the root directory.
### Formatting and Linting
To format the code, run:
```bash
npm run format
```
To lint the code, run:
```bash
npm run lint
```