charlieetienne/filament-font-picker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

charlieetienne/filament-font-picker

最新稳定版本:1.3.0

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.

filament-font-picker-social-1280x640

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.

  1. Get a Google Fonts API key from the Google Cloud Console
  2. Add your API key to your .env file:
    GOOGLE_FONTS_API_KEY=your_api_key_here
  3. 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

统计信息

  • 总下载量: 1.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 0
  • Forks: 1
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固