Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 2.45 KB

index.md

File metadata and controls

47 lines (35 loc) · 2.45 KB
layout
home
<style> {% include assets/main.css %} </style>

rails.style is a curated resource hub for Rails developers. It currently focuses on UI related libraries, and will expand to cover other topics (background jobs, administration, mailers, newsletters, etc.) in the future.

Rendering Solutions

Early Rails applications use ERB (or others like Haml) partials and bloated helpers. Modern Rails projects often emphasizes encapsulation and component-based design. There's a few libraries to create reusable and testable UI components.

Encapsulation Templating Output Performance*
ERB Partial Bad Template HTML 3
ViewComponent Not Bad Ruby Class + Template HTML 6
Cells Not Bad Ruby Class + Template HTML 2
Hanami::View Not Bad Ruby Class + Template HTML, JSON, XML -
Phlex Not Bad Pure Ruby HTML (more planned) 8
Papercraft Not Bad Pure Ruby HTML, JSON, XML 9

* performance data source: view-layer-benchmarks

Rails-specific Design Systems & UI Libraries

{% include rails_ui.html %}

Posts and Discussions

<script defer src="/assets/main.js"></script> <script defer src="https://unpkg.com/alpinejs-component@latest/dist/component.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>