Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bezhansalleh/filament-addons
A set of filament components with extra functionality & fresh look
https://github.com/bezhansalleh/filament-addons
filament-forms filamentadmin filamentphp laravel livewire
Last synced: about 1 month ago
JSON representation
A set of filament components with extra functionality & fresh look
- Host: GitHub
- URL: https://github.com/bezhansalleh/filament-addons
- Owner: bezhanSalleh
- License: mit
- Created: 2022-07-10T05:00:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T11:37:18.000Z (over 1 year ago)
- Last Synced: 2024-12-17T07:28:42.774Z (about 1 month ago)
- Topics: filament-forms, filamentadmin, filamentphp, laravel, livewire
- Language: Blade
- Homepage:
- Size: 297 KB
- Stars: 54
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Filament Addons
A set of filament components with extra functionality & fresh look
1. Pills (Tab Pills)
2. Chip Column
3. Coming Soon ...## Installation
You can install the package via composer:
```bash
composer require bezhansalleh/filament-addons
```
### Admin Panel & Forms#### Pills (Tab Pills)
`Pills` basically behaves like the already existing `Tabs` form component but does more:- Can have icons 🥳
- Can have badges 💯
- has a **fresh** look 💅
- Can be marked as active ✅```php
use BezhanSalleh\FilamentAddons\Forms\Components;Components\Pills::make('Heading')
->activePill(2) // pill two will be the default active one
->pills([
Components\Pills\Pill::make('Shield')
->icon('heroicon-o-shield-check')
->badge('7.2K')
->schema([
Forms\Components\View::make('static-hello')
]),
Components\Pills\Pill::make('Google Analytics')
->schema([
Forms\Components\View::make('static-why')
->fieldWrapperView(fn() => view('welcome')),
])->columns(1),
Components\Pills\Pill::make('Translations Manager')
->icon('heroicon-o-sparkles')
->schema([
Forms\Components\View::make('static-view'),
...
]),
]),
```
> **Note**
> The above snippet inside a resource form or page form will render as follow:https://user-images.githubusercontent.com/10007504/178133544-3621418b-8cc2-41c8-bfc0-c12d263dd0d4.mov
### Admin Panel & Tables
#### ChipColumn
`ChipColumn` basically behaves like the already existing `Badge` Column but changes the appearance and icon desing:
```php
use BezhanSalleh\FilamentAddons\Tables\Columns\ChipColumn;ChipColumn::make('role')
->label('Role(Chip)')
->colors([
'primary',
'success' => fn ($state): bool => $state === 'admin',
'warning' => fn ($state): bool => $state === 'manager',
'danger' => fn ($state): bool => $state === 'editor',
])
->icons([
'heroicon-o-x',
'heroicon-s-shield-check' => fn ($state): bool => $state === 'admin',
'heroicon-o-user' => fn ($state): bool => $state === 'manager',
'heroicon-o-sparkles' => fn ($state): bool => $state === 'editor'
])
->iconPosition('before')
```* Use `invert()` to make it pop
Optionally, you can publish the views using
```bash
php artisan vendor:publish --tag="filament-addons-views"
```
## Testing```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
If you want to contribute to this packages, you may want to test it in a real Filament project:
- Fork this repository to your GitHub account.
- Create a Filament app locally.
- Clone your fork in your Filament app's root directory.
- In the `/filament-addons` directory, create a branch for your fix, e.g. `fix/error-message`.Install the packages in your app's `composer.json`:
```json
"require": {
"bezhansalleh/filament-addons": "dev-fix/error-message as main-dev",
},
"repositories": [
{
"type": "path",
"url": "filament-addons"
}
]
```Now, run `composer update`.
Please see [CONTRIBUTING](https://github.com/bezhanSalleh/.github/blob/main/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Bezhan Salleh](https://github.com/bezhanSalleh)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.