0016-laravel-blade-component-patterns
CommunityBuild reusable, composable Blade UI components.
Software Engineering#laravel#slots#blade components#ui composition#attributes bag#htmx turbo#reusable forms
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves the problem of inconsistent, hard-to-maintain Blade view code by providing repeatable patterns for structuring Laravel Blade components and composing UI with slots, attributes, and layouts.
Core Features & Use Cases
- Class-based and anonymous components: Encapsulate UI behavior and rendering, using
php artisan make:componentfor class-based components and@propsfor anonymous components. - Slots and slot attributes: Create flexible component APIs for headers, footers, and scoped content using named slots (e.g.,
x-slot:footer) and$slot->withAttributes(...). - Powerful attribute bag usage ($attributes): Support consumer customization via
merge,class()manipulation, filtering (whereStartsWith,whereDoesntStartWith), and presence checks (has,get,only,except). - Reusable UI patterns for real apps: Standardize alerts, cards, form inputs/selects, dynamic component rendering (
x-dynamic-component), and layout approaches with@stack. - HTMX/Turbo-friendly partial rendering: Use
@fragmentto return only the needed DOM portion for fast updates.
Quick Start
Ask for a reusable component design for an alert and a form input, including how to merge attributes, support named slots, and render it inside a layout using stacks.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0016-laravel-blade-component-patterns Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0016-laravel-blade-component-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.