Microsecond layout performance — Layouts complete in microseconds with zero dependencies and no standard library linking.
Flexbox-like layout model — Supports responsive layouts with text wrapping, scrolling containers, and aspect ratio scaling.
Declarative syntax — React-like nested API with reusable component functions in standard C code.
WebAssembly support — Compiles to 15kb uncompressed WASM for browser-based UIs.
Renderer agnostic — Outputs sorted rendering primitives compatible with any 3D engine or HTML.
Clay is a single 4.8k LOC header file that delivers microsecond layout performance with zero dependencies. It uses static arena-based memory allocation with no malloc/free, making it ideal for performance-critical applications. Supports both native and WebAssembly compilation with a React-like declarative syntax.
C99 compiler; optional: clang for WebAssembly compilation