Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.44 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.44 KB

Rails Design System

A Rails project with ViewComponents to build modular and maintainable user interfaces. This repository provides a foundation for creating web applications with reusable design patterns.

✨ Features

  • ViewComponents: Build reusable UI components with encapsulated logic and templates.
  • Modular System: Add and customize components easily to suit your application's needs.

🚀 Getting Started

Installation Steps

  1. Clone this repository:

    git clone https://github.com/pierre-jezegou/rails-design-system.git
    cd rails-design-system
  2. Install Ruby dependencies:

    bundle install
  3. Start the development server:

    bin/rails server

Visit your application at http://localhost:3000. The Lookbook web interface is at http://localhost:3000/lookbook

🛠 Using ViewComponents

Add new components in the app/components directory. Example:

  1. Generate a component:

    bin/rails generate component Navigation
  2. Define the component's behavior in app/components/navigation_component.rb and its template in app/components/navigation_component.html.erb or directly in component definition with erb_template

  3. Use the component in views:

    <%= render(NavigationComponent.new(title: "My Navigation")) %>

🛡 License

This project is licensed under the ???.