trych/kirby-lottie-file-preview
Composer 安装命令:
composer require trych/kirby-lottie-file-preview
包简介
Kirby CMS plugin that adds Lottie animation file previews to the panel.
README 文档
README
A Kirby CMS plugin that adds Lottie animation file previews to the panel.
Features
- 🎬 Preview Lottie animations directly in the Kirby Panel
- ⚙️ Configurable player options (controls, autoplay, loop, speed, etc.)
- 🔧 Custom detail fields support
Installation
Via Composer (recommended)
composer require trych/kirby-lottie-file-preview
Manual Installation
- Download the latest release
- Extract to
site/plugins/lottie-file-preview
Via Git Submodule
git submodule add https://github.com/trych/kirby-lottie-file-preview.git site/plugins/lottie-file-preview
Requirement
- Kirby v5
Usage
The plugin automatically adds a preview for Lottie JSON files in the panel file view. No additional configuration is required for basic usage.
Configuration
You can customize the plugin behavior with the following properties in your config.php (shown are the default values):
<?php return [ 'trych.lottie-file-preview' => [ 'controls' => true, // show player controls 'autoplay' => true, // auto-play animations 'loop' => true, // loop animations 'speed' => 1, // playback speed 'background' => 'transparent', // background color 'direction' => 1, // 1 = forward, -1 = reverse 'mode' => 'normal', // 'normal' or 'bounce' // custom detail fields 'details' => [ [ 'title' => 'Author', 'text' => '{{ file.author }}', 'link' => '{{ file.authorlink.toUrl }}' ], [ 'title' => 'License', 'text' => '{{ file.license }}', 'link' => '{{ file.licenselink.toUrl }}' ] ] ] ];
As shown above, the detail text and link accepts Kirby query strings.
Asset Loading
The plugin automatically handles loading the Lottie player library:
- Default: Uses CDN (unpkg.com) - cached by browser, always up-to-date
- Offline support: Automatically uses local copy if
assets/lottie-player.jsexists
For Offline Usage (Optional)
If you need offline support, simply download the Lottie player:
# Download latest version
curl -o assets/lottie-player.js https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js
Or download it manually and place it in site/plugins/lottie-file-preview/assets/lottie-player.js.
The plugin will detect and use the local file.
Credits
- Built with LottieFiles Lottie Player
- Powered by Kirby CMS
- Preview animation by Paul Voggenreiter
Changelog
See CHANGELOG.md for details.
License
MIT License © 2025 Timo Rychert
trych/kirby-lottie-file-preview 适用场景与选型建议
trych/kirby-lottie-file-preview 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 482 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 06 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「plugin」 「panel」 「animation」 「kirby」 「kirby-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 trych/kirby-lottie-file-preview 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 trych/kirby-lottie-file-preview 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 trych/kirby-lottie-file-preview 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Yii2 panel widget
A Laravel Admin Package for The Control Group to make your life easier and steer your project in the right direction
ServerPilot: the best way to run PHP websites.
Plugin for YOURLS. Default tools to use in some laemmi plugins
Alfabank REST API integration
统计信息
- 总下载量: 482
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-28
