Manifesto

The philosophy and design decisions behind RapidRails UI.

Rails-First Citizen

RapidRails UI is designed specifically for Rails, not adapted from React or Vue libraries. This means deep integration with Rails conventions:

  • FormBuilder integration that understands your models
  • Auto-labeled buttons based on model state (new vs persisted)
  • Helper methods that feel like Rails (not foreign APIs)
  • Works seamlessly with Turbo and Stimulus

Why this matters: You don't need to learn new paradigms. If you know Rails, you know RapidRails UI.

ViewComponent Architecture

We chose ViewComponent (used by GitHub) because it provides:

  • Server-rendered components - Faster than client-side rendering
  • Built-in caching - Better performance out of the box
  • Object-oriented - Testable, maintainable components
  • Rails-native - No build tools, no JavaScript compilation

Zero External JavaScript Dependencies

RapidRails UI components have zero external JavaScript library dependencies. They're pure server-rendered HTML with Tailwind CSS styling. No jQuery, no Alpine.js, no hidden libraries.

When you need interactivity: We build JavaScript in-house using Stimulus and Hotwire. These are Rails-native tools that integrate seamlessly with your application. Interactive components are progressively enhanced—they work great without JavaScript and become even better with it.

  • Components are interactive-ready but not JavaScript-dependent
  • Built-in Stimulus controllers for components that need them
  • Turbo integration for fast, seamless navigation
  • Extend components with your own Stimulus controllers when needed

Composition Over Configuration

Components are flexible building blocks, not rigid templates:

  • Start simple, compose complex layouts
  • Block content support for custom structures
  • Icon slots for easy enhancement

Simplicity & Clarity

We favor:

  • Intuitive method names (rui_button, not rapid_rails_ui_button_component)
  • Sensible defaults (just rui_button works!)
  • Clear, readable APIs

We Style, You Space

RapidRails UI handles component styling (colors, variants, states). You control layout and spacing in your views.

Why? Every app has different layout needs. We provide beautiful components; you arrange them how you want.