Ruby gem for building HTML views as Ruby objects/methods instead of template files. Created by Joel Drapper. One file per component handles both view and logic; supports native Ruby syntax and can be made type-safe (components can extend Literal::Properties for typed props — e.g. Button with size small/medium/large and variant primary/secondary). Implements Rails' 'renderable' interface (the abstraction pioneered by the ViewComponent team) so every Turbo helper works out of the box; also has an early/experimental selective-rendering feature that can render only the requested Turbo Frame. Benchmarks: not a blanket '12× faster than ERB' — Phlex actually does more work than ERB when rendering a single tag, but scales far better when a page contains thousands of small components/partials, where ActionView's partial-lookup overhead dominates. In real-world rendering Phlex typically saturates the network before the CPU. Upcoming work includes a validator that writes literal schemas for HTML attributes and reports helpful errors (wrong boolean values, malformed dates in time elements, MDN documentation links). A test-environment mode that compiles to a queryable data structure (instead of HTML strings) is under discussion. Mentioned in Yaroslav Shmarov's wroclove.rb 2022 talk as a potential substitute for ViewComponent and adopted by Statesert/Ruby UI at wroclove.rb 2025.