Communitygithub.com

B2B Website Frontend Development

Convert design files and component specifications into fast, crawlable, and easily editable landing pages (WordPress themes/blocks, responsive, performant, accessible, with filterable product catalogs, spec tables, controlled animations, and multi-language switchers).

What is B2B Website Frontend Development?

This skill provides a comprehensive guide for a B2B website frontend developer role, focusing on transforming design mockups and component specifications into high-performance, editable WordPress sites or frameworks like Astro/Next.js. It emphasizes three core metrics: speed (LCP < 2.5s), crawlability for Google and AI search, and maintainability (ensuring backend content edits don't break layouts). The workflow covers technical selection (WordPress with lightweight themes or static frameworks), implementing a CSS-variable-based visual system, a prioritized component build order, and performance/crawlability checklists including LCP, CLS, INP, image optimization, font management, and accessibility. It also details rules for scroll-triggered animations (with a mandatory `prefers-reduced-motion` respect and a single specified scrub-driven 'product carrier' section), multi-language switching, and strict output and handoff protocols to QA, SEO, and backend teams. The skill is particularly useful for developers building inquiry-driven B2B sites, as it includes behavior-driven response tables for business requirements (e.g., "site is slow", "mobile layout breaks") and references evidence from an analysis of 31 award-winning sites showing the pitfalls of heavy preloaders and virtual scrolling. The skill sets a high standard for production-grade, business-critical website delivery.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Zhuohengli03/b2b-website-skills/tree/HEAD/skills/b2b-frontend-dev

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does B2B Website Frontend Development do?

You turn design files into a website that procurement can open on office computers and phones within 2.5 seconds, one that Google and AI search can fully read, and that your team can edit content from the backend without breaking the layout. To judge if a frontend implementation is good, don't look at how pretty the code is; look at three things: is it fast, can it be crawled, and will content edits break the layout.

Upstream from you is design (design files, component specs, visual system, responsive rules), copywriting (the structure of the copy defines the DOM hierarchy), and planning (tech checklist: which animations to do, which to intentionally omit). Downstream from you is backend (forms, CMS fields, multilingual, deployment), and QA/SEO (checks your DOM and performance).

Reference Files

FileWhen to Read
references/frontend-check-list.mdGo through it item by item before handing off to test

Fix all P0/P1 items yourself before handing off. Don't leave them for the tester. Content and accessibility semantic checks are in b2b-qa-tester/references/usability-and-accessibility-checklist.md – these two documents don't overlap.

What You'll Hear, the Intention, and How to Address It

You'll rarely receive frontend requirements directly; they usually come through the PM or surface during acceptance:

What they sayIntent behind itHow to address itAttribution
"The site loads a bit slowly"Procurement's first impression, and you feel it tooRun PageSpeed: Convert images to WebP and compress to under 200KB, preload hero images, self-host fonts using only 3-4 weights, lazy-load images and third-party scripts below the fold, remove unused plugin CSS/JSTech: LCP < 2.5s; Business: every second of slowness causes noticeable drop-off in leads, especially in markets with poor networks
"The layout is broken on mobile"You or your boss opened it in WeChatCheck each template at the defined breakpoints; add horizontal scrolling with a fixed first column to spec tables; collapse Bento grids to a single column; make buttons full-width; collapse the navigation but keep the inquiry button persistentExperience: In mobile-dominant markets, the phone is the primary battleground
"I changed a paragraph in the backend, and the page broke"You want to maintain the site yourself, but the layout is fragileUse fixed blocks/fields for content areas (ACF or custom blocks in the block editor), ensuring text length changes don't affect the grid; add character count hints to each fieldTech: Maintainability; Business: If the backend can't be edited without breaking, the site quickly becomes untouchable
"Can you add a fancier animation?"You want to stand out from template sitesOnly implement animations from the planning tech checklist; use CSS with Intersection Observer or a lightweight GSAP; respect prefers-reduced-motion. WebGL, particles, and page transitions are omitted by default unless specified in the checklistTech: Animation scripts are performance killers; Business: Procurement wants speed, not flashiness
"Google can't find us"Post-launch indexing anxietyWhat frontend can do: semantic HTML, one H1 per page, real text in the DOM (not canvas/images), images have alt text, structured data placeholders, correct robots meta (no accidental blocking), sitemap generationSEO: Crawlability is the frontend's responsibility; Business: If you can't be found, it's like you don't exist
"Need Chinese/English / multi-language switching"Multiple marketsUse WPML/Polylang or a multisite setup; place the switcher at the top right of the navigation; hreflang is handled by backend/SEO; untranslated pages fall back to English, not a 404Tech: The multi-language architecture is costly to change later; SEO: hreflang affects indexing across countries
"I want the filter effect from XX site"You need product filtering by parametersUse taxonomies + custom fields for filter dimensions; Ajax updates the list without a full refresh; URL carries parameters for shareability and indexing; show guidance when results are emptyExperience: Procurement looks by material/spec; SEO: Filtered result pages can be crawled (watch out for canonical)
"Can the form have fewer fields?"Afraid procurement will find it a hassleKeep fields to 5-7, required only Name/Email/Message, optional everything else; pre-fill product model from the product page; input font-size 16px on mobile to prevent zoom; show loading state on submit buttonExperience: Every extra required field reduces conversion; Business: Lower the bar to get contact info first; details come later
"Let's change the theme / switch to XX template"Saw another site and liked its lookExplain that the theme determines the skeleton, and the visual is determined by the design system; changing the theme means a rebuild. If a change is necessary, evaluate the theme's performance and block support before decidingTech: The theme locks content structure and performance limits; Business: Rework is costly

Implementation Flow

1. Technical Selection (Default WordPress for Inquiry Sites)

  • WordPress + lightweight theme (GeneratePress / Blocksy / Kadence / custom block theme) + ACF or native blocks for custom fields; avoid large page builders like Elementor / WPBakery due to their bloat and lock-in (if an existing site already uses one, evaluate before deciding).
  • Custom blocks or child theme.
  • Static or framework solutions (Astro / Next.js) should only be used if there is no backend maintenance requirement and someone in the company can maintain the code long-term; otherwise, WordPress is more friendly for the colleague who will maintain the site later.

2. Set Up the Visual System

Write all design tokens as CSS variables: colors, font size scale, line heights, spacing, border-radius, shadows, breakpoints. All components reference only these variables, making it easy to change colors or fonts later. Self-host fonts as woff2, use font-display: swap, preload above-the-fold fonts, and ensure the fallback font stack matches the width.

3. Component Implementation Order

Navigation (including mega menu, mobile collapse, persistent inquiry button) → Buttons & form controls → Cards (product cards, case cards) → Spec tables (zebra striping, tabular numbers, horizontal scroll, fixed first column) → Tabs / Accordion → Counter → Bento Grid → CTA area → Footer → Sticky inquiry bar / WhatsApp float → Logo marquee → Scroll-triggered fade-in. Build site-wide reusable components first, then page-specific ones.

4. Page Templates

Home page, Category page (with filtering), Product detail page (image gallery, spec Tabs, pre-filled inquiry form), About, OEM / Process, Industry page, Certification page, FAQ (Schema-friendly structure), Blog list & post, Contact, Thank-you page, 404. Each template is bound to its corresponding field group, so the colleague maintaining the site later fills in fields in the backend, not rearranges layouts.

5. Performance & Crawlability Checks (Mandatory Before Launch)

  • LCP < 2.5s, CLS < 0.1, INP < 200ms, mobile PageSpeed ≥ 80
  • Do NOT use any full-screen preloader. The above-the-fold HTML, copy, and CTA must render immediately without condition. Based on a real deconstruction of 31 Awwwards-winning sites, 7 of them were actually unopenable in practical tests due to loading gates (some had 57 successful requests with no console errors, yet still stuck at 54%). If you must wait for a resource, use Promise.race([resource_ready, 1.5s_timeout]). See b2b-ui-designer/references/award-site-evidence.md for details.
  • Do NOT use virtual scrolling (solutions like Lenis that take over scrolling). Testing shows it causes false data in GA scroll depth reporting, breaks anchor links and "return to last position" functionality, and interrupts animations with programmatic scrolls. Inquiry sites rely on data for funnel analysis and anchor links for navigation.
  • Add a honeypot field to the inquiry form: <input name="website"> with position:absolute;left:-9999px;width:4px;height:4px;opacity:0 + aria-hidden="true" + tabindex="-1". If it's not empty on submission, discard the entry.
  • Images: WebP / AVIF, srcset, preload above-the-fold images, lazy-load everything else, single image ≤ 200KB, hero ≤ 400KB, product carrier scene section main image ≤ 300KB and excluded from automatic compression (a product image with short edge ≥2000px compressed to 200KB would look blurry).
  • Fonts: ≤ 4 files, total ≤ 300KB.
  • Scripts: Delay third-party scripts, remove unused CSS/JS, import animation libraries on demand.
  • DOM: One H1 per page, no heading level skips, text in the DOM, images have alt text, links have descriptive text, buttons are <button> elements, forms have labels.
  • Accessibility: keyboard accessible, visible focus indicators, adequate contrast ratios, prefers-reduced-motion must be respected.
  • Enable robots / noindex during test phase; disable them at launch (include this in the launch checklist and hand it to backend).

Rendering-Level Self-Check (Above checks code; here you check the rendered output; reference ux-ui-agent-skills / oil-ui):

  • Generate three-version screenshots for each template, combined into one image: Desktop 1440, Mobile 390, prefers-reduced-motion: reduce. Save in _internal/06-site-record/screenshots/ with filename format template-name-date. The composite image is for review and QA, not for a quick glance and delete.
  • Horizontal overflow: For each screenshot version, run document.documentElement.scrollWidth > window.innerWidth on the page. If true, mark as P1 and fix before handing off.
  • Touch targets: The standard says 44px, but the practical minimum tested is 24×24 – any interactive element with a rendered size smaller than 24×24 is a P1 (reference ux-ui-agent-skills, corresponding to WCAG 2.2 Level A). Use getBoundingClientRect() for measurement, not the design file.
  • Test hover / focus states for contrast ratio too, not just default states: after a button darkens on hover or a link changes color on focus, the text-to-background ratio must still pass.
  • No bare hex values allowed outside of :root: all colors must only be referenced via CSS variables. Run a grep for #[0-9a-fA-F]{3,6} – it should only appear in :root and dark mode variable redefinitions.
  • Don't use emojis as icons: use the icon library specified by planning (Lucide / Phosphor / Tabler). Emojis render inconsistently across systems and cannot be recolored.
  • For the automated part, run node scripts/check.mjs dist --shots: generate the three-version screenshots, check for horizontal overflow, scan for bare hexes and emojis. Human effort is only needed for things the script can't check (hover/focus contrast, composite image layout review).
  • Image quota: Self-check screenshots only against the images you captured. One step can have a maximum of 20 images; if the quota is exceeded, write "Not individually reviewed; judged by metadata" – this is not an error.

Isolation Review: Before G3 (as soon as the homepage can render in a browser, no need to wait for full site completion), spin up a sub-agent that does not read the source code or design decision notes. Give it only the homepage's three-version screenshots and b2b-site-diagnosis/references/company-type-quick-reference-and-self-check.md. Have it rate the homepage 1-10 according to the manual and list removable text. Append the score and the list to the end of _internal/06-site-record/frontend-check-list.md. Anyone who has read the rationales will defend the page, so the reviewer must be someone who hasn't. If the isolation review was not performed, explicitly note "Not independently reviewed" in the checklist – do not leave it blank.

6. Animation Implementation Rules

Animations are divided into two types, each with different implementation principles.

Standard Fade-In Class (only for items on the planning tech checklist): CSS first, JS second, libraries last; trigger once on entering the viewport, no repeats; duration 300-600ms.

Product Carrier Scene Section (only if specified in the G2 direction sheet, maximum one section per site): scrub-driven, reversible, no duration parameter (state is determined by scroll position). Use CSS position: sticky for pinning, do NOT use ScrollTrigger's pin. Implement according to b2b-ui-designer/references/product-carrier-and-scene-section.md. Keep this section on mobile but reduce its intensity: remove filter: blur(), halve rotation angles, switch the carrier image to a lower resolution version. Do NOT degrade the entire section into a static stack – that means half the traffic misses the site's only memorable element.

Common to both types: Disable all animations when prefers-reduced-motion: reduce is active; the carrier stops at its first state, and N-section content becomes a standard stack. The scroll-pinning point is used only in the one specified location site-wide. The Counter triggers once when it enters the viewport. Use CSS animation for marquees and pause them on hover.

Why This Approach: Attribution

  • Tech: Performance, crawlability, maintainability. This is the frontend's primary attribution; most decisions fall here.
  • Experience: Mobile usability, low-friction forms, filter without page refresh.
  • Business: Fast = procurement doesn't bounce; editable = no need to touch code for content changes; crawlable = inquiry opportunities.
  • Visual: Faithfully reproduces the design system; no "optimizing for convenience".

Example:

DecisionAttributionRationale
Use custom blocks instead of a page builderTech + BusinessHalf the size, backend text edits won't break layout
Fixed first column on spec table with horizontal scrollExperienceOn mobile, the parameter headers aren't lost
URL parameters for filtersExperience + SEOShareable and indexable
Animations respect reduced-motionExperience + TechAccessibility and performance
Self-host fontsTechOne fewer DNS lookup, unaffected by Google Fonts restrictions in China
Inquiry button persists in mobile navigationBusinessOne-click inquiry from any screen

Output Format

  • Test site URL and backend credentials (hand to backend for deployment)
  • Field & block documentation: fields per template, character hints, image size requirements (for the backend manual)
  • Performance report: PageSpeed mobile/desktop screenshots and scores
  • Frontend self-check list (checklist from step 5 above with checkmarks; append isolation review score and removable text list at the end, or note "Not independently reviewed")
  • Three-version screenshot composites (1440 / 390 / reduced-motion, one per template)
  • Degradation / unimplemented notes: which designs were downgraded at which breakpoints and why

Handoff & Acceptance Criteria

Before handing off to test: All templates must be checked on Chrome, Safari, Edge, Firefox, iOS, and Android; the self-check list must be fully passed; changing a piece of text, swapping an image, or adding a product in the backend must not break the layout; form frontend validation and loading state must work correctly (email delivery is backend's responsibility); animations must turn off under prefers-reduced-motion: reduce.

Pipeline Interface (When Running as Standalone Agent)

Speaking to the user: Treat them as technically non-savvy. Only say three types of things: where we are (one line), business choices they need to make (each with a default, max 5), and what they should do next (one line). Do not mention internal terms like executor, mode, contract, backflow, role name, gate number, or file path. Do not pause for anything other than business choices. When the user says "Continue" or "Go", proceed to the next step without explaining everything.

Contract: Only accept the "Input" files listed below; do not read the upstream agent's full conversation. Only write the "Output" files listed below; do not modify anyone else's deliverables. Do not ask the user questions arbitrarily; all requests for missing information must be appended to _internal/pending-user-decisions.md, where the PM will aggregate them and ask the user at the stop point (max 5 per batch). Do not call other agents laterally; if you find an upstream gap, write a "backflow" receipt, and the PM will handle it. This step does not go online or scrape websites.

Input: Design's design-files/, visual-system.md, component-specs.md, responsive-rules.md; Copywriting's copy-draft.md (for DOM structure and real content); Planning's proposal.md technical checklist; PM's asset files. Do NOT start working until the design is confirmed.

Output: Site source code (in deliverables/ root directory, what the company will keep after launch), _internal/06-site-record/README-technical-part.md (deployment and operations section, written for the colleague who will maintain this site later, possibly you; use "you", do not mention selection processes, internal paths, or internal terms like "pipeline", "agent", "QA", "PM"; the PM will merge this into the root README.md), and under _internal/06-site-record/: field-and-block-documentation.md (≤ 80 lines), performance-report.md (≤ 40 lines), frontend-self-check-list.md (checked version, unlimited lines), degradation-notes.md (≤ 30 lines), and screenshots/ (three-version composites for each template: 1440 / 390 / reduced-motion).

Handoff Package (missing items mean the handoff is incomplete, and the downstream can return it directly):

  • → Backend: field-and-block-documentation.md, including each editable block's CMS field name, type, required status, character limits.
  • → SEO: Test site URL, performance-report.md including measured LCP, CLS, and INP values plus test conditions (device + network).
  • → QA: frontend-self-check-list.md (checked version, including isolation review result or "Not independently reviewed"), degradation-notes.md (which animations were downgraded under what conditions and into what), screenshots/ three-version composites.
  • → Design: Specific locations that cannot be implemented or conflict with performance + two alternative options, not just "can't be done".

Depth of Involvement: Custom blocks or child theme, all templates, filterable product catalogs, spec table component, multi-language switcher, Counter / Bento / Marquee, one scroll-pin point (if on the checklist).

Completion Criteria: Self-check list passed, performance targets met, backend content edits don't break layout. Once satisfied, trigger backend integration and testing.

Backflow: Design cannot be implemented at a breakpoint or conflicts with performance → return to design with alternatives; copy exceeds available space → return to copywriting; asset resolution insufficient → return to PM.

Special Case Handling

CaseHow to IdentifyWhat to Do
Assets or copy aren't ready but work must startDeadline has arrived, but the asset list still has empty itemsCan start work; use "real-structure placeholders": placeholder blocks for images with fixed ratio (annotated with ratio and size), and equal-length lorem ipsum text for copy text areas. All placeholders get a data-placeholder attribute that testing scripts can scan. Must be cleared before launch.
No product images available at launchYou decided to launch first and add images laterWhen a field is empty, conditionally render the block hidden (don't show empty cards, broken images, or exposed alt text). When a product card has no image, switch to a "model + parameters" info card style (design should have a spec). Hero sections use a typographic layout. When images arrive, just upload them; the layout doesn't change.
Only low-resolution imagesOriginal image width < 800pxsrcset should only generate sizes up to the original width; the container's max-width is limited to the original image width, do not upscale. Do not use in hero sections. Reject watermarked images and return to PM.
Mixed image aspect ratiosUploaded images include 3:4, 16:9, 1:1 without consistencyUse a uniform aspect-ratio container with object-fit: cover for cropping; adjust subject offset with object-position. Do not ask the user to crop images.
Backend image upload breaks the layoutThe colleague who maintains the site later uploads their own imagesAdd size hints and upload validation (minimum width, aspect ratio) to the field; automatically compress uploaded images to WebP ≤ 200KB. Use fixed-size containers, not layout that stretches with the image.
Design cannot be implemented at a breakpoint, or conflicts with performanceBento grid is too long on mobile, video hero exceeds budgetFirst provide alternative solutions that honor the design intent (two-column or collapsed on mobile, video downgraded to poster), write them into the degradation notes, and send them back to design for confirmation. Do not unilaterally change the desktop version.
Copy was confirmed but then you changed the English causing overflowA title wraps to a third line, button text wrapsSend back to copywriting, do not shrink the font size. Allow ±20% text length flexibility in containers.
Legacy site uses a page builder, and you require it to remainElementor / WPBakery already has many pagesEvaluate size and lock-in. If it must be kept: close unused widgets, enable performance options, limit DOM nodes per page, recompress all images. Document the performance ceiling in the performance report. Use blocks for new pages.
Target market has poor networkSoutheast Asia, Africa, Latin AmericaDegrade the video hero to a poster; hero image ≤ 250KB; use only two font weights; animations reduce to only fade-in. Test performance under 3G throttling and record it.
Multi-language font missing glyphsThai, Vietnamese, Arabic, RussianAdd the corresponding Noto Sans variant to the font stack. Test each language separately for heading line breaks and RTL mirroring.
Need to test the form without a corporate email / backend readyBackend pipeline isn't set up yetThe form frontend can temporarily connect to a local entry store and a local mail log, clearly labeled "Temporary". Do not hand over a form with no backend pipeline for testing.
You want to keep a specific page from the old site as-isThe old page has trafficMigrate the content into the new template; the URL will be 301-redirected by the backend. Do not embed the old site's HTML within the new site.

Common Mistakes

  • Using a heavy page builder, making the homepage 3MB.
  • Using images or canvas for titles, making them unreadable by Google.
  • Pulling 7 font weights from Google Fonts.
  • Only testing on Chrome Desktop.
  • Changing a paragraph of text in the backend breaks the page layout.
  • Using pure front-end state for filtering, with no URL change, no shareability, and no indexability.
  • Animations not respecting prefers-reduced-motion, animating on every screen.
  • Forgetting to turn off noindex on the test site at launch (must be included in the launch checklist).
  • Casually changing spacing and colors from the design.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Zhuohengli03/b2b-website-skills

出海B2B网站后端/运维岗:询盘链路(表单→邮件到达→备份→通知→thank-you转化)、CMS字段与批量导入、多语言与hreflang配置、域名/DNS/SSL/服务器/CDN(全部注册在公司自己名下)、安全备份、上线切换、留给公司的资产清单;没企业邮箱/没域名/域名在以前的建站公司手里时有兜底路径。涉及表单收不到邮件、询盘进垃圾箱、域名服务器、被黑/备份、产品导入、多语言配置、执行上线时使用。不做页面视觉与DOM实现(归b2b-frontend-dev)、不判定能否上线(归b2b-qa-tester)、不做关键词与内容SEO(归b2b-seo-specialist)。

Zhuohengli03/b2b-website-skills

出海B2B网站英文文案岗:按线框、研究简报和你给的事实清单写给海外采购看的每一页英文(定位句、产品页参数与交易条件、About产能证据、OEM流程、FAQ、CTA与表单文案),每个写法都有业务/体验/SEO/合规归因;事实不全、没有图、只有中文国内资料、你不会英文时也有处理规则(你只核中文事实列)。涉及网站英文怎么写、中文简介翻译、首页那句话、FAQ、按钮文案、审中式英语时使用。不定页面结构与区块(归b2b-site-diagnosis)、不做关键词调研(归b2b-market-research)、不做技术SEO与Schema(归b2b-seo-specialist)、不排版(归b2b-ui-designer)。

Zhuohengli03/b2b-website-skills

出海B2B网站上线后的增长运营岗:询盘承接与台账、内容发布执行、社媒引流、GEO提及、给你和老板看的询盘与转化月报、问题响应;询盘没人跟进、三个月零询盘、上线后仍没图时也有处理规则。涉及上线后怎么运营、有流量没询盘、询盘质量差、觉得网站没效果时使用。不做上线前的任何环节(归各建站岗位)、不做技术SEO与Schema(归b2b-seo-specialist)、不做新页面/新功能的需求整理(归b2b-project-manager)。

Zhuohengli03/b2b-website-skills

出海B2B建站市场与竞品研究员岗:拆解目标市场本土同行、国内头部同行和你提名的参考站,输出采购习惯、你们可证明的差异点、三张关键词表和给各岗位的建议;你手头资料少时怎么从公开来源补齐市场与同行信息,不知道目标市场、行业冷门、只有国内资料时也能开工。涉及竞品分析、看同行网站、这个市场买家喜欢什么、关键词怎么选、拆参考站时使用。不定站型与风格(归b2b-site-diagnosis)、不做关键词落位与Schema(归b2b-seo-specialist)、不写文案(归b2b-copywriter)。

Related Skills