Proglab/Components
Introduction
Some twig components in the style of atomic design
Repository
https://github.com/Proglab/components
Install
Install with composer
composer require Proglab\Components
What you'll need
Client: Bootstrap 5, Stimulus
Server: Symfony 6.3, Symfony UX Twig components 2.6, Symfony UX Live components 2.8
How to overide any templates ?
- Create a
bundles/ProglabComponentsBundle/
directory in your template directory - Copy/paste the original file (for exemple the
templates/components/atoms/button.html.twig
to yourtemplates/bundles/ProglabComponentsBundle/components/atoms/button.html.twig
) - Update it with your own twig code
How to overide any components ?
- Create a
src/Components/Button.php
file - Extend from the Component of this bundle
- Update your
config/services.yaml
services:
Proglab\Components\Components\Atoms\Button:
class: App\Components\Button
public: true
autoconfigure: true
autowire: true
Well done
You can do what you need