UI
189 bites tagged UI — interview questions with model answers, and 60-second explainers.
Adaptive UI for Foldables: Thinking in Postures
An adaptive UI for foldables thinks in "postures," not just screen sizes, reacting to states like folded or tabletop mode. This is key for apps on devices like the Pixel Fold. The footgun is treating a foldable like a big tablet, ignoring its unique physical.
Using Component Libraries in React Native
A component library is a pre-fab UI kit for your app. Instead of building every button from scratch, you get polished, ready-to-use pieces that handle platform-specific animations and accessibility.
Dynamic Theme Switching with CSS
Let your app's theme automatically follow the user's OS setting. CSS's `prefers-color-scheme` media query lets you define styles for light and dark modes. The footgun is forgetting the 'no-preference' state, which can result in an unstyled default.
White-Label UI: Design Once, Rebrand Infinitely
White-label UI is like a WordPress theme for your product: a single design that other companies can rebrand. It lets agencies serve multiple clients without rebuilding the UI from scratch.
Theme Object: Your Design System's Single Source of Truth
A theme object is a central dictionary for your UI's design tokens, like colors and font sizes. It ensures consistency across components by providing a single, shared source for styling values.
Component Detachment Rate: A Design System Health Metric
Component Detachment Rate is a design system health metric, like customer churn. It tracks how often designers must break a component's link to its source to make custom changes, signaling that the component is too rigid or lacks needed variants.
How Design Systems Lower Your UI Bug Rate
A design system is a factory for pre-tested UI parts. By using standardized components instead of hand-crafting them each time, you reduce one-off bugs. This is a key metric for proving a design system's ROI, but teams often fail to track it.
Design System Governance: Preventing UI Drift
Design system governance is the rulebook that stops your UI from becoming a free-for-all. It's used to manage contributions, maintain consistency, and ensure updates are intentional, preventing drift as teams and products scale.
Unit Testing UI Components: Beyond the DOM Mock
Unit tests for UI components verify individual pieces in a mocked browser environment (jsdom). This is standard for checking component logic with Jest or Vitest, but it can't test visual rendering, element sizes, or layout, creating critical blind spots.
Storybook: A Workshop for Isolated UI Components
Storybook is a workshop for building UI components in isolation, separate from your app's business logic. It's ideal for developing edge cases and documenting a design system.
Figma Team Libraries: A Single Source of Truth
Think of a Figma Library as a shared box of official LEGOs for your team. It ensures everyone uses the same approved components, styles, and variables, keeping designs consistent. The biggest footgun is forgetting to publish changes to the main components.
The Slot Pattern: Making UI Components Composable
The Slot Pattern makes components flexible by defining areas for custom content, like a picture frame for your UI. It's used in Cards or Modals to allow varied content in a consistent frame. The footgun is that too much flexibility can break consistency.
Wizard/Stepper Pattern: Guide Users Through Complex Tasks
A wizard or stepper pattern is like a recipe for a complex task, breaking a long process into numbered, manageable steps. It's ideal for multi-stage forms like onboarding or checkout flows.
Skeleton Screens: Faster by Faking It
Skeleton screens create the illusion of speed by showing a wireframe-like preview of a page while content loads. They're used for full-page loads to set expectations about the layout. The footgun is showing just the app frame, which gives no structure.
Component Composition: Treat a Group Like an Individual
Component composition treats a group of objects the same as a single one. This allows building complex UIs by nesting simple components, like putting a Button inside a Form. The footgun is creating monolithic components instead of small, reusable ones.
Component Variants: One Component, Many Forms
Component variants are like Lego bricks for your UI: one block can build many things. Instead of creating a unique component for every button state or size, you define properties to manage its variations.
Vertical Rhythm: A Formula for Consistent Spacing
Vertical rhythm is a system for consistent spacing derived from your body text's line height. Use this calculated unit between all elements—paragraphs, lists, and after headings—to create harmony.
WCAG Color Contrast: The 4.5:1 Rule for Readability
WCAG contrast ratios ensure text is readable for people with low vision by measuring relative luminance, not just color. Standard text needs a 4.5:1 ratio against its background.
Spacing Scales: Using Multiples for Consistent UI
A spacing scale builds consistent UI layouts from a limited set of values, usually multiples of a base unit like 8px. It's used for everything from button padding to page gaps. The footgun is using arbitrary pixel values, which breaks the system's rhythm.
Typographic Scale: A System for Consistent Text
A typographic scale is a predefined set of font sizes and line heights that creates visual harmony. Design systems use it for consistent, readable text across devices. The footgun is adding one-off font sizes, which breaks the system's rhythm and consistency.
Design Systems: Your UI's Single Source of Truth
A design system is the single source of truth for UI, giving designers and developers a shared toolkit of reusable components and standards. It ensures consistency and efficiency across projects.
Design System: The Whole vs. Its Parts
A design system is the parent; style guides and component libraries are its children. It's the full toolkit for building consistent products at scale, containing rules, patterns, and ready-to-use code.
A Design System is a Shared Toolbox, Not Just a Sticker Sheet
A design system is a shared toolbox of reusable UI components and rules, not just a style guide. It ensures consistency and speed when multiple teams build products at scale.
Component Usage Guidelines: The Manual for Your Design System
Usage guidelines are the instruction manual for your design system, ensuring consistency. They prevent developers from guessing button states and designers from stretching logos.
Get UI bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.