kachnitel / components-bundle
A Symfony bundle for reusable Twig components
Package info
github.com/kachnitel/FrdComponentsBundle
Type:symfony-bundle
pkg:composer/kachnitel/components-bundle
dev-main
2026-01-29 23:56 UTC
Requires
- php: >=8.2
- symfony/framework-bundle: ^6.4|^7.0
- symfony/stimulus-bundle: ^2.21
- symfony/ux-live-component: ^2.21
- symfony/ux-twig-component: ^2.21
Requires (Dev)
- phpmd/phpmd: ^2.15
- phpstan/phpstan: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- symfony/browser-kit: ^7.0
- symfony/css-selector: ^7.0
- symfony/phpunit-bridge: ^7.0
- symfony/twig-bundle: ^7.0
This package is auto-updated.
Last update: 2026-03-01 00:50:04 UTC
README
A Symfony bundle providing reusable Twig and Live Components for common UI patterns.
Installation
composer require kachnitel/components-bundle
Quick Start
Calendar
Display a monthly calendar with custom content for each day:
<twig:K:Components:Calendar year="2024" month="1"> <twig:block name="dayContent"> {{ date }} - Your content here </twig:block> </twig:K:Components:Calendar>
Dialog
Create modal dialogs with a trigger button:
<twig:K:Components:DialogTrigger dialogId="my-dialog" label="Open" /> <twig:K:Components:Dialog id="my-dialog" label="My Dialog"> Dialog content here </twig:K:Components:Dialog>
Timer (Live Component)
Display a running timer that updates every second:
<twig:K:Components:Timer :startTime="timeEntry.startTime" />
LiveEmitTrigger (Live Component)
Emit events to other Live Components:
<twig:K:Components:LiveEmitTrigger target="MyApp:MyComponent" action="save" />
Documentation
See the full documentation for detailed usage and options.
Available Components
| Component | Type | Description |
|---|---|---|
| Calendar | Twig | Monthly calendar grid with customizable day content |
| Dialog | Twig | Native HTML dialog wrapper with Stimulus controller |
| DialogTrigger | Twig | Button to open a Dialog component |
| Timer | Live | Auto-updating duration timer |
| LiveEmitTrigger | Live | Button to emit events to Live Components |
License
MIT