Skip to content
0:00 / 0:00

#clay#layoutengine#flexbox

How Clay's UI Layout Algorithm Works

Nic Barker

66K subscribers • 5 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

262K views1 year ago1 recommendation

Software designSystems programmingAlgorithmsDesign patterns

Nic Barker explains the inner workings of the flexbox-like layout algorithm used in the Clay C library.

Clay is a UI layout library written in C, and this video gives a high level explanation of how the flexbox-like layout algorithm in Clay works. The library can be found at github.com/nicbarker/clay If you're not familiar with Clay, a detailed introductory video can be found here: youtu.be/DYWTw19_8r4 If you would like to learn a bit more about how trees are implemented, see this video: youtu.be/KwBuV7YZido The paper on constraint solvers: arxiv.org/pdf/1401.1031 Facebook's "Yoga" layout library which was mentioned: github.com/facebook/yoga If you're interested, I also produce a paid programming fundamentals course at thesimplejoyofprogramming.com

Why it's here

1 person recommends this

What people say. Recommended for its clear explanation of how to design and implement a high-performance UI layout engine.

vfoleyon Lobsters • Recommends

How Clay's UI Layout Algorithm Works

u/WittyStickin r/C_Programming • Mentions

On “Immediate UI-mode in C”

Nuklear is a nice simple alternative for C. For UI layout also check out Clay - there's a great link to this video demonstrating how it works.

u/vmcrashin r/Zig • Mentions

On “GUI framework from scratch built with Vulkan, windowing from scratch too”

Inspired by Clay, yeah! For those who are interested: [video