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 / website-shell-and-responsive-experience

Website shell and responsive experience

The website shell gives every theSVG page a shared frame for icon discovery, use, and contribution. It joins global navigation, search, theme choice, page metadata, and responsive controls around route content so the product feels consistent on large screens, phones, and installed web-app surfaces. Read Desktop site shell for the large-screen navigation model, Mobile web experience for phone-specific interaction, and Website product routes and integrations for the product areas reached through the shell.

Shared application frame

The root application frame places site-wide context around each page. It keeps the announcement, navigation, route content, and footer in a stable order while the active screen supplies the product-specific work.

flowchart TD
    A[Root application frame] --> B[Theme]
    B --> C[Announcement]
    B --> D[Large-screen header]
    E[Responsive content area] --> F[Route page]
    E --> G[Browse navigation]
    B --> E
    B --> H[Footer]
    E --> I[Phone controls below large-screen breakpoint]

The frame also protects continuity between pages. A route can use the shared browse rail on large screens, while the phone view replaces that rail with compact controls and sheets instead of forcing the same layout into a narrow viewport.

Global frame

The global frame applies the site font and theme before it renders shared surfaces. It wraps route content in the responsive shell, gives content room below fixed phone controls, and keeps the footer part of the same page journey.

References: src/…/layout.tsx• L131-189 src/…/mobile-shell.tsx• L166-181 src/…/footer.tsx• L113-120

Navigation surfaces connect the main product areas without making each route define its own site map. The header exposes search and high-value actions, while the browse rail combines collections, featured links, category discovery, and pinned destinations such as All Icons, Favorites, Extensions, Viewer, Docs, Blog, and submission. Extensions can expand into integration groups when the rail has room, while the icon-only rail keeps Extensions as a direct destination. Category browsing adds a local name filter and an alphabet rail that jumps to the nearest available group. On routes that use the reusable shell, a navigation choice becomes a route or URL filter and the active page reflects that choice.

References: src/…/header.tsx• L313-399 src/…/header.tsx• L644-750 src/…/sidebar.tsx• L120-204 src/…/sidebar.tsx• L386-491 src/…/sidebar-nav.tsx• L66-246

Responsive navigation model

The shell changes the way users move through the product at the large-screen breakpoint rather than shrinking one control set until it becomes hard to use. Large screens favor persistent navigation and a wide search field, while smaller screens favor a top bar, a bottom dock, and focused sheets.

Large-screen shell

The large-screen shell keeps the brand, collection links, search, submission action, integrations, repository link, and theme control in a sticky header. A fixed browse rail stays beside page content and separates pinned destinations from longer discovery lists. The rail can collapse to an icon-only mode when the user needs more room; labels then appear through hover or focus tooltips, while collections, featured links, and category discovery return when the rail expands. Extensions remains a direct link in the collapsed rail and becomes an expandable group in the full rail. The rail also lets users search categories and jump through the available initials without losing their place in the list. See Desktop site shell for the full desktop flow.

References: src/…/header.tsx• L313-399 src/…/header.tsx• L401-453 src/…/sidebar.tsx• L87-204 src/…/sidebar.tsx• L290-493 src/…/sidebar-nav.tsx• L66-246 src/…/sidebar-nav-item.tsx• L33-93 src/…/sidebar-collapse-toggle.tsx• L9-28 src/…/alphabet-rail.tsx• L13-18

Phone shell

The phone shell turns the same product paths into an app-like control model. A top bar keeps search and theme choice close to the user's hand, while a bottom dock provides Browse, Favorites, Recents, Submit, and More. The More surface carries less frequent internal pages and external integrations so the main dock stays small. See Mobile web experience for the phone interaction flow.

References: src/…/mobile-shell.tsx• L21 src/…/mobile-top-bar.tsx• L40-99 src/…/mobile-bottom-dock.tsx• L19-58 src/…/mobile-more-sheet.tsx• L32-90

Responsive boundary

The shell uses the large-screen breakpoint as the boundary between these navigation models. The client checks the media query after hydration, which lets the server render safely and then select the correct controls for the current device width. The body adds space for the phone top bar and dock, then removes that space for large screens. Installed web-app mode removes extra bottom breathing room because the system already supplies the edge inset. On the first visit in the tablet-width band, the desktop sidebar starts as an icon-only rail; a later user choice is kept in browser storage.

References: src/…/use-media-query.ts• L3-37 src/…/mobile-shell.tsx• L21-22 src/…/sidebar-shell.tsx• L13-45 src/…/globals.css• L1298-1369

Search and route continuity

Search is a shared entry point into the icon catalog. It keeps the query in common client state, moves non-home searches to the browse route, and uses the same intent to connect header or phone input with the visible result view.

Search entry points

The large-screen search offers suggestions, recent searches, recently viewed icons, keyboard movement, and quick links when no query is present. The phone search keeps the input visible in the top bar and sends a query to the browse page when the user starts from another route. These entry points serve the same discovery goal even though their space and input methods differ.

References: src/…/header.tsx• L174-240 src/…/header.tsx• L242-311 src/…/mobile-top-bar.tsx• L14-38 src/…/search-store.ts• L3-10

Recent activity

Recent activity gives returning users a short path back to work they started. The site stores viewed icons, copied formats, and meaningful searches in the browser, keeps each list bounded, and lets the header surface selected records without requiring an account or server session.

References: src/…/recents-store.ts• L4-24 src/…/recents-store.ts• L33-63 src/…/recents-store.ts• L75-139 src/…/header.tsx• L199-222

Mobile icon actions

Phone icon browsing supports both quick preview and direct page use. Tapping an icon can open a sheet with preview, favorite, copy, download, and detail actions; a saved preference can instead send the user straight to the full detail page. A long press exposes copy, download, and open actions without first leaving the grid.

References: src/…/mobile-shell.tsx• L42-130 src/…/mobile-icon-sheet.tsx• L27-65 src/…/mobile-icon-sheet.tsx• L209-354 src/…/mobile-action-sheet.tsx• L19-100 src/…/mobile-prefs-store.ts• L4-21

Theme and visual system

The theme system gives shell surfaces one shared light or dark appearance. A user's choice persists across visits, while semantic color roles let navigation, cards, notices, sheets, and footer surfaces change together.

Theme choice

The shell starts in dark mode and lets users switch between dark and light from both the large-screen header and the phone top bar. The theme provider applies the active mode to the document, so route pages and shared controls read the same theme state.

References: src/…/layout.tsx• L153-159 src/…/theme-provider.tsx• L1-10 src/…/header.tsx• L741-750 src/…/mobile-top-bar.tsx• L88-97

Surface language

The global style system defines shared background, text, border, muted, accent, and glass surface roles. It also provides common motion values and respects reduced motion and reduced transparency requests, which keeps the visual system usable when the device asks for fewer effects.

References: src/…/globals.css• L50-110 src/…/globals.css• L112-135 src/…/globals.css• L1298-1351 src/…/globals.css• L387-403

Safe-area layout

Phone controls account for notches, home indicators, and installed-app display mode. The root viewport enables edge-to-edge phone layout while preserving user zoom. The top bar, bottom dock, sheets, and page body share safe-area values so fixed controls do not cover content or become difficult to reach on edge-to-edge screens.

References: src/…/layout.tsx• L118-129 src/…/globals.css• L1298-1305 src/…/globals.css• L1353-1369 src/…/mobile-top-bar.tsx• L40-46 src/…/mobile-bottom-dock.tsx• L84-91 src/…/bottom-sheet.tsx• L147-161

Mobile interaction system

The mobile interaction system turns transient actions into focused overlays instead of full page changes. It keeps sheet state in memory, closes an open sheet when the route changes, and supports drag, Escape, backdrop, and close-button dismissal.

Sheet model

The shared bottom-sheet pattern gives search, icon preview, More, and long-press actions one interaction language. Sheets can use peek, half, or full heights when their content needs room, while the More surface stays at one height; the sheet locks page scrolling while open and returns control when it closes.

References: src/…/mobile-shell-store.ts• L14-56 src/…/bottom-sheet.tsx• L15-45 src/…/bottom-sheet.tsx• L59-77 src/…/bottom-sheet.tsx• L132-197

Touch gestures

The phone shell adds gestures that match the user's task. A pull down from the top of the page focuses search, a short tap opens the configured icon view, and a hold longer than the long-press threshold opens actions without navigating away from the grid. Movement and modifier-key checks prevent these gestures from taking over scrolling or intentional alternate clicks.

References: src/…/mobile-shell.tsx• L29-63 src/…/mobile-shell.tsx• L65-130 src/…/mobile-shell.tsx• L132-164

Installable experience

The site can act as an installable web app on supported devices. Its manifest defines the standalone portrait experience and shortcuts for search, submission, and recents; the install prompt waits until a returning session and provides a separate Share-to-Home-Screen path for iOS Safari.

References: src/…/manifest.ts• L6-90 src/…/pwa-install-prompt.tsx• L11-61 src/…/pwa-install-prompt.tsx• L63-165

Metadata and discoverability

The application shell also defines how the site appears before a page is opened and how crawlers find its public routes. Metadata describes the product and social previews, while static route metadata exposes the catalog and installable experience to browsers and search tools.

Page metadata

The root metadata supplies a default title and title template, catalog description, canonical base URL, social preview data, icons, indexing rules, and an RSS alternate. Route pages inherit this baseline unless they provide more specific page information.

References: src/…/layout.tsx• L35-116

Public route map

The sitemap makes the main browse, collection, category, blog, and icon pages discoverable as one public route set. Robots rules allow normal crawling and explicitly keep the machine-readable index available to supported AI crawlers.

References: src/…/sitemap.ts• L18-82 src/…/robots.ts• L5-25

Change checklist

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

  • When the responsive breakpoint changes, keep header and sidebar visibility, mobile body padding, dock behavior, gesture activation, and tablet rail defaults aligned.
  • When a navigation destination changes, update the matching large-screen header, expanded sidebar, collapsed rail, phone dock or More sheet, and footer path. Preserve the destination's active state and any expanded or collapsed form.
  • When category filtering changes, keep the filtered groups, available alphabet letters, jump targets, and any URL or icon-grid filter in sync.
  • When search routing changes, preserve the shared query state and the q URL contract for both header and phone input.
  • When sidebar collapse changes, preserve the saved preference, the tablet first-visit default, content padding, active states, and rail tooltips.
  • When sheet behavior changes, keep route-change closure, body scroll locking, safe-area padding, and direct icon-page fallback consistent.
  • When theme or surface tokens change, check fixed controls, sheets, announcement offsets, footer surfaces, and reduced-transparency behavior together.
  • When the installable experience changes, keep manifest shortcuts, standalone spacing, theme colors, and the delayed install prompt aligned.
  • When public routes or product descriptions change, update root metadata, sitemap entries, robots rules, and visible navigation together.

Important failure modes

TriggerConsequenceGuard
The large-screen breakpoint changes in only one shell surfaceDesktop and phone controls can overlap or both appear at onceTreat the media query, visibility classes, and mobile body spacing as one responsive contract
Fixed phone controls lose safe-area or body compensationThe dock or top bar can cover page actions on notched devicesKeep shared safe-area variables and mobile-shell padding aligned with control heights
Header and phone search stop sharing query stateThe input can show one query while the browse page shows another result setPreserve the search store and q route behavior across both entry points
Category filtering and alphabet groups use different source listsA visible letter can jump to the wrong group or a filtered group can have no usable jump targetDerive the available letters and jump targets from the same filtered category set
A sheet remains open after route navigationA stale overlay can cover a new page or retain the wrong iconClose mobile sheet state whenever the pathname changes
Sidebar or dock destinations drift from route active-state rulesUsers can reach a page but lose the visual location cueUpdate destination links and active predicates together
The announcement height is not passed to sticky desktop surfacesThe header or sidebar can cover the announcementKeep --banner-h measurement and both consuming offsets in sync
Install metadata and standalone layout disagreeThe installed app can show incorrect spacing or omit useful entry pointsKeep the manifest, viewport settings, and standalone body rules aligned
The collapsed rail, expanded sidebar, and content padding use different statesThe rail can hide labels while content keeps the wider offset, or route content can sit under the sidebarKeep the collapse store, sidebar width, and md content padding in sync

Key files

FileWhy to read it
src/…/layout.tsxDefines the order and shared scope of theme, announcement, navigation, route content, mobile controls, and footer.
src/…/header.tsxDefines the large-screen global navigation and shared search entry point.
src/…/sidebar-shell.tsxShows how routes receive the reusable browse rail, mobile navigation sheet, collapse state, and content alignment.
src/…/sidebar.tsxDefines the shared browse surface, sidebar modes, collections, featured links, category search, grouped navigation, and alphabet jumps.
src/…/sidebar-nav.tsxDefines the pinned destinations, Extensions grouping, Favorites sharing, and their expanded or collapsed forms.
src/…/sidebar-nav-item.tsxShows the shared labeled-row and icon-only rail behavior for one destination.
src/…/sidebar-collapse-toggle.tsxDefines the full-height control for expanding or collapsing the desktop rail.
src/…/alphabet-rail.tsxShows how category users jump through available initials on the large-screen browse rail.
src/…/mobile-shell.tsxCoordinates the phone top bar, dock, sheets, route changes, and touch behaviors.
src/…/mobile-bottom-dock.tsxDefines the primary phone navigation and its active-route model.
src/…/mobile-icon-sheet.tsxShows the phone quick-view path from icon selection to copy, download, favorite, and detail actions.
src/…/bottom-sheet.tsxDefines the shared overlay interaction model used by phone sheets.
src/…/theme-provider.tsxConnects the shared shell to persistent light and dark theme choice.
src/…/globals.cssDefines global theme roles, responsive spacing, safe-area values, surface effects, and accessibility guards.
src/…/manifest.tsDefines the installable web-app identity, display mode, icons, and shortcuts.
src/…/sitemap.tsShows the public route set exposed for discovery.