Opening the Playground
The playground (DevTools panel) is where all icon customization happens.Open DevTools
Click the DevTools icon in the editor title bar, or it may open automatically depending on your settings
You can configure whether DevTools opens automatically on icon click using the
JT-View-Exports-SVG.defaultClickToOpenDevTools setting.Default Icon Properties
All icons start with default property values that you can customize globally in your VS Code settings.Configuration
Add this to yoursettings.json:
Property Descriptions
| Property | Type | Default | Description |
|---|---|---|---|
className | string | "" | CSS class name(s) to apply |
color | string | "#0a0a0a" | Primary color value |
fill | string | "#0a0a0a" | Fill color for SVG paths |
height | string | "28" | Icon height in pixels |
size | string | "28" | Unified size (width and height) |
state | string | "false" | Component state (varies by component) |
stroke | string | "#0a0a0a" | Stroke color for SVG paths |
strokeColor | string | "#0a0a0a" | Alternative stroke color property |
strokeWidth | string | "0.2" | Width of strokes in SVG |
style | string | "{}" | Inline CSS styles as JSON |
sx | string | "{}" | MUI sx prop (if using Material-UI) |
width | string | "28" | Icon width in pixels |
Adjusting Properties in the Playground
The playground provides two ways to customize icons:Visual Controls
Background Color Picker
Adjust the playground background to preview icons on different surfaces:Background color changes only affect the playground preview and don’t modify the actual SVG component.
Expand/Collapse Code Editor
Toggle the code editor visibility to maximize your preview space:- Click the expand/collapse button to show or hide the code editor
- The icon preview remains visible in both states
- Editor state persists during your session
Code Editor
The integrated Monaco editor provides full code editing capabilities:Features
- Syntax Highlighting: JSX/TSX syntax support
- IntelliSense: Auto-completion for component props
- Real-Time Preview: Changes reflect immediately in the preview
- Theme Sync: Matches your VS Code theme automatically
- Error Detection: Highlights syntax errors
Editing Component Props
Reset Code
Revert all changes to the original component:- Click the reset button in the playground toolbar
- The editor restores the original component code
- The preview updates to show the default appearance
Example: Customizing an Icon
Example: Customizing an Icon
Original Code:Customized Code:Result: A 48px blue arrow rotated 90 degrees with thicker strokes and a custom class.
Common Customization Patterns
Size Adjustments
Color Variations
Stroke Customization
CSS and Styling
Copy Customized Code
Once you’ve customized an icon, copy the code for use in your project:
You’ll see a success notification: “Copied to clipboard”
Property Auto-Completion
The Monaco editor provides IntelliSense for common SVG and React props:- Type
<IconNameand pressCtrl+Spaceto see available props - Start typing a prop name for filtered suggestions
- Use arrow keys and Enter to select a suggestion
Theme Integration
The playground automatically syncs with your VS Code theme:Automatic Theme Detection
- Light Themes: Light editor background, dark text
- Dark Themes: Dark editor background, light text
- High Contrast: Enhanced contrast for accessibility
Manual Theme Reload
If the theme doesn’t sync properly:- Click the Reload Theme button in the toolbar
- Or run the command:
View Exports SVG: Reload Theme
DevTools Settings
Auto-Open DevTools
true(default): DevTools opens automatically when you click an iconfalse: DevTools remains closed until you manually open it
Default Expand State
true: All component groups expand by defaultfalse(default): Groups start collapsed
Advanced Customization
Custom Properties
If your components accept custom props, you can add them in thedefaultIconProperties:
Style and Sx Props
For complex styling:JSON strings must be properly escaped when defining default values in settings.
Troubleshooting
Properties not applying
Properties not applying
Issue: Changes in the editor don’t reflect in the preview.Solutions:
- Check for syntax errors in the JSX
- Ensure prop names match what your component accepts
- Verify the component properly handles the props you’re passing
Editor theme not matching VS Code
Editor theme not matching VS Code
Issue: The Monaco editor theme doesn’t match your VS Code theme.Solutions:
- Click the Reload Theme button
- Run command:
View Exports SVG: Reload Theme - Restart the extension
Default properties not loading
Default properties not loading
Issue: Icons don’t use your configured default properties.Solutions:
- Verify your
settings.jsonsyntax is valid JSON - Reload VS Code window
- Check that property names match exactly (case-sensitive)
Next Steps
Configuration
Explore all extension settings in detail
Viewing Icons
Learn how to open and navigate the viewer