Web icon discovery and detail experience
The web application helps an engineer find an icon, narrow the catalog, inspect its available assets, and move from a quick preview to a full detail page. It combines a server-provided catalog summary with a client-loaded icon manifest, URL-backed filters, and device-local activity state. See also Icon catalog and data pipeline and Icon package builds.
Discovery surface
The discovery surface starts with a home view that explains the library and then exposes popular icons, recently added icons, collections, categories, and the full catalog. The same browsing model is reused for category and collection pages so that a user can move between broad browsing and focused results without changing how the grid behaves.
Home catalog
The home page initially shows a lightweight hero with counts, collections, and a small recent-item set. The browser warms the full catalog in the background and loads it when the user searches or applies a filter. This keeps the first view small while preserving a complete catalog for interactive browsing.
The filtered view applies collection, favorite, and category limits before it applies text search or sort order. Results appear in either a comfortable or compact grid. The grid renders only the visible rows and keeps its row layout aligned with the current viewport. An empty result gives the user a path to submit a missing icon.
flowchart LR
A[Home request] --> B[Catalog summary]
B --> C[Hero and discovery links]
C --> D{Search or filter}
D --> E[Load full icon manifest]
E --> F[Collection and category limits]
F --> G[Text search or sort]
G --> H[Virtualized icon grid]
H --> I[Quick preview or detail route]
References: src/…/page.tsx• L1-9 src/…/page.tsx• L52-69 src/…/home-content.tsx• L68-86 src/…/home-content.tsx• L171-264 src/…/icon-grid.tsx• L75-118
Icon cards
An icon card is the main handoff point from a result list to an icon action. The preview opens the stable /icon/<slug> route, while card actions can copy the configured default format, download the default SVG, open a quick preview, or add the icon to device-local favorites. Cards select light and dark assets when the catalog provides them.
The grid does not mount every card at once. It virtualizes visible rows and adjusts the number of columns as the viewport changes, so a large collection remains usable on the client. Cards also prefetch their detail route when a user points to or focuses them.
References: src/…/icon-card.tsx• L27-115 src/…/icon-card.tsx• L118-179 src/…/icon-card.tsx• L182-305 src/…/icon-grid.tsx• L17-73 src/…/icon-grid.tsx• L75-118
Search and filtering
Search and filtering turn the catalog into a shareable discovery state. The query is held in a shared client store and mirrored to the URL, while category, collection, favorite, sort, and view choices are URL values that can be copied or revisited.
Search flow
The desktop header and mobile search sheet use the same search behavior. A query of at least two characters searches icon titles, slugs, aliases, and categories with fuzzy matching. The header shows a small suggestion list and routes a selected result to its detail page; the mobile sheet uses the same ranking and can show more results as it expands.
On the home catalog, the query is synchronized from q and written back after a short pause. Search is lazy: the search code and full manifest are only needed when the user enters a real query. A completed query is also recorded as a recent search after the user pauses, rather than for every keystroke.
sequenceDiagram
participant U as User
participant S as Search surface
participant Q as Shared query state
participant M as Icon manifest
participant R as Results or detail route
U->>S: Enter query
S->>Q: Update query
Q->>M: Load manifest when needed
M-->>S: Fuzzy matches
S-->>U: Suggestions or result grid
U->>R: Select icon or submit search
References: src/…/header.tsx• L93-110 src/…/header.tsx• L174-240 src/…/header.tsx• L274-310 src/…/mobile-search-sheet.tsx• L34-77 src/…/use-icon-search.ts• L38-105 src/…/search.ts• L7-31 src/…/home-content.tsx• L44-129
Category flow
Categories provide a second way to narrow the catalog when the user knows the kind of icon they need. The category index presents counts and sample icons. A category link uses a shared URL rule so a category with a dedicated landing page keeps that page as its canonical destination; other categories use the home catalog with a category filter.
The generic category route resolves the readable category name from its slug and gives HomeContent that category as its default state. The catalog then keeps the category in the route while the user changes search, sort, view, or other filters. Architecture categories are kept out of the default brand-focused list, but they appear when a user enters the matching collection.
References: src/…/page.tsx• L75-97 src/…/page.tsx• L116-165 src/…/page.tsx• L16-31 src/…/page.tsx• L83-127 src/…/categories.ts• L6-37 src/…/icons.ts• L82-97
Collection flow
Collections group different icon sources into focused catalogs such as brands, AWS, Azure, GCP, and Kubernetes. The collection route supplies the page identity and summary data, then the shared catalog surface filters the full manifest to that collection before it calculates its categories and results.
Collection selection changes the route instead of treating the choice as a hidden local filter. Within a collection, the hero changes its popular, recent, and category content to match the active collection. Collection-specific taxonomy therefore stays useful without overwhelming the default brand view.
References: src/…/page.tsx• L96-107 src/…/page.tsx• L148-196 src/…/home-content.tsx• L139-177 src/…/home-content.tsx• L179-210 src/…/home-hero.tsx• L288-414 src/…/sidebar.tsx• L201-255
Featured category landing
Some categories need a focused presentation instead of the generic result grid. The Google 2026 category is one such landing page: it presents the complete refresh as a collection page and links each listed icon to its individual detail route. Other category links can be redirected to a dedicated landing later through the shared category URL rule.
References: src/…/page.tsx• L8-24 src/…/page.tsx• L59-123 src/…/categories.ts• L13-33 src/…/home-content.tsx• L48-58 src/…/home-content.tsx• L456-481
Integration library discovery
The integration surfaces extend catalog discovery into tools that use icons outside the web page. The extensions index explains the available paths, while the draw.io and Excalidraw pages turn catalog categories into downloadable libraries for diagram work.
Extension index
The /extensions page groups ways to use the icon catalog into libraries, editor extensions, design tools, developer tools, AI tools, integrations, framework components, and mobile or native tools. Each entry states whether it is published, planned, or community-built, then sends the user to the relevant package, service, or local integration page.
The page uses the current icon count to describe catalog-backed tools and supplies the shared sidebar with category counts. It therefore gives users a broad map of access paths without becoming another searchable catalog.
References: src/…/page.tsx• L22-48 src/…/page.tsx• L50-70 src/…/page.tsx• L72-402 src/…/page.tsx• L404-408 src/…/page.tsx• L515-553
Draw.io library flow
The /integrations/drawio page presents category-based XML shape libraries for draw.io and diagrams.net. Each library is a focused download that lets a user add brand and developer-tool icons to a diagram, while the import steps explain how to load the file into the tool.
The page shows a count for each library and keeps cloud architecture collections out of this surface because draw.io already provides those built-in sets. The category definition and count data must therefore describe the same generated library set for the page to remain trustworthy.
References: src/…/page.tsx• L30-35 src/…/page.tsx• L38-63 src/…/page.tsx• L67-139 src/…/drawio-libraries.ts• L7-13 src/…/drawio-libraries.ts• L21-41 src/…/drawio-library-counts.json• L1-14
Excalidraw library flow
The /integrations/excalidraw page offers self-contained .excalidrawlib downloads grouped by catalog category. A user chooses a category, downloads its library, and loads it into the Excalidraw library panel for use in architecture or product diagrams.
The page displays precomputed counts and the steps needed to import a file. Like the draw.io flow, it excludes architecture collections and matches category names without case sensitivity so source taxonomy differences do not create separate user-facing groups.
References: src/…/page.tsx• L32-37 src/…/page.tsx• L39-59 src/…/page.tsx• L63-119 src/…/excalidraw-libraries.ts• L10-24 src/…/excalidraw-libraries.ts• L32-55 src/…/excalidraw-library-counts.json• L1-14
Recent activity
Recent activity gives a returning visitor a way to reopen an icon, repeat a copy action, or reuse a search without an account. The activity belongs to the current device and is stored in the browser, so it is a personalization aid rather than shared catalog data.
Recent-item rail
The home page shows a small Continue rail only when viewed icons exist locally. It resolves stored slugs against the current manifest and drops entries that no longer resolve. The header search dropdown uses the same local history for quick access to viewed icons and prior searches.
An individual detail page records one view when it opens. Search records are created only for meaningful queries after a debounce period. Copy actions update the copy history with a format and repeat count, which lets the recents page offer a direct recopy action.
References: src/…/home-hero.tsx• L337-352 src/…/home-hero.tsx• L574-650 src/…/header.tsx• L199-222 src/…/header.tsx• L498-578 src/…/icon-detail-page.tsx• L186-206 src/…/recents-store.ts• L33-63
Recent activity page
The /recents page joins local activity records with the current full icon catalog. It separates viewed icons, copied icons, and searches, and lets the user view all activity or a recent time window. Each section can be cleared on its own, or the user can clear all activity.
The page waits for client hydration before showing personal records. This avoids treating server-rendered empty state as real user history and keeps the page out of search indexes because its content is private to the device.
References: src/…/page.tsx• L6-25 src/…/recents-page.tsx• L52-115 src/…/recents-page.tsx• L117-141 src/…/recents-page.tsx• L158-247 src/…/recents-page.tsx• L249-417
Icon detail experience
An icon detail page turns one catalog entry into a usable asset workspace. It shows the icon, identity and license data, variants, related icons, source links, and ways to copy or export the asset. The page is reached from cards, search suggestions, recent activity, category links, and collection lists.
Detail route
The /icon/<slug> route accepts only slugs known to the catalog. The server resolves the entry for metadata and structured data, then the client receives that entry and the resolved related records to render the interactive detail view. A missing entry becomes a not-found response rather than an empty detail page.
The route also supplies related icons from the primary category and detects version, lineage, and brand-to-auth-badge counterparts when those relationships exist. This connects refreshed or related assets without changing the main icon identity model. The client does not need to re-import the full icons dataset.
References: src/…/page.tsx• L4-20 src/…/page.tsx• L72-146 src/…/icon-page-client.tsx• L7-23 src/…/icon-page-client.tsx• L24-45
Quick preview
Quick preview keeps the user in the catalog while exposing the actions most useful during selection. It shows a larger image, categories, color, variants, favorite state, copy formats, a CLI command, source links, and a link to the full detail page. The shared format and variant labels keep this compact view aligned with the full detail experience.
The preview owns its active variant and fetches the matching SVG before it creates copied output. It is intentionally separate from the URL route, so closing it returns the user to the same grid position and filter state.
References: src/…/icon-grid.tsx• L75-80 src/…/icon-grid.tsx• L120-178 src/…/icon-detail.tsx• L43-83 src/…/icon-detail.tsx• L85-148 src/…/icon-detail.tsx• L150-380 src/…/icon-constants.ts• L3-34
Full detail page
The full page is the stable, linkable workspace for one icon. It preserves the chosen non-default variant in the variant query value, loads the SVG for code and editor actions, and exposes downloads, jsDelivr access, PNG export, code examples, and related navigation. Its download menu supports SVG, data URI, and raster exports, while the detail page can collect local helpful or not-helpful feedback.
The detail view reads favorites from the shared persisted store and records the page view in local recents. A brand-colored background glow is an optional device-local presentation setting. The page also links missing assets or guidelines to pre-filled contribution paths. Its category links return to the correct category surface, while license, brand, guideline, and collection data explain how the asset may be used.
The code panel escapes icon and snippet text before it renders syntax colors. It also removes the panel's private marker characters from source text, so code content cannot interfere with the highlighter or become page markup.
References: src/…/icon-detail-page.tsx• L108-228 src/…/icon-detail-page.tsx• L230-319 src/…/icon-detail-page.tsx• L393-497 src/…/icon-detail-page.tsx• L499-595 src/…/code-block.tsx• L49-82 src/…/syntax-highlight.tsx• L3-37 src/…/syntax-highlight.tsx• L49-73 src/…/brand-glow.tsx• L8-24 src/…/contribution-cta.tsx• L15-54 src/…/download-menu.tsx• L28-160 src/…/icon-feedback.tsx• L78-89
Client state dependencies
The browsing experience depends on a small set of state boundaries. URL state carries the shareable catalog view, while client stores carry transient controls and device-local personalization. The full manifest is the common data needed to resolve slugs, search, filter, and render results.
State boundaries
The main dependencies are:
| State or data | Role in the experience | Main consumers |
|---|---|---|
| Catalog summary | Makes the first page useful before the full manifest arrives | Home and category or collection page loaders |
| Full icon manifest | Supports search, collection and category filtering, slug resolution, and recent-item hydration | Home catalog, header, mobile search, recents, and server-side detail resolution |
| URL query and route | Preserves search, category, collection, favorite, sort, view, and variant choices | Home catalog and detail page |
| Shared search state | Keeps desktop and mobile inputs aligned | Header, mobile search sheet, home catalog |
| Persisted favorites | Keeps favorite selection available across catalog and detail views | Sidebar, cards, previews, detail page |
| Persisted recents | Powers viewed, copied, and searched history on the same device | Header, home rail, detail page, recents page |
| Copy-format setting | Selects the default output used by catalog-card copy actions | Icon cards and settings surface |
| Sidebar and mobile-shell state | Controls navigation sheets and mobile search presentation | Shared layout shells and mobile surfaces |
The important contract is that stored activity contains identifiers and timestamps, not full icon records. Consumers must resolve those identifiers against the current manifest so removed or changed catalog entries do not render as invalid objects. Detail rendering uses server-resolved icon records, then fetches the selected SVG asset in the browser when code, copy, or export actions need its text.
The integration library pages use a separate, simpler data path. They use shared category counts for the navigation shell and precomputed per-library counts for download summaries. Their direct downloads do not depend on search, favorites, recents, or other client browsing state.
References: src/…/icons-manifest.ts• L1-59 src/…/search-store.ts• L3-11 src/…/favorites-store.ts• L4-25 src/…/recents-store.ts• L50-140 src/…/settings-store.ts• L1-80 src/…/home-content.tsx• L88-129 src/…/icon-page-client.tsx• L18-45 src/…/icon-detail-page.tsx• L129-228 src/…/page.tsx• L67-70 src/…/page.tsx• L61-64
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the catalog summary and full-manifest fields aligned. The first page can render before the browser loads the full entry shape.
- Keep
categoryUrl, category slug resolution, and dedicated category landing routes aligned. A mismatch can create links that show the wrong filter or duplicate the canonical page. - Preserve the URL names used by home filters and the
variantvalue used by detail pages. These values support shared links and browser history. - Keep desktop header search and mobile sheet search on the same match fields, minimum query length, result order, and recent-search timing.
- Treat recents as slug references. When catalog slugs or variant paths change, verify that history resolution and detail navigation still work.
- Keep collection names consistent across route validation, sidebar links, collection counts, and collection-specific category counts.
- Keep variant labels, copy-format labels, variant filenames, and CDN URLs aligned. A display name can otherwise point to a different asset or produce a misleading export link.
- Keep detail-page SVG loading tied to the active variant. Stale SVG text can make copy, code, and export actions use the previous variant.
- Keep code escaping ahead of syntax highlighting. Changes to the highlighter's private markers must preserve both safe HTML output and the display of valid source text.
- Keep feedback storage keys and the published feedback snapshot aligned with the icon slug. A mismatch can lock the wrong icon or hide its tally.
- Keep each integration library definition, displayed count, and generated download file aligned. A renamed category can otherwise produce a working-looking card with a missing or wrong file.
- Keep draw.io and Excalidraw category exclusions aligned with their target tool assumptions. Cloud collections are built in for draw.io and are not part of either downloadable category list.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Full manifest request fails in production | Filtered views show an error instead of catalog results | The catalog reports the load failure and allows a refresh; manifest loading can retry after filter changes. |
| Search query has fewer than two characters | No fuzzy result set is produced and no noisy search record is stored | Header, mobile search, home filtering, and recents use the same minimum length. |
| Stored recent slug no longer exists in the manifest | The old activity item cannot open an icon | Recent consumers resolve slugs through a map and discard unresolved entries. |
| A category is linked with a non-canonical route | Users may see a duplicate page or lose the intended collection context | All category links pass through categoryUrl; dedicated landing categories are redirected. |
| Detail variant is absent or its asset fetch fails | The page falls back to the default path or has no SVG text for copy and export | Variant selection validates the catalog entry and detail rendering falls back to default. |
| Variant filename or CDN path mapping changes without the other | A shared link or export points to a missing or wrong asset | Keep the variant-to-filename rule and CDN base contract covered by the shared constants. |
| The active variant changes while its SVG is still loading | Code or copy output can show the prior variant | Clear the current SVG text before loading the new asset and ignore late responses from cancelled loads. |
| Code content contains the highlighter's private marker characters | Highlighting can break its tag boundaries or render unsafe markup | Escape source text and remove those marker characters before the highlighter expands its own markers. |
| Feedback snapshot is missing or has no entry for the icon | The detail page shows no tally but remains usable | Treat the snapshot as optional and keep vote capture independent of tally display. |
| Personal stores render before browser hydration | Server and client can disagree about recent or favorite content | The recents page waits for hydration, and local stores remain client-side concerns. |
| A library definition or count file does not match its generated download | The integration page shows a wrong count or sends users to a missing file | Keep the category definitions, count data, and generated file names in the same release. |
Key files
| File | Why to read it |
|---|---|
| src/…/page.tsx | Shows the server-side inputs that seed the main discovery surface. |
| src/…/home-content.tsx | Defines the shared catalog state model for search, filters, sort, view, and manifest loading. |
| src/…/home-hero.tsx | Shows how collections, popular items, recent items, and category entry points shape the first view. |
| src/…/icon-grid.tsx | Explains result rendering, viewport-aware row virtualization, and quick-preview ownership. |
| src/…/icon-constants.ts | Defines the shared variant labels, copy formats, and CDN path rules used by detail actions. |
| src/…/syntax-highlight.tsx | Shows how detail code is sanitized, formatted, and highlighted before display. |
| src/…/header.tsx | Shows desktop search, URL navigation, suggestions, and recent quick access. |
| src/…/use-icon-search.ts | Defines the shared search behavior used by the mobile and desktop search surfaces. |
| src/…/search.ts | Defines the catalog fields and match policy used by fuzzy search. |
| src/…/page.tsx | Shows the generic category route and its handoff to the shared catalog. |
| src/…/page.tsx | Shows collection route validation and collection-level page data. |
| src/…/categories.ts | Owns category slugs and canonical category links. |
| src/…/page.tsx | Maps catalog access paths and local integration routes to user-facing tools. |
| src/…/page.tsx | Shows the draw.io category download flow and import guidance. |
| src/…/drawio-libraries.ts | Defines the draw.io category groups and their catalog matching rules. |
| src/…/page.tsx | Shows the Excalidraw library download flow and import guidance. |
| src/…/excalidraw-libraries.ts | Defines the Excalidraw category groups and their catalog matching rules. |
| src/…/drawio-library-counts.json | Provides the displayed counts for draw.io downloads. |
| src/…/excalidraw-library-counts.json | Provides the displayed counts for Excalidraw downloads. |
| src/…/page.tsx | Shows how the private activity page is seeded and kept out of indexing. |
| src/…/recents-page.tsx | Shows how local activity becomes viewed, copied, and searched sections. |
| src/…/page.tsx | Defines the stable detail route, metadata, and server-side icon lookup. |
| src/…/icon-page-client.tsx | Connects one resolved icon to related items and the interactive detail view. |
| src/…/icon-detail-page.tsx | Describes the full detail workspace and its variant, asset, and activity state. |
| src/…/download-menu.tsx | Shows the detail-page export choices and their active-variant contract. |
| src/…/icon-feedback.tsx | Shows local feedback state, optional tally data, and contribution paths for icon problems. |
| src/…/brand-glow.tsx | Shows the optional device-local visual setting used by the detail page. |
| src/…/contribution-cta.tsx | Shows how missing assets and guidelines become pre-filled issue or pull-request links. |
| src/…/recents-store.ts | Defines the device-local activity contract used by all recent-item surfaces. |
| src/…/favorites-store.ts | Defines the device-local favorite contract shared by cards and detail views. |