monkeype/filament-whatsapp-widget
Composer 安装命令:
composer require monkeype/filament-whatsapp-widget
包简介
Filament Whatsapp Widget
README 文档
README
A beautiful, customizable WhatsApp floating button widget for Filament Admin Panel v3.
Features
- 🎨 Modern, animated floating button with WhatsApp branding
- ⚙️ Fully configurable through Filament Resource
- 📱 Responsive design (mobile-friendly)
- 🎯 Customizable button position (bottom-right or bottom-left)
- 💬 Pre-filled message support
- 🌓 Dark mode support
- ✨ Smooth animations and hover effects
- 🚀 Optimized with external minified CSS for better performance
Installation
- Install the package via composer (if published):
composer require monkeype/filament-whatsapp-widget
Or add it to your composer.json if it's a local package:
{
"repositories": [
{
"type": "path",
"url": "./packages/filament-whatsapp-widget"
}
]
}
- Run migrations and publish assets:
php artisan vendor:publish --tag=filament-whatsapp-widget-migrations
php artisan migrate
php artisan vendor:publish --tag=filament-whatsapp-widget-assets
// Optional: Publish and customize the configuration file:
php artisan vendor:publish --tag=filament-whatsapp-widget-config
- Register the plugin in your Filament Panel Provider:
use Monkeype\Filament\WhatsappWidget\WhatsappWidgetPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugins([
WhatsappWidgetPlugin::make(),
]);
}
Usage
Configure WhatsApp Settings
- Navigate to your Filament admin panel
- Go to "Settings" → "WhatsApp Settings"
- Click "Create" to add a new configuration
Required Settings
- Phone Number: Enter the WhatsApp number with country code (e.g., +1234567890)
- Button Text: Text to display on the button (default: "Chat with us")
- Button Position: Choose between "Bottom Right" or "Bottom Left"
- Active: Toggle to show/hide the widget
Optional Settings
- Default Message: Pre-filled message when the chat opens
Configuration Options
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| Phone Number | String | Yes | - | WhatsApp number with country code |
| Default Message | Text | No | - | Pre-filled message for the chat |
| Button Text | String | Yes | "Chat with us" | Text displayed on the button |
| Button Position | Select | Yes | "bottom-right" | Position of the floating button |
| Active | Boolean | Yes | true | Show/hide the widget |
How It Works
The widget automatically:
- Displays a floating button on all Filament admin pages
- Generates the correct WhatsApp URL with phone number and optional message
- Adapts to mobile screens (shows only icon on small devices)
- Applies smooth animations and hover effects
Customization
Styling
The widget loads its styles from an external minified CSS file for optimal performance and maintainability.
Publishing Assets
To customize the widget's appearance, first publish the package assets:
php artisan vendor:publish --tag=filament-whatsapp-widget-assets
This will copy the CSS file to:
public/vendor/filament-whatsapp-widget/dist/css/whatsapp-widget.min.css
Customizing Styles
You have two options to customize the styles:
Direct Modification (Quick but not recommended for production):
- Edit the published file directly in
public/vendor/filament-whatsapp-widget/dist/css/whatsapp-widget.min.css - Note: Changes will be overwritten if you republish assets
- Edit the published file directly in
Source Modification (Recommended):
- Edit the source CSS file in the package:
packages/filament-whatsapp-widget/resources/css/whatsapp-widget.css - Minify the CSS and update
resources/dist/css/whatsapp-widget.min.css - Republish the assets
- Edit the source CSS file in the package:
Available CSS Classes
.whatsapp-float-button- Main container.whatsapp-button- Button element.whatsapp-icon- WhatsApp icon.whatsapp-text- Button text.whatsapp-bottom-right- Right position modifier.whatsapp-bottom-left- Left position modifier
Example
After configuration, users will see a beautiful green WhatsApp button floating on the screen. When clicked, it opens WhatsApp with your configured phone number and optional pre-filled message.
Requirements
- PHP 8.1 or higher
- Laravel 10.x or higher
- Filament 3.x
License
MIT License
Author
Alex Quevedo - alex@monkey.pe
monkeype/filament-whatsapp-widget 适用场景与选型建议
monkeype/filament-whatsapp-widget 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 monkeype/filament-whatsapp-widget 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 monkeype/filament-whatsapp-widget 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-24