---
title: "Discussion on \"Why Ruby on Rails Needs Components\" | Hashnode"
description: "Discussion on \"Why Ruby on Rails Needs Components\". Explore Rails Components for improved, aesthetic frontend in Ruby on Rails apps, offering shareable, encapsulated functionality like React Components"
url: "https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Ruby on Rails Needs Components](https://code.avi.nyc/why-ruby-on-rails-needs-components?utm_source=hashnode&utm_medium=feed)

Explore Rails Components for improved, aesthetic frontend in Ruby on Rails apps, offering shareable, encapsulated functionality like React Components

Aug 1, 2023 · 7 min read · code.avi.nyc  
Updated Aug 7, 2023  
Read the article

-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#components](https://hashnode.com/tag/components)
-   [#shadcn](https://hashnode.com/tag/shadcn)

## Written by

[Avi Flombaum](https://hashnode.com/@avinyc)

@avinyc · New York, NY

  
[View profile](https://hashnode.com/@avinyc)

Engineer, educator, and entrepreneur that loves building products.

I'm an engineer, educator, and entrepreneur that has been building digital products for over 20 years with experience in startups, education, technical training, and developer ecosystems. I founded Flatiron School in NYC where I taught thousands of people how to code. Previously, I was the founder of Designer Pages. Currently I'm the Chief Product Officer at Revature.

## Responses 3

Markdown supported · ⌘↵ to post

[Ahmed Nadar](https://hashnode.com/@ahmednadar)

[Feb 29, 2024](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/65e0b1d5e97b3abdb5b93690)

You are right Avi. Rails is missing this magic dust 🪄🎨 that empowers developers and add beauty to any Rails app. I've used yours and it is wonderful well written. As a developer with front-end and design experience, I started mine UI components to save myself time and work. And after a few weeks I launched Rapidrails UI as a product built on top on ViewComponent and TailwindCSS. While it is not an open source, I'm working on an free one, as a part of [Rails Rails agency](https://rapidrails.cc/) public kit.

I echo your voice, we need more Rails UI components.

[Neil Douglas](https://hashnode.com/@NeilDouglas)

[Aug 7, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64d0abd8fd5742f91b971967)

Have you seen a Phlex though?

[Avi Flombaum](https://hashnode.com/@avinyc)

[Aug 7, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64d0abd8fd5742f91b971967#reply-64d0d17c6644e2f8eb7f9526)

I totally have and love it. What this is about is a pattern for how we would share components, Phlex, ViewComponent, between applications and how we should create more component libraries that do that, regardless of the underlying implementation.

[Chris Wawer](https://hashnode.com/@wafcio)

[Aug 6, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64cfbdcd058075dab96ee0af)

In Rails, a few gems add component functionality (like mountain\_view). Unfortunately, the side effect of using components after some time is adding more specific logic in generic components.

[Andrew Havens](https://hashnode.com/@andrewhavens)

[Aug 3, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64cbf2ed168be6c0a17e6a4a)

I think you're right that it would be helpful to have a drop-in gem to provide some nice looking components. CSS frameworks like Bootstrap have helped with that in the past. I've been meaning to write a blog post about this, but the magic combination that has been working well for us has been Hotwire, Tailwind, and the ViewComponent gem. We've built our own components pretty easily and I'd recommend that stack for anyone who feels like components are lacking in Rails.

[Avi Flombaum](https://hashnode.com/@avinyc)

[Aug 3, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64cbf2ed168be6c0a17e6a4a#reply-64cc0273168be6c0a17e6bc6)

[Andrew Havens](https://hashnode.com/@andrewhavens) Here is how I'm suggesting sharing them [code.avi.nyc/rails-components-more-installer-over…](https://code.avi.nyc/rails-components-more-installer-over-library)

[Avi Flombaum](https://hashnode.com/@avinyc)

[Aug 3, 2023](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64cbf2ed168be6c0a17e6a4a#reply-64cc028d8c8620c686554180)

[Avi Flombaum](https://hashnode.com/@avinyc) The library is live at [shadcn.rails-components.com](https://shadcn.rails-components.com/) you can install the gem in an app and generate components into it.

[Ahmed Nadar](https://hashnode.com/@ahmednadar)

[Feb 29, 2024](https://hashnode.com/posts/why-ruby-on-rails-needs-components/64c8fc9dc2a93e868eaab545/comment/64cbf2ed168be6c0a17e6a4a#reply-65e0b416dea26f4e9bc6bb43)

[Andrew Havens](https://hashnode.com/@andrewhavens) When I started [RapidRails](https://rapidrails.cc/) library I had no plan to make is a gem, I want developers to copy and past files and folder. But, as the library grow and my goal is to make it unique I have several folders and files needs moving around. Maybe having a generator is an option. Still looking for a good solution.

For my custom clients work (deign to code) I create a few folders and developers copy/past, because it is unique for every project. How do you structure your library?
