symkit/form-bundle
Composer 安装命令:
composer require symkit/form-bundle
包简介
Symfony bundle for premium form types (Slug, SitemapPriority, IconPicker, ActiveInactive, FormSection), form extensions (RichSelect, Password, Translatable, Url, Dependency, CheckboxRichSelect), Twig components, Tailwind theme and Stimulus
README 文档
README
A collection of premium Symfony form types, extensions, and Twig Live Components with Tailwind CSS styling and Stimulus integration.
Part of the SymKit ecosystem.
Features
- Advanced Form Types: Slug generation, Icon picking, Sitemap priorities, and Sectioned layouts.
- Powerful Extensions: Translatable fields, Dependent fields (JS-free setup), Rich select inputs, and Password strength meters.
- Twig Live Components: High-performance, reactive UI components for complex form fields.
- Tailwind Ready: Full support for dark mode and responsive design.
Documentation
Installation
composer require symkit/form-bundle
Configuration
All features are enabled by default. To customize the bundle, see the Configuration Reference.
Example: disabling specific components:
# config/packages/symkit_form.yaml symkit_form: components: slug: false
Tailwind Theme
Enable the premium Tailwind form theme in config/packages/twig.yaml:
twig: form_themes: - '@SymkitForm/form/tailwind_layout.html.twig'
Form Types
SlugType
Automatically generates a slug from another field.
$builder->add('title', TextType::class); $builder->add('slug', SlugType::class, [ 'target' => 'title', // The field to watch 'unique' => true, // AJAX uniqueness check ]);
FormSectionType
Groups fields into card-style sections.
$builder->add('general', FormSectionType::class, [ 'label' => 'General Info', 'icon' => 'heroicons:user-20-solid', ]); // Fields added after this will be grouped until the next section
IconPickerType
A visual picker for Heroicons.
$builder->add('icon', IconPickerType::class);
Form Extensions
TranslatableExtension
Adds multi-locale support to TextType and TextareaType.
$builder->add('description', TextType::class, [ 'translatable' => true, ]);
RichSelectExtension
Enhances ChoiceType with searching and icons.
$builder->add('category', ChoiceType::class, [ 'rich_select' => true, 'searchable' => true, 'choice_icons' => [ 'Value' => 'heroicons:tag-20-solid', ], ]);
DependencyExtension
Conditionally show/hide fields based on other field values.
$builder->add('type', ChoiceType::class, [ 'choices' => ['External' => 'ext', 'Internal' => 'int'], ]); $builder->add('url', UrlType::class, [ 'depends_on' => [ 'field' => 'type', 'value' => 'ext', ], ]);
Twig Live Components
These components are automatically used by form extensions but can be used standalone:
RichSelect
Reactive search and selection for huge lists.
PasswordField
Real-time password strength validation.
TranslatableField
Tabbed interface for multi-language input.
Stimulus Controllers
Register the controllers in your assets/bootstrap.js (or via AssetMapper):
form--slugform--rich-selectform--dropdownform--password-visibilityform--section-navform--dependency
Refer to assets/controllers/ for implementation details.
symkit/form-bundle 适用场景与选型建议
symkit/form-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 468 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 symkit/form-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 symkit/form-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 468
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 9
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-21