awcodes/preset-color-picker
Composer 安装命令:
composer require awcodes/preset-color-picker
包简介
A color picker field for Filament Forms that uses preset color palettes.
README 文档
README
A color picker field for Filament Forms that uses preset color palettes.
Installation
You can install the package via composer:
composer require awcodes/preset-color-picker
Important
If you have not set up a custom theme and are using a Panel follow the instructions in the Filament Docs first. The following applies to both the Panels Package and the standalone Forms package.
Add the plugin's views to your tailwind.config.js file.
content: [ './vendor/awcodes/preset-color-picker/resources/views/**/*.blade.php', ]
Rebuild your custom theme.
npm run build
Usage
Simply add the field to your form using the PresetColorPicker field and pass in an array of Filament Color objects.
Should you need to include black and white in your color palette, you can use the withWhite and withBlack methods. This will include black and white at the end of the color options.
You can also use the 'swap' argument to swap out the hex value used for black and white.
PresetColorPicker::make('color') ->colors([ // array of Filament Color objects ]) ->size('sm') // optional 'xs', 'sm', 'md', 'lg' ->withBlack(swap: '#111111') ->withWhite(swap: '#f5f5f5'),
Hook Classes
These are the available classes for css coustmizations:
- for the main container:
pcp-preset-color-picker - for items:
pcp-preset-color-picker-item - for active/selected item:
pcp-preset-color-picker-item-active
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
awcodes/preset-color-picker 适用场景与选型建议
awcodes/preset-color-picker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.98k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2024 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「color-picker」 「filament」 「awcodes」 「preset-color-picker」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 awcodes/preset-color-picker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 awcodes/preset-color-picker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 awcodes/preset-color-picker 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A replica Gutenberg color picker field for Advanced Custom Fields.
CakePHP 4.x AdminLTE Theme.
The ColorPickerTypeBundle extends Symfony2 form types, creates a new ColorPicker form type, to display a javascript color picker.
Color picker input widget for Yii 2
Color picker module for SilverStripe 4 using verte
Custom Flux UI components - carousel, color-picker, and emoji-select
统计信息
- 总下载量: 14.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-22