Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
design-blade-component
design-blade-component
alizharb/agent-skills
claude-code
blade-components
partials
component-design
slots
localization
accessibility
testing

Use when creating or refactoring Blade components, partials, and reusable view pieces.

Install
php artisan boost:add-skill alizharb/agent-skills

Save this content to: .claude/skills/design-blade-component/SKILL.md

# Design Blade Component

## When To Use

Use this skill when a Blade view is getting repetitive, too large, or hard to reuse across the app.

## Inputs Needed

- UI purpose, repeated markup, slots, props, localization needs, accessibility concerns, and tests.

## Workflow

1. Inspect existing Blade components and partials.
2. Decide whether the UI belongs in a class-based component, anonymous component, or partial.
3. Prefer the smallest reusable unit that removes duplication.
4. Keep component APIs small and obvious.
5. Localize labels and messages.
6. Keep presentation logic out of the template whenever possible.
7. Add tests when the component drives behavior or important UI states.

## Files That May Be Created

- Blade component classes, component views, partials, and tests.

## Files That May Be Modified

- Existing views, translation files, and tests.

## Architecture Rules

- Blade should render presentation only.
- Shared markup belongs in shared components instead of repeated snippets.
- Keep templates small enough that they remain easy to scan.

## Testing Requirements

- Test rendering, visible states, localization, and accessibility-sensitive behavior when relevant.

## Review Checklist

- Is the component reusable?
- Is the public API small?
- Would a partial or slot make the code cleaner?

## Common Mistakes to Avoid

- Duplicating the same markup across many views.
- Putting business logic in the template.
- Creating a component when a simple partial would be clearer.

Design Blade Component

When To Use

Use this skill when a Blade view is getting repetitive, too large, or hard to reuse across the app.

Inputs Needed

  • UI purpose, repeated markup, slots, props, localization needs, accessibility concerns, and tests.

Workflow

  1. Inspect existing Blade components and partials.
  2. Decide whether the UI belongs in a class-based component, anonymous component, or partial.
  3. Prefer the smallest reusable unit that removes duplication.
  4. Keep component APIs small and obvious.
  5. Localize labels and messages.
  6. Keep presentation logic out of the template whenever possible.
  7. Add tests when the component drives behavior or important UI states.

Files That May Be Created

  • Blade component classes, component views, partials, and tests.

Files That May Be Modified

  • Existing views, translation files, and tests.

Architecture Rules

  • Blade should render presentation only.
  • Shared markup belongs in shared components instead of repeated snippets.
  • Keep templates small enough that they remain easy to scan.

Testing Requirements

  • Test rendering, visible states, localization, and accessibility-sensitive behavior when relevant.

Review Checklist

  • Is the component reusable?
  • Is the public API small?
  • Would a partial or slot make the code cleaner?

Common Mistakes to Avoid

  • Duplicating the same markup across many views.
  • Putting business logic in the template.
  • Creating a component when a simple partial would be clearer.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console