gpui-styling

Guide GPUI styling with theming, responsive layouts, and color systems.

8|2|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/geoffjay/claude-plugins --skill gpui-styling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpui-styling
Source: https://github.com/geoffjay/claude-plugins/tree/main/plugins/rust-gpui-developer/skills/gpui-styling
Command: npx skills add https://github.com/geoffjay/claude-plugins --skill gpui-styling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating visually appealing and consistent user interfaces in GPUI, with proper theming, responsive layouts, and reusable styles, can be complex without a clear understanding of the styling system. This Skill simplifies the process of building modern UIs.

Core Features & Use Cases

  • Styling API Fundamentals: Master basic styling with colors, spacing, sizing, borders, and Flexbox for efficient and flexible layout design.
  • Theme System: Structure and implement light/dark themes, and seamlessly integrate them into components for a consistent and customizable user experience.
  • Responsive Design: Apply techniques for detecting window size and implementing breakpoint-based styling to create adaptive UIs that look great on any screen.
  • Use Case: A Rust developer wants to design a modern-looking GPUI application that adapts to different screen sizes and offers both light and dark modes. This Skill provides the necessary tools and patterns to implement a robust and flexible styling system, enhancing user engagement.

Quick Start

// Basic GPUI styling div() .bg(rgb(0x2563eb)) // Background color .text_color(white()) // Text color .p_4() // Padding: 1rem .rounded_lg() // Border radius: large .child("Styled content")

Frequently Asked Questions about gpui-styling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I style components in GPUI with colors and spacing?

GPUI styling uses chainable APIs for colors, spacing, and sizing. Apply background colors with `.bg()`, text colors with `.text_color()`, padding with `.p_*()` utilities, and border radius with `.rounded_*()`. These methods compose into readable, maintainable style chains on div and other elements.

How do I implement light and dark themes in a GPUI application?

Structure theme data as color systems and pass theme state through your component tree. Define separate color palettes for light and dark modes, then conditionally apply colors based on the active theme. GPUI's styling API integrates theme colors directly into component chains.

Can I build responsive layouts in GPUI that adapt to screen size?

Yes. Detect window size changes and apply breakpoint-based styling to adjust layouts responsively. GPUI supports Flexbox for flexible layout design, enabling you to create UIs that scale across different screen sizes and orientations.

What's the best way to organize reusable styles across GPUI components?

Build theme structures that centralize color definitions, spacing scales, and typography. Encapsulate styling logic in helper functions and component abstractions that reference shared theme values, ensuring consistency and reducing duplication across your UI.

Does GPUI support Flexbox for layout, and how do I use it?

GPUI includes Flexbox layout support for efficient, flexible component arrangement. Combine Flexbox with spacing and sizing utilities to create adaptive layouts. The styling API exposes Flexbox properties directly through chainable methods on container elements.

Why should I use a theme system instead of hardcoding colors in GPUI?

A theme system enables seamless light and dark mode switching, maintains visual consistency across your entire application, and simplifies global design updates. Centralizing colors and spacing makes maintenance faster and supports scalable, professional UI design patterns.