theSVG Icon Library

repository·main·Indexed 23 days ago

https://github.com/glincker/thesvg

A comprehensive library of over 6,400 SVG icons, including brand logos and cloud architecture icons for AWS, Azure, and GCP. Available via npm, CDN, CLI, and dedicated extensions for Alfred, Figma, Neovim (thesvg.nvim), and browser environments.

Tokens
28.8K
Snippets
81
Records
178
Agent score
82%

What's inside thesvg

  1. Overview of thesvg Browser Extension features

    main

    The thesvg Browser Extension is an open SVG brand library that allows users to search and copy over 6,030 MIT-licensed brand icons directly from their browser.

    Key Features:

    • Instant Search: Uses a local Fuse.js index for search-as-you-type functionality with no server round trips or rate limits.
    • Multiple Output Formats: Every icon can be copied in three formats:
      • Raw SVG code: For direct pasting into projects.
      • jsDelivr CDN URL: For use in <img> tags or CSS backgrounds.
      • Markdown snippet: Formatted for README files and documentation.
    • Variant Support: Provides access to multiple brand variants, such as color, mono, light, dark, and wordmark.
    • Privacy-Focused: No accounts, no telemetry, and no remote code execution. Icon data is fetched on demand from the jsDelivr public CDN.
  2. Understand the privacy and data handling of the thesvg browser extension

    main

    The thesvg browser extension (available for Chrome, Firefox, and Edge) is designed to be privacy-preserving. It does not collect, store, or transmit any personally identifiable information (PII), nor does it use analytics, tracking pixels, or remote logging.

    Data Storage

    The extension uses the browser's storage.local API to persist user preferences locally on your device. This data is never synced to a server and is deleted upon uninstallation. Stored items include:

    • Recently viewed icon slugs (e.g., "github")
    • Preferred copy format (SVG, CDN URL, or Markdown)
    • Preferred display mode (light or dark)

    Network Activity

    The extension only makes network requests to the jsDelivr public CDN (https://cdn.jsdelivr.net/) to fetch SVG files for previews or copying. These requests do not include cookies, authentication tokens, or user identifiers.

    Permissions

    • Clipboard: The extension uses the clipboardWrite permission to copy icon data to your clipboard. It never reads from your clipboard.
    • Remote Code: The extension does not execute any remote code; all logic is bundled locally.
  3. Privacy and Data Handling in thesvg Extension

    main

    The thesvg extension is designed with a zero-data-collection policy.

    Data Collection & Storage

    • Data Collected: None.
    • Storage: Uses the browser storage API locally to persist user preferences (e.g., recent icon picks, display settings). This data never leaves the user's device.
    • Analytics: None. No tracking pixels, analytics SDKs, or error reporting services are used.

    Network & Clipboard

    • Network: Fetches SVG files on demand from https://cdn.jsdelivr.net/. These are public CDN requests with no user-identifying information.
    • Clipboard: Uses the clipboardWrite permission to allow users to copy SVG code, CDN URLs, or markdown. The extension does not read clipboard contents.
  4. Licensing and Trademark usage

    main

    When providing icons from theSVG, keep these legal constraints in mind:

    • theSVG Codebase: Licensed under MIT.
    • Brand Marks: Remain trademarks of their respective owners. Users should review brand-specific usage guidelines for commercial use.
    • AWS Architecture Icons: Licensed under CC BY-ND 2.0 (no derivatives, must distribute unmodified).

    Warning: If a user requests to recolor, distort, or compose a brand mark into a new logo, you should flag the potential trademark risk.

  5. How thesvg.org handles published licenses

    main

    Once an icon is published in the registry, the project follows these commitments:

    • Verbatim Recording: Your declared license is recorded exactly as stated in the icons.json entry. This field is part of the public API inherited by downstream consumers (e.g., @thesvg/icons).
    • Public Visibility: The license is displayed on the icon's detail page at thesvg.org/icon/<slug>.
    • No Relicensing: The project will never re-publish an asset under a more permissive license than what you declared (e.g., a CC BY-ND 4.0 icon will never be re-published as MIT).
    • Removal: Icons will be promptly removed or relicensed if the declared license is found to be incorrect.
  6. How theSVG for Figma plugin works

    main

    The plugin functions by fetching data from the jsDelivr CDN mirror of the open-source theSVG repo. This ensures high performance and availability even during peak traffic on the main website.

    Data Fetching Logic:

    • Manifest: Fetches the static manifest from https://thesvg.org/api/registry.json.
    • SVG Files: Pulls individual SVGs directly from https://thesvg.org/icons/{slug}/default.svg.
    • Insertion: Icons are inserted into the Figma canvas as native vector nodes using the figma.createNodeFromSvg() API.
  7. How icon deduplication and merging works

    main

    The project uses a deduplication strategy to merge icon data from multiple sources into a single unified entry.

    Merging Logic:

    1. Primary Key: Use the slug (kebab-case version of the title) as the unique identifier.
    2. Data Merging: When a brand exists in multiple repositories, combine their strengths:
      • From simple-icons: Take the monochrome variant, hex color, and aliases.
      • From svgl: Take the color/light/dark variants, wordmarks, and categories.
      • From lobe-icons: Take the color variants (extracted from JSX).
    3. Categorization: Prefer svgl categories; if unavailable, fall back to lobe-icons group mapping.
  8. Understand usage rights for brand icons

    main

    Brand icons in the library are provided for identification and development purposes only under nominative fair use. theSVG is not affiliated with or endorsed by the brand owners.

    Usage Guidelines:

    • You may use icons to identify a brand (e.g., a "Login with GitHub" button).
    • You must comply with each brand's official usage guidelines.
    • theSVG does not grant trademark rights; these remain with the brand owner.
    • For high-fidelity requirements, download official assets directly from the brand's press kit.
  9. Map slugs to component names

    main

    Icon component names are generated by converting the icon slug to PascalCase. If a slug starts with a digit, it is prefixed with I to ensure a valid JavaScript identifier.

    | Slug                  | Component name         |
    |-----------------------|------------------------|
    | `github`              | `Github`               |
    | `visual-studio-code`  | `VisualStudioCode`     |
    | `figma`               | `Figma`                 |
    | `01dotai`             | `I01Dotai`             |
    | `dotnet`              | `Dotnet`               |
  10. Understand the difference between License and Trademark

    main

    When submitting icons to thesvg.org, it is critical to distinguish between the License and the Trademark. Confusing these is the most common mistake.

    • License: Controls who can copy, modify, or redistribute the SVG file. It is set by the author or publisher and is found in the asset's LICENSE file.
    • Trademark: Controls who can use the brand mark to identify goods or services. It is set by the brand owner (often via registration) and is found in
  11. How thesvg.nvim works

    main
    1. Registry Fetching: On the first run, the plugin fetches the registry from the jsDelivr CDN and caches it at stdpath('cache')/thesvg/registry.json for 24 hours.
    2. Picker UI: Telescope (or vim.ui.select as a fallback) opens a searchable list. Icons can be searched by name, slug, or alias.
    3. Insertion: Pressing <CR> (Enter) selects the icon and inserts either the CDN URL or the inline SVG at your cursor position based on your configuration.
    4. Offline Mode: If the network is unavailable, a built-in list of 10 popular icons is provided so the picker remains functional.