Icon submission and validation
Icon submission turns a contributor's SVG and source details into a GitHub issue or pull request that maintainers and repository checks can review. The flow records the asset's license, checks the SVG before handoff, and supplies the catalog data needed for a later icon addition. See the SVG tools and creator workflows page for the wider tool set and icon contribution automation for the checks that process the resulting repository changes.
Submission flow
Contributor paths
Contributors can use the web form for a guided issue or open a direct pull request when they are ready to edit the repository. Both paths require an official SVG and enough source information for a maintainer to confirm the brand and its right to redistribute the asset.
| Path | Contributor action | Handoff |
|---|---|---|
| Web form | Upload an SVG, enter the name and catalog details, choose a license, then select Submit via GitHub. | A prefilled GitHub issue with the SVG, validation results, and a catalog entry draft. |
| Direct pull request | Fork the repository, add SVG files under public/icons/{slug}/, update src/…/icons.json, run pnpm validate, and open a pull request. | A pull request that repository automation can validate and, when eligible, merge. |
The web form derives a kebab-case slug from the icon name until the contributor edits it. It also lets the contributor provide the official website, brand guidelines, color, and categories, while the catalog example shows how aliases and variants are represented. The form requires an uploaded file, a name, and a valid license choice before it enables either the GitHub handoff or body copy action.
References: src/…/submit-form.tsx• L428-469 src/…/submit-form.tsx• L576-672 src/…/page.tsx• L59-115
GitHub issue handoff
The form does not upload the icon to the repository. It opens a new GitHub issue URL with the submission details encoded in the title and body, and labels the issue as an icon request submitted through the site. The body keeps the SVG source beside the validation report and a JSON-shaped entry so triage can read the same facts that the contributor reviewed.
When the issue reaches the repository, the icon triage workflow extracts the brand name, slug, color, categories, license, and first SVG block. It checks for an existing slug and applies status labels such as triage:ready, triage:needs-svg, triage:needs-license, triage:invalid-svg, or triage:svg-oversize. A request is ready only when it has no duplicate slug, has SVG content that passes the triage checks, and has a non-placeholder license.
flowchart LR
A[Contributor SVG and details] --> B[Web form preflight]
B --> C[Prefilled GitHub issue]
C --> D[Issue triage]
D -->|ready| E[Maintainer or PR workflow]
D -->|missing or invalid| F[Submitter follow-up]
G[Direct repository changes] --> H[Pull request checks]
H --> E
The issue path and direct pull request path meet at repository checks rather than at a file upload service. Issues that wait for missing SVG or license information can become stale after 14 days and close after 21 days, but a close is housekeeping and does not prevent a later corrected submission.
References: src/…/submit-form.tsx• L581-656 .github/…/triage-icon-issue.yml• L1-37 .github/…/triage-issue.mjs• L195-280 .github/…/stale-icon-issues.yml• L1-29
Licensing choices
License declaration
The license choice describes the SVG file's copying and redistribution rights. It does not remove the brand owner's trademark rights, so a permissive file license does not by itself allow endorsement claims or unrestricted use of the brand mark.
The form offers these ten named choices:
| Group | Choices | Typical source |
|---|---|---|
| Public-domain dedication | CC0-1.0, Unlicense | A contributor's own work or an asset already dedicated to the public domain. |
| Permissive | MIT, Apache-2.0, BSD-3-Clause, ISC | An open-source project's brand asset when its source supports that license. |
| Creative Commons | CC-BY-4.0, CC-BY-SA-4.0, CC-BY-ND-4.0 | A community or corporate brand kit with the matching CC terms. |
| File-level copyleft | MPL-2.0 | A brand asset published under the Mozilla Public License. |
The contributor must select a known choice. The form resolves that choice to the value stored in the catalog. It does not treat a project's code license as proof that its logo has the same license.
References: src/…/license-options.ts• L13-25 src/…/license-options.ts• L28-97 LICENSING.md• L20-45 LICENSING.md• L62-99
Custom license review
Other / custom — needs maintainer review is the supported path for a company brand policy, a license outside the named list, or an uncertain source. The contributor must give a short description of at most 120 characters. The generated issue records that text and adds license-unsure, which signals that a maintainer must verify the source before merge.
The repository records the declared license as the public catalog value. Maintainers therefore need an authoritative asset source or brand policy before they accept a custom choice. Assets with no traceable source, no right to redistribute, or an “all rights reserved” restriction without owner permission are not valid submissions.
References: src/…/license-options.ts• L90-139 src/…/submit-form.tsx• L314-341 src/…/submit-form.tsx• L589-607 LICENSING.md• L133-160
SVG validation
Form preflight checks
The browser preflight gives the contributor immediate feedback and a preview before the issue is created. It reads only .svg uploads, measures the file, parses it as SVG/XML, and checks the conditions that protect the catalog from unsafe or unusable assets.
| Check | Pass condition |
|---|---|
| File size | The file is no more than 50 KiB. |
| SVG/XML markup | The browser parser accepts the content without a parse error. |
viewBox | The root element has viewBox or viewbox. |
| Embedded code | No script element, inline on... event handler, or javascript: link exists. |
| Embedded raster | No image element uses a data:image source. |
The submission page also states that external references are not allowed, while gradients and multi-color SVGs are valid. The contributor must have the right to redistribute the icon. The preview shows the uploaded asset on light and dark backgrounds at several sizes. This helps expose poor contrast or scaling before the contributor sends the issue. The form includes the check results in the issue body, but the submit link itself requires a file, name, and license rather than validation.valid; repository triage performs a second gate after the issue is opened.
References: src/…/page.tsx• L99-115 src/…/svg-validation.ts• L12-106 src/…/submit-form.tsx• L490-532 src/…/submit-form.tsx• L669-773
Repository validation gates
Repository automation repeats SVG checks in the issue and pull request contexts because browser preflight is not a trust boundary. Issue triage extracts raw SVG from the issue body and checks its size, root element, viewBox, script and event-handler content, embedded raster data, and known attribution watermarks. A pull request check validates changed SVG files with XML parsing and checks the catalog structure for new entries.
The pull request SVG job runs when public/icons/** or src/…/icons.json changes. It checks changed SVGs for the 50 KiB limit, well-formed XML, an SVG root, a viewBox, scripts, inline event handlers, and embedded raster data. It is a fast feedback check; the full lint and build check remains the merge gate. The issue and pull request checks use related rules but are not identical, so contributors should satisfy the stricter meaning of each requirement rather than rely only on the browser result.
References: .github/…/triage-issue.mjs• L92-117 .github/…/validate-svg.yml• L1-16 .github/…/validate-svg.yml• L40-103 .github/…/validate-svg.yml• L121-164
Catalog handoff
Icon record contract
An accepted submission must connect one slug, one default SVG, and one catalog record. The record gives downstream site and package consumers the name, color, categories, license, and source URL that make the asset discoverable and safe to reuse. Optional aliases and alternate SVG variants can extend the record, but the default variant remains the required asset.
For a brand icon, the important handoff fields are:
slugandtitlefor identity.aliasesfor alternate names used to find the icon.hexandcategoriesfor display and discovery.variants.defaultfor the required SVG path. Optionalmonoanddarkvariants support additional display contexts.licensefor downstream users and the public icon detail view.urland optionalguidelinesfor source and brand-use review.
New entries must keep the catalog's slug order and contain a valid slug, title, hex color, category array, and default variant. The contribution guide also treats the brand as one member of the brands collection, while architecture collections use a separate import path and are not submitted through this flow.
References: src/…/page.tsx• L143-164 src/…/submit-form.tsx• L617-635 .github/…/validate-svg.yml• L121-164 CONTRIBUTING.md• L18-49 CONTRIBUTING.md• L100-124
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the license option IDs aligned with the values written into the issue's icons.json example and the catalog's public
licensefield. - Keep the
Otherchoice, its short-text limit, thelicense-unsurelabel, and maintainer review behavior aligned across the form and issue triage. - Keep browser preflight rules aligned with issue triage and pull request validation, or state the intentional difference in contributor guidance.
- Keep the generated issue field names and fenced SVG/JSON shapes compatible with the triage parser.
- Keep required catalog fields, aliases, variants, and alphabetical ordering aligned between the submit example, direct-PR guidance, and the pull request validator.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The issue has no SVG block | Triage adds triage:needs-svg, so the request cannot become ready. | Paste raw SVG source in the issue or use the web form upload. |
| The SVG is over 50 KiB | Triage and pull request checks add or report an oversize failure. | Optimize the file before submission. |
The SVG lacks a viewBox, has malformed XML, scripts, event handlers, or embedded raster data | The asset fails one or more validation gates and cannot move cleanly through review. | Export a vector-only SVG with a valid root and viewBox. |
A contributor picks Other without a description | The form rejects the license selection. | Add a concise description of no more than 120 characters. |
| A license is missing, a placeholder, or cannot be verified | The issue receives a license-needed or review state instead of ready status. | Link the authoritative asset or brand policy and select the matching license. |
| The slug already exists | The request is marked duplicate and needs an update path instead of a new catalog entry. | Search the catalog before submitting. |
Key files
| File | Why to read it |
|---|---|
| src/…/page.tsx | Shows the contributor-facing choices, requirements, direct-PR steps, and catalog shape. |
| src/…/submit-form.tsx | Defines the web submission handoff, generated issue body, license control, and preflight display. |
| src/…/svg-validation.ts | Defines the browser SVG checks shown to contributors. |
| src/…/license-options.ts | Defines named licenses, the custom review path, and license input rules. |
| .github/…/triage-issue.mjs | Defines how issue content becomes labels and a triage decision. |
| .github/…/validate-svg.yml | Defines the fast pull request checks for changed SVGs and catalog records. |
| LICENSING.md | Explains the rights claim behind each license choice and the limits of brand redistribution. |
| CONTRIBUTING.md | Describes the direct pull request path and the catalog fields contributors must provide. |