Originally posted by **savosik** August 29, 2024
It would be useful to have the ability to add an icon before the title text in Collapse fields. This would enhance the visual hierarchy and provide better context for collapsed sections.
Proposed functionality:
- Add a new method `icon()` to the Collapse class
- Allow passing an icon name or HTML string
- Render the icon before the title text
Example usage:
```php
Collapse::make('Information', [ ] )
->icon('heroicons.information-circle')
```
![proposal-collapse](https://github.com/user-attachments/assets/09fb6a1c-10b6-458d-965b-3a554704a9bc)
Discussed in https://github.com/orgs/moonshine-software/discussions/1214