Skip to content

Latest commit

ย 

History

History
45 lines (43 loc) ยท 2.04 KB

File metadata and controls

45 lines (43 loc) ยท 2.04 KB
layout hero features
home
name text tagline actions
Phlex <span style='font-size: 0.5em'>(pre release)</span>
Stunning server-side rendered views in Ruby
A little string concatenation library.
theme text link
brand
Handbook
/handbook/
theme text link
alt
Reference
/reference/
title icon details
Pure, beautiful Ruby
๐Ÿง‘โ€๐Ÿณ
Phlex gives you HTML semantics in Ruby so you can use your existing skills designing object-oriented views. Plus, you get to use tools like RubyLSP, Rubocop and Simplecov.
title icon details
Fast enough
๐Ÿš€
Phlex renders HTML at ~1gbps per core on a MacBook Pro (M3 Max) and it doesnโ€™t slow down the more components you extract.
title icon details
Rails integration
๐Ÿš‚
Phlex works great with Rails. It supports all Rails helpers and plays nicely with ViewComponent, ActionView, Stimulus, Turbo and Tailwind.
title icon details
Structural safety
๐Ÿ›ก๏ธ
Phlex is designed to structurally prevent cross-site-scripting (XSS) attacks by default.
title icon details
Sensible isolation
๐Ÿงช
Phlex components only depend on the data you pass in, making them easier to test and reuse.
title icon details
Zero dependencies
๐Ÿ“ฆ
Phlex has no dependencies and the Rails extension only depends on Rails itself.
title icon details
Kits
๐ŸŽ’
You can package up components into โ€œkitsโ€ for easy reuse across projects. Kits can be shared with the community as Ruby gems or kept for internal use.
title icon details
Selective rendering
๐Ÿ”Ž
You can render a view targeting a specific DOM ID. Phlex only does the work to render just the parts you want. This is great for partial Hotwire updates like Turbo Frames.
title icon details
Streaming
๐ŸŒŠ
Phlex can stream responses to boost time to first byte (TTFB). In some cases users can see the first static content before the database has even responded.