Weave Code
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

Filament Cards Laravel Package

harvirsidhu/filament-cards

Turn any Filament page into a card-based navigation hub. Auto-discovers Cluster/Resource pages, respects navigation config, checks authorization, and supports grouping, columns/spans, visibility rules, manual links, and optional search—ideal for settings hubs and dashboards.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament-Native Design: The package leverages Filament’s existing patterns (label, schema, visible, hidden, columnSpan), ensuring seamless integration with Filament v4/v5 clusters, resources, and pages. This reduces cognitive load for developers already familiar with Filament’s ecosystem.
  • Auto-Discovery: The ability to auto-discover pages/resources within a cluster or resource (via discoverClusterCards()/discoverResourceCards()) aligns well with modular, component-driven architectures. This reduces boilerplate and manual maintenance.
  • Authorization-Aware: Respects Filament’s canAccess() checks, ensuring cards are dynamically hidden based on user permissions. This is critical for multi-tenant SaaS applications.
  • Hybrid Approach: Supports mixing auto-discovered cards with manually crafted ones (e.g., external links or custom UI elements), offering flexibility for edge cases.

Integration Feasibility

  • Low Friction: Installation requires only Composer and Tailwind theme updates, with minimal PHP version constraints (8.2+). The 60-second quickstart demonstrates simplicity.
  • Cluster/Resource Agnostic: Works with Filament’s existing navigation hierarchy, requiring no refactoring of existing pages/resources. Hooks like showInFilamentCards() allow granular control over visibility.
  • Dynamic Registration: Enables modular design by allowing cards to be registered from service providers, useful for plugin-based architectures or third-party packages.
  • Tailwind-Centric: Relies on Tailwind for styling, which is already a standard in Filament projects. No additional CSS frameworks are required.

Technical Risk

  • Filament Version Lock: Tied to Filament v4/v5. Migration risks may arise if upgrading Filament in the future, though the package’s active development (last release: 2026-05-04) suggests stability.
  • Auto-Discovery Complexity: While powerful, auto-discovery may introduce unintended side effects if not configured carefully (e.g., hidden pages accidentally appearing in cards). Mitigated by explicit exclusion lists ($excludedClusterComponents).
  • Tailwind Dependency: Requires proper Tailwind setup (theme.css source inclusion). Misconfiguration could lead to styling issues, but this is a one-time setup.
  • Performance: Auto-discovery scans all cluster/resource components on page load. For large applications, this could impact initial load time. Testing with a high-volume cluster is recommended.
  • Search Functionality: Client-side search (optional) adds interactivity but requires JavaScript. Ensure Filament’s JS bundle is properly configured if enabling this feature.

Key Questions

  1. Use Case Alignment:
    • Is the primary goal to replace sidebar navigation (Cluster Front Page), or is this for a standalone dashboard (Use Case C)?
    • Are there multi-tenant requirements where card visibility must dynamically adjust per tenant?
  2. Auto-Discovery Scope:
    • How many pages/resources are in the target cluster/resource? Will auto-discovery scale without performance issues?
    • Are there pages/resources that should never appear in cards (e.g., admin-only tools)? If so, how will exclusions be managed?
  3. Customization Needs:
    • Will manual card overrides (e.g., external links, custom styling) be required, or is auto-discovery sufficient?
    • Are there specific design requirements (e.g., card colors, layouts) that deviate from Filament’s defaults?
  4. Authorization:
    • How granular are the permission checks? Will canAccess() suffice, or are custom visibility rules needed?
  5. Future-Proofing:
    • Is the team planning to upgrade Filament in the next 12–18 months? If so, test the package’s compatibility with the target Filament version.
    • Are there plans to add dynamic cards (e.g., based on user roles or data)? The package supports this via visible() closures or dynamic registration.

Integration Approach

Stack Fit

  • Filament v4/v5: Native support ensures compatibility with Filament’s core features (clusters, resources, pages, navigation). No middleware or deep hooks are required.
  • Laravel 11+: Leverages Laravel’s service container and dependency injection for dynamic registration and auto-discovery.
  • Tailwind CSS: Aligns with Filament’s styling approach. No additional dependencies or conflicts expected.
  • PHP 8.2+: Modern syntax (e.g., named arguments, enums) ensures clean integration with contemporary Laravel/Filament codebases.

Migration Path

  1. Assessment Phase:
    • Audit existing Filament clusters/resources to identify candidates for card-based navigation.
    • Document pages/resources that should be excluded from auto-discovery (e.g., admin-only tools).
  2. Pilot Implementation:
    • Start with a non-critical cluster (e.g., a settings hub) to test auto-discovery and manual overrides.
    • Verify auto-discovery behavior with discoverClusterCards() and adjust exclusion lists as needed.
  3. Incremental Rollout:
    • Replace sidebar-heavy clusters with CardsPage one at a time.
    • Gradually introduce manual card overrides for edge cases (e.g., external links, custom UI).
  4. Optimization:
    • Profile performance for large clusters (e.g., >50 pages). Consider lazy-loading or pagination if needed.
    • Fine-tune search keywords (searchKeywords()) for usability.

Compatibility

  • Filament Plugins: The package supports dynamic registration via service providers, enabling seamless integration with third-party Filament plugins.
  • Custom Pages/Resources: Existing Filament pages/resources require zero changes to work with auto-discovery. Only opt-in via showInFilamentCards() or getFilamentCardsGroup().
  • Authorization Systems: Works with Filament’s built-in canAccess() and Laravel’s gate/policy system. No custom middleware is required.
  • Theming: Tailwind classes are namespaced and documented, allowing easy customization without breaking updates.

Sequencing

  1. Prerequisites:
    • Ensure the project meets requirements (PHP 8.2+, Laravel 11+, Filament v4/v5).
    • Update theme.css to include the package’s views (one-time setup).
    • Rebuild assets (npm run build).
  2. Core Integration:
    • Create a CardsPage for the target cluster/resource.
    • Implement getCards() with auto-discovery (discoverClusterCards() or discoverResourceCards()).
  3. Customization:
    • Add manual cards for non-Filament links or custom UI.
    • Configure grouping (CardGroup), sorting, and visibility rules.
  4. Testing:
    • Verify auto-discovery excludes the correct pages/resources.
    • Test authorization (e.g., hidden cards for unauthorized users).
    • Validate styling and responsiveness.
  5. Deployment:
    • Roll out to a staging environment for user testing.
    • Monitor performance and adjust exclusion lists or discovery filters as needed.

Operational Impact

Maintenance

  • Low Ongoing Effort: Auto-discovery reduces maintenance for large clusters/resources. Changes to page/resource navigation properties (e.g., $navigationLabel) are automatically reflected in cards.
  • Exclusion Management: Centralized exclusion lists ($excludedClusterComponents) simplify maintenance for hidden pages.
  • Dynamic Updates: Cards can be updated via service providers or closures, enabling runtime adjustments (e.g., role-based visibility).
  • Documentation: The package includes a comprehensive README, changelog, and API reference, reducing onboarding time for new developers.

Support

  • Troubleshooting:
    • Common issues (e.g., missing cards, styling problems) are likely due to:
      • Incorrect Tailwind setup (verify theme.css includes the package’s views).
      • Auto-discovery filtering (check showInFilamentCards() or exclusion lists).
      • Authorization conflicts (debug canAccess() calls).
    • The package’s Filament-native API means support aligns with existing Filament troubleshooting workflows.
  • Community: Low star count (11) suggests limited community support. However, the MIT license and active development (2026 releases) indicate responsiveness from the maintainer.
  • Fallbacks: Manual card definitions provide a safety net if auto-discovery fails or behaves unexpectedly.

Scaling

  • Performance:
    • Auto-discovery scans all cluster/resource components on page load. For clusters with >100 pages, consider:
      • Lazy-loading cards (e.g., infinite scroll or pagination).
      • Caching discovery results (e.g., via Laravel’s cache or Filament’s cache() method).
    • Search functionality (client-side) may require optimization for large card sets (e.g., debouncing, server-side filtering).
  • Team Adoption:
    • Developers familiar with Filament will adopt quickly due to API parity.
    • Designers can customize cards using Tailwind classes without deep PHP knowledge.
  • Multi-Tenancy:
    • Supports tenant-specific card visibility via visible() closures or dynamic registration.
    • Auto-discovery respects Filament’s tenant-aware canAccess() checks.

Failure Modes

Failure Scenario Impact Mitigation
Tailwind setup failure Broken styling Verify theme.css includes @source for the package’s views.
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata