alec-c4

A shadcn/ui-inspired component library for Rails built on ViewComponent.

13
1
100% credibility
Found Jun 01, 2026 at 13 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Ruby
AI Summary

ViewPrimitives is a Ruby gem for Rails web applications that provides over 90 pre-built interface components like buttons, dialogs, calendars, carousels, and data tables. Instead of installing a package, developers choose which components they want and the library copies them directly into their project as files they fully own and can customize. The components come with styling built using Tailwind CSS, and the whole library is inspired by the popular shadcn/ui design system. A simple helper method lets developers render any component with just one line of code in their views.

How It Works

1
💡 You need beautiful buttons and menus

You're building a web app and want polished interface elements without designing them from scratch.

2
📦 You add the component library to your project

With one line of code, you bring in a collection of 90+ ready-to-use interface pieces.

3
You run the setup and everything configures itself

The library automatically sets up the styling and finds where your styles belong.

4
🎨 You pick what you need from the menu

A simple command lets you browse all available pieces and add exactly what you want to your app.

5
🔧 The pieces are yours to keep and modify

Each component copies into your project as regular files you can change however you like.

6
You start building your interface
📝
Simple pieces like buttons and badges

Drop in a styled button with just one line of code

🗓️
Interactive pieces like date pickers and dialogs

Add complex widgets that handle user input automatically

📊
Data displays like tables and charts

Show information with sortable, filterable tables and visualizations

🚀 Your app looks professional and polished

Every button, menu, and widget follows the same beautiful design system, making your whole app feel cohesive.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 13 to 13 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is view_primitives?

This is a Ruby gem that ports the shadcn/ui philosophy to Rails. Instead of installing a package and importing components, you run generators that copy component files directly into your project. You get buttons, dialogs, data tables, calendars, carousels, and 70+ other components as plain Ruby and ERB files you own and can modify. Each component ships with Tailwind styling and Stimulus controllers where needed. The `ui` helper lets you render components with a simple `ui :button, variant: :outline` call in your views.

Why is it gaining traction?

The shadcn/ui pattern is popular because you own the code. Unlike gem-based component libraries that lock you into their API, this copies everything into your project so you can modify it freely. The install generator auto-detects your Tailwind setup (tailwindcss-rails, cssbundling, Vite, esbuild) and handles CSS imports automatically. You get design tokens with OKLCH colors for light/dark themes without touching your tailwind.config.js. The generator approach means zero runtime dependencies and straightforward upgrades.

Who should use this?

Rails developers who want polished, accessible UI components without abandoning Tailwind or fighting gem APIs. Frontend teams migrating from React or wanting consistency across a Rails app will find familiar patterns. If you're already using ViewComponent, this slots in naturally. Early adopters comfortable with pre-1.0 software will get the most value.

Verdict

The shadcn/ui-inspired approach is genuinely compelling, and the copy-into-your-app model solves real pain points. However, 13 stars and version 0.1.1 mean this is early-stage software with a 1.0% credibility score. Test coverage and documentation exist but are minimal. Worth exploring in a side project or non-critical feature, but production use in a large app warrants caution until the project matures.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.