Download the PHP package tempi-marathon/filament-local-avatars without Composer
On this page you can find all versions of the php package tempi-marathon/filament-local-avatars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tempi-marathon/filament-local-avatars
More information about tempi-marathon/filament-local-avatars
Files in tempi-marathon/filament-local-avatars
Package filament-local-avatars
Short Description Local initials avatars via data-URI SVG
License MIT
Homepage https://github.com/tempi-marathon/filament-local-avatars
Informations about the package filament-local-avatars
Filament Local Avatars
Local initials avatars for Filament panels, generated as inline SVG data URIs. No third-party services, no HTTP routes, GDPR-friendly.
Requirements
- PHP 8.3+
- Filament 4.x or 5.x
Installation
Register the plugin on your panel:
The plugin sets the panel's default avatar provider automatically.
Configuration
Publish the config file (optional):
Available options in config/filament-local-avatars.php:
| Key | Default | Description |
|---|---|---|
size |
120 |
SVG width and height in pixels |
font_size |
48 |
Initials font size |
text_color |
#FFFFFF |
Initials color |
background_color |
null |
Default background color when a record has no per-record color; null uses the panel primary color |
Per-record background colors
Implement HasAvatarBackgroundColor on any model that should have its own avatar background color. Add a column (for example avatar_color) in your app and return it from the interface method:
Background color resolution order:
- Record color from
getAvatarBackgroundColor()when non-empty background_colorconfig value when set- Panel primary color
Text color remains global via the text_color config option.
Local development
When developing the package alongside a consumer app, add a Composer path repository:
Testing
Runs Pint, PHPStan (max level), and Pest with a minimum 90% code coverage requirement.
License
MIT. See LICENSE.
All versions of filament-local-avatars with dependencies
filament/filament Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.93