Skip to content

Component Documentation

The Freeze Design frontend uses a library of reusable React components under frontend/components/, organised by feature.

Storybook

Browse and interact with components in Storybook (Storybook 10, framework @storybook/nextjs-vite; addons: links, a11y, docs; stories are picked up from components/**/*.stories.tsx and components/**/*.mdx):

Open Storybook →

Storybook provides: - Visual component catalog - Interactive prop controls (react-docgen-typescript) - Accessibility testing (@storybook/addon-a11y) - Component states and variants

Run it locally

cd frontend && npm run storybook   # http://localhost:6006
npm run build-storybook            # static build in storybook-static/

Coverage

Seven components have stories today: Logo, TopBar (components/header/), ProductCard (components/products/) and ColorSwatches, PriceDisplay, QuantitySelector, SizeSelector (components/product-detail/). The rest of the library is documented here and in the code.

TypeScript API

For TypeScript type definitions and utilities (npm run docs:typedoc):

Open TypeDoc →

Component Categories

Layout and shell

  • Navigation, Footer (Facebook, Instagram and a WhatsApp wa.me link from footer_whatsapp_number), StagingBanner, CookieConsent / CookieSettings, ThemeToggle, Toast (Toaster), StaticPage, FAQAccordion, JsonLd, WhatsAppVraagKnop ("Vraag het via WhatsApp", behind whatsapp_buttons_enabled) (components/)
  • components/header/: Header, TopBar (teal accent bar), Logo, IconBar, SearchBar, CategoryNav, CategoryDropdown, MobileHeader
  • components/homepage/: HeroSection, USPBar, CategoryBlocks, ShopCollectieSection, TeamkledingBlock ("Voor je team"), ContentBlocks; components/seo/: structured data
  • components/teamkleding/: the /teamkleding landing page (TeamkledingHero, HoeHetWerkt, GeschiktVoor, KledingstukKiezer, VeelgesteldeVragen, HulpBlok)

Catalog

  • components/products/: ProductCard (uses next/image with fill + responsive sizes), CardColorSwatches (colour dots under the photo, behind catalog_color_swatches_enabled), CategoryHeader, SubcategoryPills
  • components/product-detail/: ProductInfo, ProductImage, ColorSwatches, SizeSelector, SizeChartModal, QuantitySelector, PriceDisplay, PersonalizationPicker, WishlistButton; team ordering with OrderModeSwitch ("Voor jezelf | Voor een team"), SizeQuantityGrid and TeamPriceSummary
  • components/collection/: collection article cards and detail
  • components/reviews/: Google reviews block; components/newsletter/: sign-up form

Designer

  • components/ProductDesigner/: Designer (Fabric.js canvas) with components/ (CanvasSection, DesignToolbar, ToolNav, SidebarTabs, ViewSwitcher, ContextPanel, TextPropertiesPanel, ClipartColorPanel, NameNumberStylePanel, FontDropdown, ColorDropdown, ProductInfoCard, OrderPanelDrawer, DesignReviewPanel, GuestWarningModal, TeamOrderPanel, TabLoading, MobileBottomBar, MobileToolDrawer, MobileContextDrawer, MobileProductInfoBar), components/tabs/ (TextTab, ImageTab, ShapesTab, NamesTab, NamesNumbersTab, OrderTab, RosterPasteDialog) and components/team/ for the team mode (TeamAddBar, TeamSideTabs, TeamNamesSection, TeamRosterRows, TeamRosterDialog, useRowPreview); hooks useCanvasHistory, useFontLoader, useKeyboardShortcuts (ImagePropertiesPanel and KeyboardShortcutsHelp were removed in v1.54)
  • components/Designer/: Designer wrapper with ProductSelector, SaveDesignModal and the useDesigner hook (URL params product, color, size, design, voor=team, sizes). ColorSizeSelector is gone (#1192): colour and size are changed in the order tab (OrderTab, ProductDesigner/colorChange.ts) after designing
  • components/designs/: DesignApprovalControls; components/personalization/ (the old components/NamesNumbers/ and components/TeamOrder/ are gone, v1.53)

Commerce

  • components/Cart/: CartButton, TeamOrderCard (one card per OrderGroup with size breakdown and "Aanpassen"); components/checkout/: CheckoutLoginModal, OneClickSignup, PaymentRetry
  • components/orders/, components/quotes/, components/Account/, components/auth/, components/journey/ (guided journey UI)

Admin (components/admin/)

  • Shell: AdminHeader, AdminNav (fixed w-64 sidebar on desktop, drawer on mobile/tablet), AdminBreadcrumb, AdminLoginForm
  • Primitives: AdminDataTable, AdminFormField, AdminToast, AdminConfirmDialog, AdminEmptyState, AdminSkeleton, AdminStatusBadge, AdminTooltip, AdminSectionIntro, BulkActionsBar, PrintZonesBreakdown, SetupReadinessPanel
  • Feature folders: dashboard/, vandaag/, orders/, products/, pricing/, designs/, design-assets/, quotes/, cms/, cijfers/ (analytics, Recharts)

Providers (components/providers/)

  • QueryProvider (TanStack Query), SentryProvider
  • PostHogProvider - mounted only on shop routes (admin sessions are excluded)
  • MotionProvider - Motion animation context, shop routes only

Shared primitives (components/ui/)

  • Skeleton, PasswordInput, motion/ helpers

Sections