Product Decisions This Supports
- Hierarchical Data Management: Enables intuitive selection of nested categories, tags, or organizational structures (e.g., product categories, department hierarchies, or content taxonomies) in Filament admin panels.
- User Experience (UX) Enhancement: Replaces clunky multi-step dropdowns or flat selects with a visually intuitive tree structure, reducing cognitive load for users managing complex relationships.
- Build vs. Buy: Avoids reinventing hierarchical UI components from scratch, leveraging a battle-tested, community-supported package with Filament 3/4 compatibility.
- Roadmap Priorities:
- Admin Panel Overhauls: Critical for projects migrating to Filament or upgrading existing admin interfaces.
- Content Management Systems (CMS): Simplifies taxonomy management for editorial teams (e.g., WordPress-like category hierarchies).
- E-commerce Platforms: Streamlines product categorization and attribute selection.
- Data Filtering: Enhances table filters for hierarchical data (e.g., "Show all posts under 'Technology > AI'").
- Use Cases:
- Single/Multi-Select Hierarchies: Replace
BelongsTo/BelongsToMany relationships with interactive trees.
- Dynamic Filters: Build filters for tables where relationships span multiple levels (e.g., "Select a region and its sub-regions").
- Custom Tree Structures: Override default queries with static or dynamic arrays (e.g., org charts, custom workflows).
- Access Control: Restrict visibility of nodes (e.g., hide soft-deleted items or disabled options).
When to Consider This Package
-
Adopt When:
- Your Laravel/Filament app requires multi-level hierarchical selections (e.g., categories, departments, or nested tags).
- You need better UX than flat selects or manual tree-building (e.g., for admin panels, CMS backends, or e-commerce).
- Your team lacks frontend expertise to build a custom tree component but needs Filament-native integration.
- You’re using Filament 3.x or 4.x and want a maintained, well-documented solution.
- You need dynamic filtering for hierarchical data in tables (e.g., "Filter posts by category path").
-
Look Elsewhere If:
- You’re not using Filament: This package is tightly coupled to Filament’s ecosystem.
- You need extremely custom UI/UX: The package provides flexibility but may not match bespoke designs.
- Your hierarchy is static and shallow (e.g., 2–3 levels deep), making a simple nested select sufficient.
- You require real-time collaboration (e.g., shared editing of the tree structure), as this is a single-user component.
- Your data model uses non-standard parent-child relationships (e.g., polymorphic or multi-parent hierarchies), which may need custom workarounds.
How to Pitch It (Stakeholders)
For Executives/Stakeholders:
"This package lets us replace clunky dropdowns with interactive, tree-based selectors in our Filament admin panels—saving developers time and improving how teams manage hierarchical data (like product categories or org structures). For example, instead of forcing users to manually select a category and its subcategories in separate steps, they’ll see a collapsible tree. This reduces errors, speeds up workflows, and aligns with modern UX standards—all without custom frontend work. It’s a low-risk, high-reward upgrade for projects using Filament, with minimal maintenance overhead."
For Engineers/Developers:
*"Problem: Managing hierarchical data in Filament (e.g., categories, departments) often requires either:
- Multiple flat selects (poor UX),
- Custom Vue/React components (high dev effort), or
- Manual SQL queries (fragile).
Solution: This package adds a Filament-native tree select that:
- Works out-of-the-box with Eloquent relationships (
BelongsTo, BelongsToMany).
- Supports dynamic filtering (e.g., table filters for nested data).
- Customizable (search, disabled/hidden nodes, static trees, etc.).
- Lightweight: MIT-licensed, actively maintained, and Filament-compatible.
Use Cases:
- Replace
BelongsToMany category selects with a collapsible tree.
- Build filters for tables with multi-level relationships (e.g., ‘Region > Sub-region’).
- Add custom hierarchies (e.g., org charts, workflow steps) without frontend work.
Why Not Build It?
- Time: ~1–2 days to implement vs. weeks for a custom component.
- Risk: Tested by 330+ stars; handles edge cases (e.g., orphaned nodes, soft deletes).
- Maintenance: Updates align with Filament’s roadmap (supports Laravel 10/11).
Example:
// Replace this:
Select::make('category_id')->relationship('category', 'name'),
// With this:
SelectTree::make('categories')
->relationship('categories', 'name', 'parent_id')
->enableBranchNode() // Allow selecting parent groups
->searchable();
Impact: Faster onboarding for non-technical users, fewer support tickets for ‘broken category selects.’"*