charlieetienne/filament-font-picker
Composer 安装命令:
composer require charlieetienne/filament-font-picker
包简介
A Filament form component for selecting Google Fonts with real-time previews, search functionality, and category filtering.
README 文档
README
A beautiful Google Fonts picker component for Filament forms with real-time font previews, search functionality, and category filtering.
Features
- 🔍 Search Google Fonts: Find fonts quickly with intelligent search
- 🏷️ Category Filtering: Filter by serif, sans-serif, monospace, display, and handwriting fonts
- 👀 Live Previews: See font previews as you browse
- ⚡ Performance Optimized: Fonts load only when needed with intersection observer
- 🌙 Dark Mode Support: Seamless integration with Filament's dark mode
- 📱 Mobile Friendly: Responsive design that works on all devices
- ♿ Accessibility First: Full keyboard navigation and screen reader support
Installation
You can install the package via composer:
composer require charlieetienne/filament-font-picker
Important
If you have not set up a custom theme and are using Filament Panels follow the instructions in the Filament Docs first.
After setting up a custom theme add the plugin's views to your theme css file or your app's css file if using the standalone packages.
@source '../../../../vendor/charlieetienne/filament-font-picker/resources/**/*.blade.php';
Usage
Use the FontPicker component in your Filament forms:
use CharlieEtienne\FilamentFontPicker\FontPicker; FontPicker::make('font') ->label('Choose Font')
Options
You can control which font categories are available and which are preselected:
Available Categories
Limit which categories are shown (restricts the available options):
FontPicker::make('font') ->availableCategories([ 'serif', 'sans-serif', 'monospace', 'display', 'handwriting', ])
Selected Categories
Preselect certain categories when the component loads (users can still change them):
FontPicker::make('font') ->selectedCategories([ 'monospace', 'handwriting', ])
Other options
You can customize all these options:
FontPicker::make('font') ->placeholder('Select a font') ->searchPrompt('Search fonts') ->previewText('The quick brown fox jumps over the lazy dog') ->noResultsTitle('No fonts found matching') ->noResultsSubtitle('Try searching for serif, sans-serif, monospace, or display fonts') ->loadingMessage('Loading Google Fonts...') ->loadingPreviewMessage('Loading preview...')
Updating the Google Fonts list
The package includes a built-in Google Fonts dataset that works out of the box.
However, if you want to update the fonts data or need the latest fonts from Google, you'll need to configure a Google Fonts API key.
- Get a Google Fonts API key from the Google Cloud Console
- Add your API key to your
.envfile:GOOGLE_FONTS_API_KEY=your_api_key_here
- Update the Google Fonts data with the latest fonts from Google's API:
php artisan filament-font-picker:update-fonts
This command will fetch the latest fonts from Google and update the list of available fonts.
Requirements
- PHP 8.2+
- Filament 4.0+
- Laravel 11.0+
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.
Credits
- Built for Filament
- Fonts provided by Google Fonts
- Created by Charlie Etienne
- Inspired by Filament Studio's font picker by Dennis Koch
charlieetienne/filament-font-picker 适用场景与选型建议
charlieetienne/filament-font-picker 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 4.77k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2025 年 08 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「google-fonts」 「filament」 「font-picker」 「form-component」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 charlieetienne/filament-font-picker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 charlieetienne/filament-font-picker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 charlieetienne/filament-font-picker 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically downloads external CSS fonts (Google Fonts, Font Awesome, ...) and serves them locally for GDPR compliance
Google Fonts integration for Symfony with development CDN and production font locking
Alfabank REST API integration
Universal font manager for Symfony supporting multiple providers (Google Fonts, Bunny Fonts, Local Fonts, Fontsource) with development CDN and production font locking
Use any Google Font on your Flarum 2 forum — pick a body font and a heading font from the full Google Fonts library, applied site-wide.
This is my package google-fonts
统计信息
- 总下载量: 4.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-15