Design Surface
The design surface is the part of any TSX file that directly maps to the decisions you make in Figma. It is the props list that defines what a component can be, the variant types that match your design tokens, the conditional rendering that creates states like loading error and empty, the layout primitives that use flex grid padding and gap to arrange children, the specific Tailwind classes or styled component rules that set typography color and spacing, and the way smaller components compose into larger ones. Treat a component file like a Figma component. Read the name first, then the props interface, then the variant map, then the returned JSX tree, then the classes. That order turns a scary file into something as familiar as your component library in Figma. By 2026 every designer at forward leaning companies like Vercel, Linear, and Ramp had adopted this approach. They no longer feared opening a PR. They scanned for mismatches in under sixty seconds. A variant prop such as size: 'sm' | 'md' | 'lg' | 'xl' immediately tells you if the scale matches your spacing system. A line like className={cn('p-6 flex flex-col gap-4', variantClasses[variant])} shows both layout and variant application in one glance. Conditional blocks using the ternary operator or the && shortcut reveal every visual state the component supports. Component composition appears as one component nested inside another like <Header /> inside <Modal>. These five patterns form the entire design surface. Learn to spot them by shape and you can critique code with the same confidence you critique a layout in Figma. The result is tighter collaboration and fewer surprises when the feature launches.
Design surface is not hooks, not data fetching, not business logic, and not anything that executes before the browser paints pixels. It is not useState that holds open close state for a dropdown, not useEffect that adds event listeners for escape key dismissal, not async functions that call internal APIs built on Supabase or Clerk, and not any code that lives in getServerSideProps or React Server Components that query databases. Those patterns form the engineering surface. They require deep understanding of timing, dependencies, caching strategies, and error boundaries. Designers who dive into that territory without years of practice usually create more problems than they solve. The shapes are easy to recognize so you can skip them without guilt. Any line that begins with use followed by a capital letter is a hook and therefore engineering. Any function marked async or containing await is data related. Any block with square brackets containing variables at the end is an effect. Once you see those shapes your eyes drop straight to the return statement where the design surface lives. This boundary keeps the workflow clean. Designers own what users see and feel. Engineers own what makes it work reliably at scale. Ignore this boundary and you risk breaking production. Respect it and the entire frontend becomes legible to you in a single weekend of focused practice.
A concrete example from Stripe's 2026 checkout redesign shows exactly how this works in practice. The AddressForm component exposed a design surface built around country: 'US' | 'EU' | 'JP', includePhone, and formState: 'idle' | 'loading' | 'error'. The variant map adjusted label positions and button text for each country while keeping the core layout stable. A ternary conditional swapped between the form fields, a skeleton loader with pulsing gray rectangles, and a red error banner with specific messaging pulled from the design system copy. Layout used a responsive grid that stacked on mobile with className="grid grid-cols-1 md:grid-cols-2 gap-6". Spacing classes like mb-8 and p-10 mapped exactly to Stripe's eight point scale. The designer opened the PR in Cursor, pasted the file into Claude Code, and ran the prompt to compare against the attached Figma frame. The model returned three mismatches: the error state used the wrong illustration, the phone field appeared in the EU variant when it should have been optional, and one button used a raw blue instead of the token. All three were fixed before merge. Throughout this process the designer never touched the useForm hook from React Hook Form or the mutation that submitted to the payment API. Those lines stayed in the engineering surface where the Stripe engineers owned performance and accessibility compliance at depth.
Another real case came from the Notion 2026 database gallery view update. The Card component there used heavy composition with a prop for metadataPosition that accepted 'top' | 'bottom' | 'none'. The design surface included a complex conditional tree that rendered different property chips based on which fields were visible. Every chip used consistent typography classes like text-[13px] font-medium text-neutral-500 that matched the design system perfectly. The layout primitive was a flex container with items-start and a gap that scaled with a design token. The designer spotted during PR review that the hover state did not dim the background image as specified in the latest Figma update from the week before. A single comment fixed it. The useSWR hook that fetched live database records and the complex state machine that handled real time updates from other users remained invisible to the design review. This separation let the designer focus on what mattered for user experience while the engineer focused on what mattered for reliability.
Use design surface knowledge on every frontend PR that touches UI components. Run the checklist. Check that component names match, that variant values align with tokens, that every state from the Figma file exists in code, that no arbitrary values sneak into spacing or colors. Use it when pairing with engineers at your company to evolve the shared component library. Use the three Claude prompts religiously because they translate code into design language in seconds. This approach powered the rapid iteration cycles that teams at Perplexity and Arc used to ship new interfaces weekly in 2026. Never use it to justify editing engineering surface code yourself. When the discussion turns to refactoring the global state management from Redux to Jotai or improving the caching layer with React Query, step back. Leave a note about the visual outcome you need and let the specialists handle the implementation. The same rule applies to performance tweaks or analytics instrumentation. Your job is to make sure the design survives the journey from Figma to production. Their job is to make sure it gets there safely. Cross that line only on tiny non breaking visual tweaks like adjusting a single class on a static element. Anything more and you risk becoming the bottleneck instead of the accelerator.
Design surface turns your codebase from an engineering black box into a living design artifact that ships pixel perfect interfaces every single time.
Read the full guide
Related terms
Keep exploring
Code Reading
Code reading is the skill of scanning TSX files like Figma components by focusing on props variants states and styling to spot mismatches before they ship. It lets designers review frontend PRs with confidence without ever writing production code.
Engineering Surface
Engineering surface is the layer of TSX code that handles state hooks, side effects, async data fetching, and server logic. Designers learn its four distinct shapes so they can skim past it without anxiety and keep every PR comment locked to the actual design decisions.
Component Variant
A component variant is a typed prop that switches one React component between distinct visual states defined in your design system.
Layout Primitive
Layout primitives are the naked divs loaded with Tailwind flex, grid, gap, padding, and alignment classes that control every bit of structure and whitespace in a React component.
Design Tokens
The atomic design values (colors, spacing, typography, shadows, motion) stored as platform-agnostic variables that every component in a design system references.