visualbuilder/filament-lottie 问题修复 & 功能扩展

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

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

visualbuilder/filament-lottie

最新稳定版本:5.0.0-beta.4

Composer 安装命令:

composer require visualbuilder/filament-lottie

包简介

Lottie animation Schema component and Blade component for Filament panels.

README 文档

README

Lottie animation Schema component and Blade component for Filament 5 panels.

Bundles @lottiefiles/dotlottie-wc and exposes it as:

  • A Schema component (Visualbuilder\Lottie\Components\Lottie) usable inside any ->schema([…]).
  • A Blade component (<x-lottie />) for views outside the Filament Schema system.

Install

composer require visualbuilder/filament-lottie

The dist JS and CSS are auto-registered on every Filament page. Disable via config('lottie.auto_register_assets', false) and register the assets yourself if you want load-on-request behaviour.

Configure (optional)

php artisan vendor:publish --tag=lottie-config

config/lottie.php exposes default_size, default_loop, default_autoplay, respect_reduced_motion, and auto_register_assets.

Panel-level defaults (optional)

use Visualbuilder\Lottie\LottiePlugin;

->plugins([
    LottiePlugin::make()
        ->defaultSize('80px')
        ->defaultRespectReducedMotion(true),
])

API

use Visualbuilder\Lottie\Components\Lottie;

Lottie::make('welcome')
    ->src('lottie/welcome.lottie')
    ->autoplay()                 // default true
    ->loop(false)                // default false (play once)
    ->speed(1.0)
    ->size('120px')              // shorthand → width + height
    ->trigger('mount')           // mount | click | hover | visible | event:NAME
    ->onComplete('event:NAME')   // dispatch a window event when animation finishes
    ->respectReducedMotion();    // default true
<x-lottie src="lottie/welcome.lottie" autoplay :loop="false" size="120px" />

Development

npm install
npm run build         # bundle resources/js/index.js → resources/dist/
composer test

Branches

  • 5.x — Filament 5 / Livewire 4 (this branch).
  • 4.x — Filament 4 / Livewire 3.

License

MIT.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固