Track your progress, run tests, and get AI feedback
Run code and see test results
Submit and get AI-powered feedback
Track which problems you've solved
Content Platform UI: Scalable Component Library & Theming System
Design a robust frontend system for a rapidly growing content publishing platform. This prompt focuses on architecting a scalable component library and a flexible design system that supports diverse theming, ensures high accessibility standards, and promotes consistent UI across the application.
Your task is to propose a comprehensive architecture for the component library and design system. You should outline the core principles, technical choices, and implementation strategies to meet the specified requirements.
Imagine a popular online platform, 'Inkwell', that allows users to create, publish, and consume various forms of content – from articles and blogs to interactive guides. As Inkwell expands its user base and feature set, the existing UI has become inconsistent and difficult to maintain. A new initiative aims to unify the user experience and empower frontend teams to build features faster with a consistent, accessible, and themeable UI.
Constraints
Requirements
1.
Design a modular component architecture that promotes reusability, clear API definitions, and maintainability across the component library.
2.
Propose a robust and flexible theming mechanism that supports light/dark modes, custom brand themes, and dynamic switching without page reloads.
3.
Detail how accessibility (WCAG 2.1 AA standards) will be integrated from component design to implementation, including keyboard navigation and ARIA attributes.
4.
Outline a comprehensive strategy for documentation, component playgrounds (e.g., Storybook), and version control to facilitate adoption, contribution, and reliable consumption.
5.
Discuss considerations for component performance, including bundle size optimization, efficient rendering, and styling solution trade-offs.
6.
Explain how the design system would handle evolution, breaking changes, and backward compatibility while supporting multiple consuming applications.
7.
Describe the process for defining, managing, and applying design tokens to ensure consistent styling and facilitate theme customization.
Design Brief
The 'Inkwell' platform is experiencing rapid growth, leading to an urgent need for a unified, scalable, and maintainable frontend system. Your role is to design the core architecture for a Component Library and a Design System that will serve as the foundation for all future UI development.
Inkwell is a thriving content publishing platform. Users interact with a rich set of features including content creation (rich text editor, media uploads), content consumption (feed, article pages, search), user profiles, commenting, and administrative dashboards. The platform needs to support various content types and user journeys, all while maintaining a cohesive brand identity and providing a consistent, high-quality user experience.
The component library should provide foundational UI elements and composite components. Consider the following examples, and think about their API design, internal structure, and how they would integrate into the overall system:
Button, Input (text, number, checkbox, radio), Dropdown, Tooltip, Modal, Spinner, Avatar, ProgressBar.Card (for articles, profiles, comments), Rich Text Editor (integrated into content creation flows), Pagination, Navigation Bar, Tabs, Form components (e.g., controlled inputs, validation display).Each component should be highly reusable, well-documented, and adhere to a consistent API, allowing for customization while maintaining core functionality and styling.
The primary goals for the Inkwell Design System are:
The system needs to be highly flexible regarding theming:
Accessibility is a first-class citizen for Inkwell:
Discuss your approach to the following technical aspects:
Consider how your proposed architecture addresses these challenges as Inkwell grows: