An object mapping group names to file path patterns for organizing icons into custom categories.
Overview
ThegroupPatterns setting allows you to organize your SVG icons into logical groups based on file path patterns. This makes it easier to navigate and find icons in the extension panel, especially in large projects with many icons.
Configuration
The setting is an object where:- Keys are group names (how the group will appear in the UI)
- Values are glob patterns or file path patterns to match icon files
Default Behavior
By default, this is an empty object ({}), and icons are organized based on their directory structure.
Examples
Basic Pattern Matching
Group icons by directory:Multiple Patterns per Group
Use patterns to match multiple locations:Name-Based Grouping
Group icons by filename patterns:Project Structure Example
For a typical React project structure:Mixed Criteria
Combine different organizational strategies:Pattern Syntax
The pattern matching supports glob-style patterns:*- Matches any characters except path separator**- Matches any characters including path separators (recursive)?- Matches any single character[abc]- Matches any character in the set{a,b}- Matches either pattern a or pattern b
Pattern Examples
| Pattern | Matches |
|---|---|
**/ui/** | Any file in a ui directory at any level |
**/*-icon.svg | Any SVG file ending with -icon.svg |
**/icons/*.svg | SVG files directly in any icons directory |
**/icons/**/*.svg | SVG files anywhere under any icons directory |
src/assets/** | Any file under src/assets/ |
Best Practices
- Use descriptive group names: Choose names that clearly describe the icon category
- Avoid overlapping patterns: Icons matching multiple patterns may appear in multiple groups
- Start with broad categories: Begin with high-level groups and refine as needed
- Match your project structure: Align groups with your existing directory organization
- Consider icon variants: Group different variants (outlined, filled) separately if useful
Use Cases
By Feature Area
Organize icons by application feature:By Icon Library
Separate different icon libraries:By Size
Group by icon dimensions:How It Works
- The extension scans your workspace for SVG icon files
- Each icon file path is tested against your defined patterns
- Icons are placed into groups based on pattern matches
- Groups appear in the extension panel with matched icons
- Icons not matching any pattern appear in a default group
Related Settings
- Assets Path - Define where to scan for icons
- Ignore Directories - Exclude directories from scanning
- Settings Overview - View all available settings