PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Brex

Build a React color multi-select dropdown UI

Last updated: Mar 29, 2026

Quick Overview

This question evaluates front-end React skills including component architecture, state management, data-driven rendering, accessibility considerations, and performance trade-offs involved in implementing a multi-select dropdown that presents selected colors' properties.

  • medium
  • Brex
  • Software Engineering Fundamentals
  • Software Engineer

Build a React color multi-select dropdown UI

Company: Brex

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Implement a React UI that lets users multi-select colors from a dropdown and view details. You are given a JavaScript object where each key is a color name (or id) and the value is an object of properties for that color. Example input: ```js const colorsByName = { red: { hex: "#FF0000", rgb: "255,0,0", family: "warm", contrastOnWhite: "AA" }, green: { hex: "#00FF00", rgb: "0,255,0", family: "cool", contrastOnWhite: "A" }, blue: { hex: "#0000FF", rgb: "0,0,255", family: "cool", contrastOnWhite: "AAA" }, // ... potentially many more }; ``` Requirements: 1. Render a dropdown (select-like) control that, when opened, shows a list of all colors. 2. Each color in the list is selectable (multi-select). The UI should make it clear which colors are currently selected. 3. Show a summary near the control: `X color(s) selected`. 4. Below the control, render a table showing the properties of all selected colors. - Each row corresponds to a selected color. - Columns correspond to the properties (include the color name plus each property key). 5. Handle basic UX concerns: - Toggling a selected item unselects it. - Closing/opening the dropdown works reliably. - Reasonable behavior when no colors are selected. Discuss any trade-offs you make (state shape, rendering performance with large lists, accessibility).

Quick Answer: This question evaluates front-end React skills including component architecture, state management, data-driven rendering, accessibility considerations, and performance trade-offs involved in implementing a multi-select dropdown that presents selected colors' properties.

Brex logo
Brex
Feb 10, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
2
0

Implement a React UI that lets users multi-select colors from a dropdown and view details.

You are given a JavaScript object where each key is a color name (or id) and the value is an object of properties for that color.

Example input:

const colorsByName = {
  red:   { hex: "#FF0000", rgb: "255,0,0", family: "warm", contrastOnWhite: "AA" },
  green: { hex: "#00FF00", rgb: "0,255,0", family: "cool", contrastOnWhite: "A" },
  blue:  { hex: "#0000FF", rgb: "0,0,255", family: "cool", contrastOnWhite: "AAA" },
  // ... potentially many more
};

Requirements:

  1. Render a dropdown (select-like) control that, when opened, shows a list of all colors.
  2. Each color in the list is selectable (multi-select). The UI should make it clear which colors are currently selected.
  3. Show a summary near the control: X color(s) selected .
  4. Below the control, render a table showing the properties of all selected colors.
    • Each row corresponds to a selected color.
    • Columns correspond to the properties (include the color name plus each property key).
  5. Handle basic UX concerns:
    • Toggling a selected item unselects it.
    • Closing/opening the dropdown works reliably.
    • Reasonable behavior when no colors are selected.

Discuss any trade-offs you make (state shape, rendering performance with large lists, accessibility).

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Brex•More Software Engineer•Brex Software Engineer•Brex Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.