Introducing a new way to review your PRs.

Read the announcement

glincker / thesvg

The open SVG brand library: 7,600+ brand logos and cloud icons (AWS, Azure, GCP) as official SVG. Search, copy, ship via npm, CDN, CLI, React, Vue, Svelte, Figma, VS Code, Raycast and MCP. Free, MIT, no gatekeeping.

View on GitHub

27 documents · Updated Nov 23, 2026

docs / desktop-site-shell

Desktop site shell

The desktop site shell gives the SVG a common frame for browsing, searching, filtering, and learning about the icon library. It places shared navigation and page actions around route content so users can move between collections, categories, tools, and community resources without losing the main site context. The parent page, Website shell and responsive experience, covers how this desktop frame relates to the mobile experience; see Mobile web experience for the small-screen shell.

Shell structure

The root layout supplies the shared page frame for every route. It applies the theme, announcement bar, scroll reset, desktop header, page content, and footer in one order. The mobile shell remains the wrapper for the content area, but its mobile-only controls are hidden at the desktop breakpoint.

The desktop page model is:

flowchart TD
    A[Root layout] --> B[Theme provider]
    B --> C[Announcement banner]
    B --> D[Desktop header]
    B --> E[Route content]
    E --> F[Sidebar or sidebar shell]
    E --> G[Page-level UX]
    B --> H[Footer]

The sidebar shell gives routes that need shared navigation a standard left rail and a matching content offset. The home page owns its sidebar because its filter state must stay synchronized with the current URL; detail and utility pages use the reusable shell to provide the same navigation pattern. References: src/…/layout.tsx• L117-165, src/…/sidebar-shell.tsx• L17-79, src/…/home-content.tsx• L274-313

The desktop header is the main global control bar. It keeps the brand link, collection switcher, icon search, contribution action, integration links, GitHub link, and theme control available above route content.

Search interaction

The header search turns a short query into icon suggestions and a longer search into the main browse view. It also gives an empty search field useful links to collections and site pages, plus recent searches and recently viewed icons when those records exist.

Search supports keyboard focus with Cmd+K on macOS or Ctrl+K elsewhere. Arrow keys move through suggestions, Enter opens the selected icon or applies the query, and Escape closes the list. Search state is shared with the browse page, so typing in the header can update the URL and keep the page content aligned with the search.

References: src/…/header.tsx• L174-240 src/…/header.tsx• L242-311 src/…/home-content.tsx• L44-129

Global actions

The collection switcher marks the active collection from the current path or query. The header also exposes the submit flow and links to the supported extensions and integrations. These actions connect discovery with the ways users can add icons to their own tools and projects.

References: src/…/header.tsx• L93-137 src/…/header.tsx• L274-311 src/…/header.tsx• L313-399 src/…/header.tsx• L401-453 src/…/header.tsx• L644-750

The sidebar is the persistent browse rail for desktop routes. It gives users direct access to all icons, categories, favorites, extensions, the viewer, the blog, and icon submission, then places collections and featured content above the category list.

The rail separates fixed navigation from a scrollable discovery area. This keeps the primary actions visible while allowing long category lists and expandable collections to remain reachable on short screens. Active states follow the current route or filter state, and count badges help users judge the size of each collection or category.

Pinned navigation

The pinned navigation keeps the main destinations visible in both the expanded sidebar and the icon-only rail. In the expanded view, Extensions can open a list of extension groups. Favorites can show a count and can produce a shareable link from the saved local favorites; the rail keeps these actions available in compact form.

References: src/…/sidebar-nav.tsx• L28-65 src/…/sidebar-nav.tsx• L66-150 src/…/sidebar-nav.tsx• L152-249

The expanded sidebar gives users space to explore collections, featured content, and categories. Collections and Featured can collapse to make room for the category list. Category search narrows the visible categories and can also pass the debounced search to the page that owns the icon grid.

The category list groups results by first letter and provides an alphabet rail for quick movement through long lists. When a shared link or browser navigation supplies a category search value, the sidebar restores that value instead of replacing it with its local starting state.

References: src/…/sidebar.tsx• L24-114 src/…/sidebar.tsx• L116-204 src/…/sidebar.tsx• L202-352

The sidebar turns a navigation choice into a route or URL filter rather than owning the filtered icon result itself. The home page keeps category, collection, favorites, sort, view, and search state in the URL. The reusable sidebar shell routes category, collection, and favorites choices to their corresponding browse surfaces and closes the navigation panel after selection.

sequenceDiagram
    participant U as User
    participant S as Sidebar
    participant N as Route or sidebar shell
    participant P as Browse page

    U->>S: Select category, collection, or favorites
    S->>N: Send selection
    N->>P: Change route or query state
    P->>S: Render active selection and counts

The same sidebar content can render as a desktop rail or as a left-side sheet. The desktop rail starts below the announcement and header area, while the sheet uses the shared navigation state for smaller layouts. This preserves one navigation model even though the presentation changes across screen sizes.

References: src/…/sidebar.tsx• L47-85 src/…/sidebar.tsx• L87-204 src/…/sidebar.tsx• L206-324 src/…/sidebar-shell.tsx• L17-78 src/…/home-content.tsx• L131-158 src/…/home-content.tsx• L274-310

Theme system

The theme provider gives the whole shell one light or dark appearance and stores the user's choice for later visits. The root layout sets dark mode as the default, applies the theme as a class on the document, and suppresses the initial hydration mismatch while the client restores the saved choice.

The header is the main theme control. Shared color roles in the global style sheet let the header, sidebar, cards, overlays, and footer change together instead of each area selecting unrelated colors. The announcement and sidebar also use the current theme when they publish their surfaces and borders.

References: src/…/layout.tsx• L139-164 src/…/theme-provider.tsx• L1-10 src/…/header.tsx• L741-750 src/…/globals.css• L50-110 src/…/globals.css• L112-127

Announcement banner

The announcement banner is a dismissible site-wide message placed above the header. It informs users about a current site event and links to the related blog post without taking space from route content after dismissal.

The banner remembers dismissal in browser storage. While visible, it measures its own height and publishes that value as --banner-h. The sticky header and fixed sidebar use that value as their top offset, so the message does not cover navigation. When the banner is dismissed or unavailable, the offset returns to zero.

References: src/…/announcement-banner.tsx• L7-40 src/…/announcement-banner.tsx• L42-81 src/…/layout.tsx• L140-155 src/…/header.tsx• L313-318 src/…/sidebar.tsx• L116-126

Shared page UX

Shared page-level UX components add orientation and continuity around the main icon workflows. They do not replace route content; they help a user understand what can be done and keep navigation changes predictable.

The scroll reset returns the browser to the top whenever the path changes. This prevents a new route from opening at the old page position, which is important when users move from a long icon list to a detail or utility page.

The first-visit hint and help control support discovery on the main browse page. The hint calls out that an icon opens a detail view with copy, download, and export actions. The help control opens a compact set of tips for search, favorites, icon actions, and delivery options; it is available as a desktop-only floating control and can be closed with Escape or its close actions.

References: src/…/scroll-to-top.tsx• L6-14 src/…/home-content.tsx• L502-506 src/…/onboarding-hint.tsx• L6-35 src/…/onboarding-hint.tsx• L37-71 src/…/help-fab.tsx• L51-106 src/…/help-fab.tsx• L108-209

The footer closes the shared page frame with the site's open-source message, library counts, contribution call to action, product links, resource links, community links, and legal links. It gives users a second route to core destinations after they finish browsing and makes the external tools part of the same product journey.

The footer groups links by purpose instead of presenting one long list. Its summary area shows current icon, variant, and collection totals, while the lower area carries ownership, trademark, and project information. On desktop it aligns with the content area beside the sidebar rather than extending under the navigation rail.

References: src/…/footer.tsx• L19-47 src/…/footer.tsx• L91-117 src/…/footer.tsx• L118-171 src/…/footer.tsx• L172-256 src/…/footer.tsx• L259-384 src/…/layout.tsx• L156-162

Change checklist

When these files or sections are changed, remember to consider these:

  • When the announcement placement or height changes, keep --banner-h and the sticky header and sidebar offsets aligned.
  • When a global header destination changes, update the matching quick-access or footer destination so users do not get different navigation paths from different shell surfaces.
  • When sidebar selection semantics change, keep home-page URL filters and reusable sidebar-shell route changes consistent.
  • When pinned navigation changes, preserve equivalent access in the expanded sidebar and the collapsed rail. Keep the Favorites share action separate from the Favorites toggle.
  • When the desktop breakpoint or rail width changes, review the header visibility, sidebar visibility, content offset, footer alignment, and desktop-only help control together.
  • When category search or deep-link behavior changes, keep the debounced page filter and URL-derived initial value synchronized.
  • When theme roles change, check the banner, sticky surfaces, overlays, sidebar, and footer because they share the global color system.

Important failure modes

TriggerConsequenceGuard
The banner height is not published or is not used by sticky surfacesThe header or sidebar can overlap the announcementKeep the runtime --banner-h update and both layout offsets in sync
A sidebar choice updates navigation but not the active URL stateThe selected item and displayed icon set can disagreePreserve the home page URL contract and the sidebar-shell route handlers
The header search and browse page stop sharing query stateA query can appear in the header while the grid shows a different resultKeep the global search store and q URL parameter synchronized
The desktop content offset no longer matches the sidebar widthMain content can sit under the fixed railChange the sidebar width and md:pl-58 content alignment as one contract
The collapsed rail loses a pinned action or the Favorites share control is nested in its toggleA desktop user cannot reach a core action, or the markup becomes invalidKeep the expanded and rail variants aligned and keep the two Favorites buttons as siblings
Category search does not follow a shared-link or back-navigation valueThe sidebar can show one category filter while the page uses anotherKeep the local input, debounced callback, and URL-derived initial value synchronized
Browser storage is blocked for a dismissible surfaceThe banner or onboarding hint can show again on later visitsKeep storage access guarded and treat storage failure as non-fatal

Key files

FileWhy to read it
src/…/layout.tsxDefines the global order of theme, announcement, header, route content, mobile wrapper, and footer.
src/…/header.tsxShows the global search, collection navigation, contribution action, external tool links, and theme control.
src/…/sidebar.tsxDefines the desktop rail, collapsed rail, discovery areas, category search, and relationship to route filters.
src/…/sidebar-nav.tsxDefines the pinned destinations, Favorites sharing, expandable Extensions links, and compact rail actions.
src/…/sidebar-shell.tsxShows how detail and utility routes receive shared sidebar navigation and content alignment.
src/…/home-content.tsxShows the home page's URL-driven filters and the page-level onboarding and help surfaces.
src/…/announcement-banner.tsxDefines the dismissible announcement contract and the layout offset it publishes.
src/…/theme-provider.tsxConnects the site shell to the shared theme system.
src/…/footer.tsxDefines the shared product, resource, community, and legal destinations at the end of the page.
src/…/scroll-to-top.tsxDefines route-change scroll behavior for the shared frame.
src/…/globals.cssDefines the global light and dark roles used by shell surfaces and controls.