承接 ryangjchandler/filament-color-palette 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ryangjchandler/filament-color-palette

最新稳定版本:v1.0.0

Composer 安装命令:

composer require ryangjchandler/filament-color-palette

包简介

Let users pick a color from a fixed list of options.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This packages implements a new ColorPalette field as described in the mini-series on my blog.

It gives users a fixed set of color options to choose from and the option to choose an arbitrary custom color.

Installation

You can install the package via Composer:

composer require ryangjchandler/filament-color-palette

Usage

Add the field to your form like so:

use RyanChandler\FilamentColorPalette\ColorPalette;

ColorPalette::make('color')
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),

Store color name instead of code

You may wish to store the name (label) of a color instead of the color code. This can be achieved by calling the storeColorName() method on the field.

ColorPalette::make('color')
    ->storeColorName()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),

Now instead of the hex codes being stored, the name from the options array will be used instead.

Custom colors

If you want your users to have some more freedom, you can allow them to choose custom colors. Call the ->allowCustomColors() method on the field and a custom color picker will appear in the options.

ColorPalette::make('color')
    ->allowCustomColors()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),

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.

统计信息

  • 总下载量: 66
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固