Opening the Viewer
There are three primary ways to launch the View Exports SVG viewer:Context Menu (Explorer)
Right-click on any JavaScript/TypeScript file in the Explorer sidebar and select View Exports SVG π.This method works for:
- Individual files (
.js,.jsx,.ts,.tsx) - Multiple selected files
- Folders (scans all compatible files within)
The context menu only appears for files matching these conditions:
- Language ID:
javascript,typescript,javascriptreact, ortypescriptreact - File extension:
.js,.jsx,.ts, or.tsx - Excludes TypeScript declaration files (
.d.ts)
Context Menu (Editor)
Right-click anywhere in an open JavaScript/TypeScript file and select View Exports SVG π from the editor context menu.This provides quick access when youβre already working in a file that contains SVG components.
Drag and Drop
Once the viewer is open, you can add more files by dragging and dropping them directly onto the panel:- Open the viewer using any of the methods above
- Drag one or more compatible files from your file explorer
- Drop them onto the View Exports SVG panel
- The extension will process and display the SVG components from the dropped files
Drag and drop functionality works with the same file types supported by the context menu (
.js, .jsx, .ts, .tsx).File Type Requirements
The extension only processes files that meet specific criteria:| Requirement | Details | |||
|---|---|---|---|---|
| Language | JavaScript, TypeScript, JSX, or TSX | |||
| Extensions | .js, .jsx, .ts, .tsx | |||
| Excluded | TypeScript declaration files (.d.ts) | |||
| Pattern | Files matching: `^(?!..d.ts$)..(ts | tsx | js | jsx)$` |
What Happens After Opening
When you open the viewer:- Panel Creation: A webview panel opens in VS Code
- File Processing: The extension scans selected files for SVG component exports
- Component Display: Discovered icons appear grouped by their source file or custom grouping patterns
- Interactive Preview: Click any icon to view it in the DevTools playground
Toolbar Actions
Once the viewer is open, the editor title bar displays additional actions:- Collapse/Expand All: Toggle all component groups at once
- DevTools: Open or close the interactive playground panel
- Clear Cache: Remove cached component data and force a fresh scan
- Reload Theme: Sync the panel appearance with your current VS Code theme
Next Steps
Search & Filter
Learn how to find specific icons quickly
Copy & Export
Discover export and clipboard options