← SoFi Interview Insights

SoFi·Frontend Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Frontend coding round at SoFi where the whole thing was building a typeahead/autocomplete component with just HTML and CSS, no JavaScript. Pixel-perfect stuff, cross-browser rendering, the works. Niche but kind of interesting if you're into that layer of frontend work.

Questions Asked (1)

Q1

Build a typeahead (autocomplete) input component using only HTML and CSS, matching a provided design mockup including input styles, placeholder behavior, dropdown layout, and hover/focus states.

Technical Trade-offsSystem Design
Author's notes

The pure CSS constraint is what got me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the constraints: since only HTML and CSS are allowed, the dropdown cannot be dynamically filtered or triggered by typing, so it must be a static list shown on focus. Then walk through how you would match the mockup using semantic HTML and modern CSS, and discuss the trade-offs of this limitation and how you'd extend it with JavaScript.

Pro tip: Acknowledge that a real typeahead needs JavaScript for filtering and dynamic behavior, but demonstrate that you can still achieve the visual design and basic focus/hover interactions with CSS alone. This shows you understand the boundaries of the technology and can communicate trade-offs effectively.

1. Clarify requirements and constraints

Confirm that only HTML and CSS are allowed, so the component will be static (no filtering). Ask about accessibility requirements, browser support, and whether the dropdown should appear on focus or click.

2. Structure the HTML semantically

Use a wrapper div, an input with a placeholder, and a list (ul/li) for suggestions. Ensure proper labeling and ARIA attributes for accessibility, even if not fully functional without JS.

3. Style the input and dropdown with CSS

Match the mockup's input styles (border, padding, font, placeholder color) and dropdown layout (position, background, shadow, item spacing). Use CSS variables for maintainability.

4. Implement hover and focus states

Use :hover and :focus-within on the wrapper to show/hide the dropdown and highlight items. Ensure focus styles are visible and meet contrast guidelines.

5. Discuss limitations and extensions

Explain that without JavaScript, the typeahead cannot filter or update dynamically. Propose how you would add JS later to enable filtering, keyboard navigation, and dynamic data fetching.

Key Points to Mention

  • Semantic HTML and accessibility (ARIA roles, labels, keyboard navigation)
  • CSS techniques for matching design: flexbox/grid, custom properties, pseudo-classes
  • Trade-offs of CSS-only solution: no dynamic filtering, limited interactivity
  • Use of :focus-within to show dropdown on input focus
  • Responsive design and cross-browser compatibility
  • How to extend with JavaScript for real typeahead functionality

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.