gpui-element

Installation
SKILL.md

When to Use

Use the low-level Element trait when:

  • Need fine-grained control over layout calculation
  • Building complex, performance-critical components
  • Implementing custom layout algorithms (masonry, circular, etc.)
  • High-level Render/RenderOnce APIs are insufficient

Prefer Render/RenderOnce for: Simple components, standard layouts, declarative UI

Quick Start

The Element trait provides direct control over three rendering phases:

impl Element for MyElement {
    type RequestLayoutState = MyLayoutState;  // Data passed to later phases
    type PrepaintState = MyPaintState;        // Data for painting
Related skills
Installs
218
GitHub Stars
11.4K
First Seen
Jan 21, 2026