承接 andrewdwallo/filament-selectify 相关项目开发

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

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

andrewdwallo/filament-selectify

最新稳定版本:v3.0.0

Composer 安装命令:

composer require andrewdwallo/filament-selectify

包简介

This is my package filament-selectify

README 文档

README

A small package featuring two simple components that serve as excellent alternatives to toggles, radio buttons, and other selectors. These components not only offer seamless user interactions but also maintain UI consistency by effortlessly aligning with neighboring fields and components.

ButtonGroup2 ToggleButton

FILAMENT 4.x Packagist Downloads

Installation

You can install the package via composer:

composer require andrewdwallo/filament-selectify

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-selectify-views"

Registering Styles

In order for the component's styles to be processed, you must add this package's vendor directory into your panels custom theme.css file. You can see how to create a Filament PHP custom theme here.

@source '../../../../vendor/andrewdwallo/filament-selectify/resources/views';

Usage

ToggleButton

The ToggleButton has the following options. The onLabel() and offLabel() represent the true and false states. You may also customize the color representing each state using onColor() and offColor().

ToggleButton::make('enabled')
    ->offColor('danger')
    ->onColor('primary')
    ->offLabel('No')
    ->onLabel('Yes')
    ->default(true),

Screenshot 2023-06-30 225445

ButtonGroup

The ButtonGroup has the following options. You may customize the color representing each state. The onColor() represents the button or value that is selected and the offColor() represents the button or value that is not selected. You may use gridDirection() to change the layout of the buttons. The options are column and row. The default is column. You may optionally add icons for the buttons using icons() and supplying an array that contains the option values as keys and icon names as values. Icon position and size can be changed using iconPosition() (default: before) and iconSize() (default: Small).

ButtonGroup::make('entity')
    ->options([
        'individual' => 'Individual',
        'company' => 'Company',
    ])
    ->onColor('primary')
    ->offColor('gray')
    ->gridDirection('row')
    ->default('individual')
    ->icons([
        'individual' => 'heroicon-m-user',
        'company' => 'heroicon-m-building-office', 
    ])
    ->iconPosition(\Filament\Support\Enums\IconPosition::After)
    ->iconSize(Filament\Support\Enums\IconSize::Medium),

Screenshot 2023-06-30 224052

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.

统计信息

  • 总下载量: 70.67k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 45
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 45
  • Watchers: 3
  • Forks: 7
  • 开发语言: Blade

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固