components

Laravel Blade components for reusable UI

Blade components create reusable, self-contained UI elements with their own logic and styling. Anonymous components are simple Blade files, while class-based components have PHP backing classes. I pass data via attributes—<x-alert type='success' /&

Laravel Livewire for reactive components

Livewire enables reactive, dynamic interfaces without writing JavaScript—components re-render automatically when properties change. I create Livewire components as PHP classes with public properties and methods. Properties bind to Blade views with wir

Compound components pattern for flexible APIs

Compound components create flexible, composable APIs by sharing state between parent and child components via context. Instead of passing dozens of props, child components access shared state through context. A Select component might have Select.Trigg

ViewComponent for reusable UI components

ViewComponents bring object-oriented design to Rails views, making complex UI elements testable and reusable. Each component is a Ruby class paired with a template, encapsulating both logic and presentation. I use components for buttons, cards, modals

ViewComponent for reusable, testable view components

ViewComponent brings component architecture to Rails views. Components encapsulate markup, logic, and tests in Ruby classes. I use ViewComponents for reusable UI elements—buttons, cards, modals, alerts. Components accept parameters via initializer, ke